From 7956a84ea19a9bf17ae504b0f245f9ebecbbdac8 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Thu, 7 Jul 2022 07:56:26 -0400 Subject: [PATCH] Update cubesatsim.ino --- cubesatsim/cubesatsim.ino | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 1d86b40b..2c65e8e4 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -972,8 +972,10 @@ void write_wave(int i, short int *buffer) buffer[ctr++] = (short int)(0.25 * amplitude * phase); // Serial.print(buffer[ctr - 1]); // Serial.print(" "); - if (ctr > BUFFER_SIZE) + if (ctr > BUFFER_SIZE) { ctr = ctr - BUFFER_SIZE; + Serial.println("r"); + } } else { @@ -2238,7 +2240,7 @@ void pwm_interrupt_handler() { // Serial.println(wav_position); if (wav_position++ > BUFFER_SIZE) { // 300) { wav_position = wav_position - BUFFER_SIZE; -// Serial.print("R"); + Serial.print("R"); } }