From 2e0beb4faa8efefeea32cf57cffca7db8a85ee81 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Tue, 5 Jul 2022 09:50:18 -0400 Subject: [PATCH] Update cubesatsim.ino --- cubesatsim/cubesatsim.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 7607cc44..01c3a53b 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -2022,7 +2022,7 @@ void pwm_interrupt_handler() { // pwm_clear_irq(pwm_gpio_to_slice_num(AUDIO_OUT_PIN)); // if (wav_position < (WAV_DATA_LENGTH<<3) - 1) { - if (wav_position > (buffer_size - 1)) { + if (wav_position > (BUFFER_SIZE - 1)) { // set pwm level // allow the pwm value to repeat for 8 cycles this is >>3 pwm_set_gpio_level(AUDIO_OUT_PIN, buffer[wav_position]);