update tone calls
This commit is contained in:
parent
844bb6b8c6
commit
467765d892
|
@ -1613,11 +1613,13 @@ void HamShield::morseOut(char buffer[HAMSHIELD_MORSE_BUFFER_SIZE]) {
|
||||||
if(bits) { // If it is a valid character...
|
if(bits) { // If it is a valid character...
|
||||||
do {
|
do {
|
||||||
if(bits & 1) {
|
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);
|
HSdelay(morse_dot_millis*3);
|
||||||
|
HSnoTone();
|
||||||
} else {
|
} else {
|
||||||
HStone(hs_pwm_pin, morse_freq, morse_dot_millis);
|
HStone(hs_pwm_pin, morse_freq); //, morse_dot_millis);
|
||||||
HSdelay(morse_dot_millis);
|
HSdelay(morse_dot_millis);
|
||||||
|
HSnoTone();
|
||||||
}
|
}
|
||||||
//tone(hs_pwm_pin, 6000, morse_dot_millis);
|
//tone(hs_pwm_pin, 6000, morse_dot_millis);
|
||||||
HSnoTone(hs_pwm_pin);
|
HSnoTone(hs_pwm_pin);
|
||||||
|
@ -1758,8 +1760,9 @@ void HamShield::SSTVTestPattern(int code) {
|
||||||
/* wait for tone to complete */
|
/* wait for tone to complete */
|
||||||
|
|
||||||
void HamShield::toneWait(uint16_t freq, long timer) {
|
void HamShield::toneWait(uint16_t freq, long timer) {
|
||||||
HStone(hs_pwm_pin,freq,timer);
|
HStone(hs_pwm_pin,freq); //,timer);
|
||||||
HSdelay(timer);
|
HSdelay(timer);
|
||||||
|
HSnoTone();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wait microseconds for tone to complete */
|
/* wait microseconds for tone to complete */
|
||||||
|
|
|
@ -42,8 +42,7 @@ void HSdelay(unsigned long ms);
|
||||||
void HSdelayMicroseconds(unsigned int us);
|
void HSdelayMicroseconds(unsigned int us);
|
||||||
|
|
||||||
void HStone(uint8_t pin, unsigned int frequency);
|
void HStone(uint8_t pin, unsigned int frequency);
|
||||||
void HStone(uint8_t pin, unsigned int frequency, unsigned long duration);
|
|
||||||
void HSnoTone(uint8_t pin);
|
void HSnoTone(uint8_t pin);
|
||||||
|
|
||||||
|
|
||||||
#endif /* _HAMSHIELD_COMMS_H_ */
|
#endif /* _HAMSHIELD_COMMS_H_ */
|
||||||
|
|
Loading…
Reference in New Issue