Skip to content

Commit 1d7b589

Browse files
retiututphilippitts
authored andcommitted
Fix bug when trying to stop streaming and a brainflow error is thrown
1 parent cb71672 commit 1d7b589

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

OpenBCI_GUI/BoardBrainflow.pde

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,13 @@ abstract class BoardBrainFlow extends Board {
102102
time_last_datapoint = -1.0;
103103
}
104104
catch (BrainFlowError e) {
105-
println("ERROR: Exception when stoppping stream");
105+
outputError("ERROR: Exception when stopping stream. Please restart the Board and Session.");
106106
e.printStackTrace();
107-
streaming = true;
107+
//If no data was received in X seconds, there is a serious problem with communications. Go ahead and stop trying to collect data.
108+
//Prevents feedback loop of errors.
109+
if (data_popup_displayed) {
110+
streaming = false;
111+
}
108112
}
109113

110114
if (eegDataSource != DATASOURCE_PLAYBACKFILE && eegDataSource != DATASOURCE_STREAMING) {

0 commit comments

Comments
 (0)