Skip to content

Commit

Permalink
Refactor usage of debugTimeSeriesDataSamplingRate
Browse files Browse the repository at this point in the history
  • Loading branch information
retiutut committed Sep 11, 2023
1 parent 0449f21 commit 954c263
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions OpenBCI_GUI/NetworkStreamOut.pde
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,6 @@ class NetworkStreamOut extends Thread {
}

private void debugTimeSeriesDataSamplingRate() {
if (!debugSamplingRate) {
return;
}

// This code is used to check the sample rate of the data stream
if (sampleRateClock == 0) sampleRateClock = millis();
samplesSent = samplesSent + nPointsPerUpdate;
Expand Down Expand Up @@ -323,7 +319,9 @@ class NetworkStreamOut extends Thread {
}
}

debugTimeSeriesDataSamplingRate();
if (debugSamplingRate) {
debugTimeSeriesDataSamplingRate();
}

if (this.protocol.equals("UDP")) {

Expand Down Expand Up @@ -1119,7 +1117,9 @@ class NetworkStreamOut extends Thread {
newDataFromBuffer[i] = w_networking.markerDataBufferToSend[i];
}

debugTimeSeriesDataSamplingRate();
if (debugSamplingRate) {
debugTimeSeriesDataSamplingRate();
}

if (this.protocol.equals("UDP")) {

Expand Down

0 comments on commit 954c263

Please sign in to comment.