From d983c25a1fd1d4099cfd67e3e716e83e0ae552dd Mon Sep 17 00:00:00 2001 From: DigitalConfections Date: Tue, 11 Aug 2020 17:00:14 -0400 Subject: [PATCH] Ver 0.20 o Corrects a minor bug that caused the tone output to shift to the next fox tone pitch ~100ms too soon. --- Arduino-microfox/Arduino-microfox.ino | 4 +++- Arduino-microfox/defs.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Arduino-microfox/Arduino-microfox.ino b/Arduino-microfox/Arduino-microfox.ino index 789e43a..cea158b 100644 --- a/Arduino-microfox/Arduino-microfox.ino +++ b/Arduino-microfox/Arduino-microfox.ino @@ -69,6 +69,7 @@ volatile int g_fox_id_offset = 0; volatile int g_id_interval = 0; volatile BOOL g_time_to_ID = FALSE; volatile int g_startclock_interval = 60; +volatile int g_fox_tone_offset = 1; volatile BOOL g_audio_tone_state = FALSE; volatile uint8_t g_lastSeconds = 0x00; @@ -895,6 +896,7 @@ void loop() g_on_the_air = TRUE; g_callsign_sent = FALSE; g_fox_transition = FALSE; + g_fox_tone_offset = g_fox_counter; } else { @@ -963,7 +965,7 @@ void sendMorseTone(BOOL onOff) { if(!g_lastSeconds) { - OCR0A = DEFAULT_TONE_FREQUENCY - g_fox_counter; + OCR0A = DEFAULT_TONE_FREQUENCY - g_fox_tone_offset; g_audio_tone_state = onOff; } else diff --git a/Arduino-microfox/defs.h b/Arduino-microfox/defs.h index bf010e0..38377a5 100644 --- a/Arduino-microfox/defs.h +++ b/Arduino-microfox/defs.h @@ -70,7 +70,7 @@ /****************************************************** * Set the text that gets displayed to the user */ -#define SW_REVISION "0.19" +#define SW_REVISION "0.20" //#define TRANQUILIZE_WATCHDOG