Skip to content

Commit

Permalink
Fix bug when trying to stop streaming and a brainflow error is thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
retiutut committed Aug 16, 2023
1 parent 547b6d1 commit 40302d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions OpenBCI_GUI/BoardBrainflow.pde
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,13 @@ abstract class BoardBrainFlow extends Board {
time_last_datapoint = -1.0;
}
catch (BrainFlowError e) {
println("ERROR: Exception when stoppping stream");
outputError("ERROR: Exception when stopping stream. Please restart the Board and Session.");
e.printStackTrace();
streaming = true;
//If no data was received in X seconds, there is a serious problem with communications. Go ahead and stop trying to collect data.
//Prevents feedback loop of errors.
if (data_popup_displayed) {
streaming = false;
}
}

if (eegDataSource != DATASOURCE_PLAYBACKFILE && eegDataSource != DATASOURCE_STREAMING) {
Expand Down

0 comments on commit 40302d1

Please sign in to comment.