From 47a7c1c0eb4ebaf2751a7d76102a3a4e6d20e2e2 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sat, 17 Sep 2022 13:44:44 -0400 Subject: [PATCH] fixed FSK bit encoding --- cubesatsim/cubesatsim.ino | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 8e214af3..c0af84ba 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -1288,14 +1288,15 @@ void get_tlm_fox() { data = val & 1 << (bit - 1); // printf ("%d i: %d new frame %d sync bit %d = %d \n", // ctr/SAMPLES, i, frames, bit, (data > 0) ); - /// if (mode == FSK) { - /// phase = ((data != 0) * 2) - 1; - // printf("Sending a %d\n", phase); - /// } else { + if (mode == FSK) { + phase = ((data != 0) * 2) - 1; + } else { if (data == 0) { phase *= -1; - } - /// } + } + // printf("Sending a %d\n", phase); + + } } } /// #ifdef DEBUG_LOGGING