From 954c263652700d6c15ea7ad1ba06763e0b8e171f Mon Sep 17 00:00:00 2001 From: Richard Waltman Date: Mon, 11 Sep 2023 15:44:08 -0500 Subject: [PATCH] Refactor usage of debugTimeSeriesDataSamplingRate --- OpenBCI_GUI/NetworkStreamOut.pde | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenBCI_GUI/NetworkStreamOut.pde b/OpenBCI_GUI/NetworkStreamOut.pde index 2260dd626..e8ba7117f 100644 --- a/OpenBCI_GUI/NetworkStreamOut.pde +++ b/OpenBCI_GUI/NetworkStreamOut.pde @@ -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; @@ -323,7 +319,9 @@ class NetworkStreamOut extends Thread { } } - debugTimeSeriesDataSamplingRate(); + if (debugSamplingRate) { + debugTimeSeriesDataSamplingRate(); + } if (this.protocol.equals("UDP")) { @@ -1119,7 +1117,9 @@ class NetworkStreamOut extends Thread { newDataFromBuffer[i] = w_networking.markerDataBufferToSend[i]; } - debugTimeSeriesDataSamplingRate(); + if (debugSamplingRate) { + debugTimeSeriesDataSamplingRate(); + } if (this.protocol.equals("UDP")) {