From 9d7184dccecb44911e909f1b604b0db5ed16e7fd Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 18 Sep 2022 15:04:08 -0400 Subject: [PATCH] use while --- cubesatsim/cubesatsim.ino | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 95407f2a..8035364d 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -511,8 +511,11 @@ void transmit_off() { digitalWrite(BPSK_CONTROL_B, LOW); // pwm_set_gpio_level(BPSK_PWM_A_PIN, 0); // pwm_set_gpio_level(BPSK_PWM_B_PIN, 0); - - for (int i = 0; ((i < 5) && (!clockgen.enableOutputs(false))); i++) { + int ret = 1; + int i = 0; +// for (int i = 0; ((i < 5) && (!clockgen.enableOutputs(false))); i++) { + while ((i++ < 5) && (ret != 0)) { + ret = clockgen.enableOutputs(false); Serial.println("Disable clock outputs"); } // clockgen.enableOutputs(false)