From 5217858e23d8ca84f1ebf6ecfa2d32d4d9e74e3f Mon Sep 17 00:00:00 2001 From: Reed Nightingale Date: Tue, 21 Apr 2020 21:13:14 -0700 Subject: [PATCH] Update includes and pin names --- morse.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/morse.cpp b/morse.cpp index dde51c9..b1d5586 100644 --- a/morse.cpp +++ b/morse.cpp @@ -1,7 +1,8 @@ -#include -#include "ubitx.h" -#include "settings.h" +#include //tone + #include "morse.h" +#include "pin_definitions.h" +#include "settings.h" struct Morse { char letter; @@ -84,7 +85,7 @@ void morseLetter(char c, uint16_t dit_duration_ms){ //now we are at the first zero, skip and carry on mask = mask >> 1; while(mask){ - tone(CW_TONE, globalSettings.cwSideToneFreq,10000); + tone(PIN_CW_TONE, globalSettings.cwSideToneFreq,10000); if (mask & code){ delay(3 * dit_duration_ms); //Serial.print('-'); @@ -94,7 +95,7 @@ void morseLetter(char c, uint16_t dit_duration_ms){ //Serial.print('.'); } //Serial.print('#'); - noTone(CW_TONE); + noTone(PIN_CW_TONE); delay(dit_duration_ms); // space between dots and dashes mask = mask >> 1; } @@ -120,8 +121,8 @@ void morseBool(bool val){ if(!globalSettings.morseMenuOn){ return; } - tone(CW_TONE, globalSettings.cwSideToneFreq + (val ? RELATIVE_OFFSET_HZ : -RELATIVE_OFFSET_HZ)); + tone(PIN_CW_TONE, globalSettings.cwSideToneFreq + (val ? RELATIVE_OFFSET_HZ : -RELATIVE_OFFSET_HZ)); delay(3*globalSettings.cwDitDurationMs); - noTone(CW_TONE); + noTone(PIN_CW_TONE); delay(3*globalSettings.cwDitDurationMs); }