From 660115e9e3c414e50b2002081be617943dce04af Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sat, 17 Sep 2022 09:32:13 -0400 Subject: [PATCH] add RR --- cubesatsim/cubesatsim.ino | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index bd97ee68..7956ab1d 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -58,6 +58,8 @@ Adafruit_INA219 ina219_2_0x45(0x45); Adafruit_SI5351 clockgen = Adafruit_SI5351(); +unsigned long micros3; + //WiFiServer server(port); //WiFiClient client; @@ -1352,8 +1354,15 @@ void write_wave(int i, byte *buffer) ctr = ctr - bufLen; // if (debug_mode) { Serial.print("ctr reset "); + if (bufLen != 0) { + Serial.print("RR Microseconds: "); + Serial.println((float)(micros() - micros3)/(float)bufLen); + } +// } + micros3 = micros(); + // Serial.print(" "); - Serial.println(millis()); +// Serial.println(millis()); // } } // Serial.printf(" b: %d ", buffer[ctr - 1]);