From 081fbf7b26d0550b2bef10cffdffbf4fc4aa6c44 Mon Sep 17 00:00:00 2001 From: Josh Siegle Date: Wed, 25 Sep 2024 13:28:51 -0700 Subject: [PATCH] Check for device before changing LED status --- Source/DeviceThread.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/DeviceThread.cpp b/Source/DeviceThread.cpp index c7631c1..bfb9948 100644 --- a/Source/DeviceThread.cpp +++ b/Source/DeviceThread.cpp @@ -974,6 +974,8 @@ void DeviceThread::updateSettings(OwnedArray* continuousChann int numDigitalLines = boardType == INTAN_RHD_USB ? 16 : 8; + LOGD("Number of digital lines enabled: ", numDigitalLines); + EventChannel::Settings settings{ EventChannel::Type::TTL, "Rhythm FPGA TTL Input", @@ -2060,11 +2062,12 @@ int DeviceThread::getHeadstageChannel (int& hs, int ch) const void DeviceThread::enableBoardLeds(bool enable) { - settings.ledsEnabled = enable; - if (evalBoard == nullptr) + if (!deviceFound) return; + settings.ledsEnabled = enable; + if (isAcquisitionActive()) updateSettingsDuringAcquisition = true; else