Skip to content

Commit

Permalink
Check for device before changing LED status
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiegle committed Sep 25, 2024
1 parent bf72f80 commit 081fbf7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Source/DeviceThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,8 @@ void DeviceThread::updateSettings(OwnedArray<ContinuousChannel>* 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",
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 081fbf7

Please sign in to comment.