From 467765d89246918badef3fa909a95c0562c1614d Mon Sep 17 00:00:00 2001 From: morgan Date: Sat, 2 Feb 2019 21:16:33 +0000 Subject: [PATCH] update tone calls --- src/HamShield.cpp | 9 ++++++--- src/HamShield_comms.h | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/HamShield.cpp b/src/HamShield.cpp index 0a9b5cb..20c15ef 100644 --- a/src/HamShield.cpp +++ b/src/HamShield.cpp @@ -1613,11 +1613,13 @@ void HamShield::morseOut(char buffer[HAMSHIELD_MORSE_BUFFER_SIZE]) { if(bits) { // If it is a valid character... do { if(bits & 1) { - HStone(hs_pwm_pin, morse_freq, morse_dot_millis * 3); + HStone(hs_pwm_pin, morse_freq); //, morse_dot_millis * 3); HSdelay(morse_dot_millis*3); + HSnoTone(); } else { - HStone(hs_pwm_pin, morse_freq, morse_dot_millis); + HStone(hs_pwm_pin, morse_freq); //, morse_dot_millis); HSdelay(morse_dot_millis); + HSnoTone(); } //tone(hs_pwm_pin, 6000, morse_dot_millis); HSnoTone(hs_pwm_pin); @@ -1758,8 +1760,9 @@ void HamShield::SSTVTestPattern(int code) { /* wait for tone to complete */ void HamShield::toneWait(uint16_t freq, long timer) { - HStone(hs_pwm_pin,freq,timer); + HStone(hs_pwm_pin,freq); //,timer); HSdelay(timer); + HSnoTone(); } /* wait microseconds for tone to complete */ diff --git a/src/HamShield_comms.h b/src/HamShield_comms.h index 8406228..6fabc18 100644 --- a/src/HamShield_comms.h +++ b/src/HamShield_comms.h @@ -42,8 +42,7 @@ void HSdelay(unsigned long ms); void HSdelayMicroseconds(unsigned int us); void HStone(uint8_t pin, unsigned int frequency); -void HStone(uint8_t pin, unsigned int frequency, unsigned long duration); void HSnoTone(uint8_t pin); -#endif /* _HAMSHIELD_COMMS_H_ */ \ No newline at end of file +#endif /* _HAMSHIELD_COMMS_H_ */