diff --git a/Source/Devices/Neuropixels1e.cpp b/Source/Devices/Neuropixels1e.cpp index 9bad29b..b26d9a3 100644 --- a/Source/Devices/Neuropixels1e.cpp +++ b/Source/Devices/Neuropixels1e.cpp @@ -65,8 +65,7 @@ void NeuropixelsV1eBackgroundUpdater::run() } catch (const error_str& e) { - LOGE(e.what()); - AlertWindow::showMessageBox(MessageBoxIconType::WarningIcon, "Error Writing Shift Registers", e.what()); + Onix1::showWarningMessageBoxAsync("Error Writing Shift Registers", e.what()); result = false; return; } diff --git a/Source/OnixSource.cpp b/Source/OnixSource.cpp index bb62c20..739099e 100644 --- a/Source/OnixSource.cpp +++ b/Source/OnixSource.cpp @@ -159,8 +159,7 @@ bool OnixSource::configureDevice(OnixDeviceVector& sources, } catch (const error_str& e) { - LOGE(e.what()); - AlertWindow::showMessageBox(MessageBoxIconType::WarningIcon, "Configuration Error", e.what()); + Onix1::showWarningMessageBoxAsync("Configuration Error", e.what()); return false; } @@ -285,7 +284,7 @@ bool OnixSource::checkHubFirmwareCompatibility(std::shared_ptr context, d auto majorVersion = (firmwareVersion & 0xFF00) >> 8; auto minorVersion = firmwareVersion & 0xFF; - LOGD("Breakout board firmware version: v", majorVersion, ".", minorVersion); + LOGC("Breakout board firmware version: v", majorVersion, ".", minorVersion); if (majorVersion != RequiredMajorVersion) { @@ -410,7 +409,7 @@ bool OnixSource::initializeDevices(device_map_t deviceTable, bool updateStreamIn auto EEPROM = std::make_unique(index, context); uint32_t hsid = EEPROM->GetHeadStageID(); - LOGD("Detected headstage ", onix_hub_str(hsid)); + LOGC("Detected headstage ", onix_hub_str(hsid)); if (hsid == ONIX_HUB_HSNP2E) { diff --git a/Source/UI/NeuropixelsV1Interface.cpp b/Source/UI/NeuropixelsV1Interface.cpp index 47678e1..fb46674 100644 --- a/Source/UI/NeuropixelsV1Interface.cpp +++ b/Source/UI/NeuropixelsV1Interface.cpp @@ -77,8 +77,35 @@ NeuropixelsV1Interface::NeuropixelsV1Interface(std::shared_ptr d, infoLabel->setJustificationType(Justification::topLeft); addAndMakeVisible(infoLabel.get()); + searchForCalibrationFilesButton = std::make_unique("Search for calibration files automatically"); + searchForCalibrationFilesButton->setBounds(infoLabel->getX() + 2, infoLabel->getBottom() + 5, 350, 20); + searchForCalibrationFilesButton->addListener(this); + searchForCalibrationFilesButton->setTooltip("Open a file dialog to choose a folder that contains all calibration files. The calibration file(s) that matches your probe will automatically be selected if it exists in this folder."); + addAndMakeVisible(searchForCalibrationFilesButton.get()); + + calibrationFolderLabel = std::make_unique