Skip to content

Commit

Permalink
Remove waiting for thread on shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiegle committed Nov 2, 2024
1 parent 38304a6 commit 3e7444b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
11 changes: 8 additions & 3 deletions Source/NeuropixEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ NeuropixEditor::NeuropixEditor (GenericProcessor* parentNode, NeuropixThread* t)
if (thread->type != ONEBOX)
{
mainSyncSelector->setVisible (true);
//addSyncChannelButton->setVisible (true);
addSyncChannelButton->setVisible (true);
refreshButton->setVisible (true);
}

Expand All @@ -634,6 +634,8 @@ NeuropixEditor::NeuropixEditor (GenericProcessor* parentNode, NeuropixThread* t)
}
else
{
syncFrequencyLabel->setVisible (false);
addSyncChannelButton->setVisible (false);
desiredWidth = 250;
}

Expand Down Expand Up @@ -777,7 +779,8 @@ void NeuropixEditor::comboBoxChanged (ComboBox* comboBox)
if (asOutput)
{
thread->setSyncOutput (slotIndex);
syncFrequencyLabel->setVisible (true);
if (background->numBasestations > 0)
syncFrequencyLabel->setVisible (true);
background->setFreqSelectAvailable (true);
}
else
Expand Down Expand Up @@ -1051,7 +1054,9 @@ void NeuropixEditor::loadVisualizerEditorParameters (XmlElement* xml)
{
inputOutputSyncSelector->setSelectedItemIndex (1, dontSendNotification);
thread->setSyncOutput (mainSyncSlotIndex);
syncFrequencyLabel->setVisible (true);

if(background->numBasestations > 0)
syncFrequencyLabel->setVisible (true);
background->setFreqSelectAvailable (true);
// syncFrequencySelector->setSelectedItemIndex (frequencyIndex, dontSendNotification);
thread->setSyncFrequency (mainSyncSlotIndex, frequencyIndex);
Expand Down
3 changes: 2 additions & 1 deletion Source/NeuropixEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,12 @@ class EditorBackground : public Component, public ComponentListener
slotButtons[i]->isEnabled = isEnabled;
}

int numBasestations;

private:
/** Draws the background */
void paint (Graphics& g);

int numBasestations;
bool freqSelectEnabled;

/* An array of Basestation objections, one for each basestation detected */
Expand Down
2 changes: 0 additions & 2 deletions Source/NeuropixThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,6 @@ NeuropixThread::~NeuropixThread()

LOGD ("NeuropixThread destructor.");

editor->uiLoader->waitForThreadToExit (-1);

closeConnection();
}

Expand Down

0 comments on commit 3e7444b

Please sign in to comment.