[AFSK] Added check for zero tone frequency
This commit is contained in:
parent
ed0a6623a6
commit
79d8ff2ca0
1 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,10 @@ AFSKClient::AFSKClient(PhysicalLayer* phy, RADIOLIB_PIN_TYPE pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t AFSKClient::tone(uint16_t freq, bool autoStart) {
|
int16_t AFSKClient::tone(uint16_t freq, bool autoStart) {
|
||||||
|
if(freq == 0) {
|
||||||
|
return(ERR_INVALID_FREQUENCY);
|
||||||
|
}
|
||||||
|
|
||||||
if(autoStart) {
|
if(autoStart) {
|
||||||
int16_t state = _phy->transmitDirect();
|
int16_t state = _phy->transmitDirect();
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
|
Loading…
Add table
Reference in a new issue