[Morse] Use out of band tone for space in AFSK mode (#529)
This commit is contained in:
parent
206d49f802
commit
2faa4b5d71
3 changed files with 9 additions and 3 deletions
|
@ -24,9 +24,13 @@ int16_t AFSKClient::tone(uint16_t freq, bool autoStart) {
|
||||||
return(RADIOLIB_ERR_NONE);
|
return(RADIOLIB_ERR_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t AFSKClient::noTone() {
|
int16_t AFSKClient::noTone(bool keepOn) {
|
||||||
Module* mod = _phy->getMod();
|
Module* mod = _phy->getMod();
|
||||||
mod->noTone(_pin);
|
mod->noTone(_pin);
|
||||||
|
if(keepOn) {
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
return(_phy->standby());
|
return(_phy->standby());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,11 @@ class AFSKClient {
|
||||||
/*!
|
/*!
|
||||||
\brief Stops transmitting audio tone.
|
\brief Stops transmitting audio tone.
|
||||||
|
|
||||||
|
\param freq Keep transmitter on - this may limit noise when switching transmitter on or off.
|
||||||
|
|
||||||
\returns \ref status_codes
|
\returns \ref status_codes
|
||||||
*/
|
*/
|
||||||
int16_t noTone();
|
int16_t noTone(bool keepOn = false);
|
||||||
|
|
||||||
#if !defined(RADIOLIB_GODMODE)
|
#if !defined(RADIOLIB_GODMODE)
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -308,7 +308,7 @@ int16_t MorseClient::transmitDirect(uint32_t freq, uint32_t freqHz) {
|
||||||
int16_t MorseClient::standby() {
|
int16_t MorseClient::standby() {
|
||||||
#if !defined(RADIOLIB_EXCLUDE_AFSK)
|
#if !defined(RADIOLIB_EXCLUDE_AFSK)
|
||||||
if(_audio != nullptr) {
|
if(_audio != nullptr) {
|
||||||
return(_audio->noTone());
|
return(_audio->noTone(true));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return(_phy->standby());
|
return(_phy->standby());
|
||||||
|
|
Loading…
Add table
Reference in a new issue