From 1a97c7a26314f8e46bd3604cae1e8b8707cbba00 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Fri, 14 Apr 2023 18:35:06 -0400 Subject: [PATCH] add another clockgen_present --- cubesatsim/cubesatsim.ino | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 73618d78..6624a171 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -4147,14 +4147,16 @@ void transmit_callsign(char *callsign) { if (!sr_frs_present) { start_clockgen(); - if (clockgen.setClockFSK(frequency_offset)) { - start_clockgen(); - if (clockgen_present) - clockgen.setClockFSK(frequency_offset); - Serial.println("Config clock for CW without SR_FRS!"); - } else { - Serial.println("Config clock for CW without SR_FRS"); - } + if (clockgen_present) { + if (clockgen.setClockFSK(frequency_offset)) { + start_clockgen(); + if (clockgen_present) + clockgen.setClockFSK(frequency_offset); + Serial.println("Config clock for CW without SR_FRS!"); + } else { + Serial.println("Config clock for CW without SR_FRS"); + } + } digitalWrite(PD_PIN, LOW); // disable SR_FRS if (clockgen_present) { clockgen.enableOutputs(false);