From dc744185afa6f3b73cad06ad11e17c5c25b7a870 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Thu, 1 Sep 2022 13:08:37 -0400 Subject: [PATCH] moved while --- cubesatsim/cubesatsim.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 143ab2d2..fc72fb92 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -3428,7 +3428,8 @@ bool TimerHandler0(struct repeating_timer *t) { // Serial.print("l1 "); // Serial.print(wav_position); // Serial.print(" "); - + while ((micros() - micro_timer2) < 832) { } + micro_timer2 = micros(); if (buffer[wav_position++] > 0) { digitalWrite(BPSK_CONTROL_A, HIGH); // delayMicroseconds(2); @@ -3469,8 +3470,8 @@ bool TimerHandler0(struct repeating_timer *t) { } else { /// Serial.print("R' Microseconds: "); /// Serial.println(micros() - micro_timer2); - while ((micros() - micro_timer2) < 832) { } - micro_timer2 = micros(); +// while ((micros() - micro_timer2) < 832) { } +// micro_timer2 = micros(); } } /*