diff --git a/examples/AFSK/AFSK_Imperial_March/AFSK_Imperial_March.ino b/examples/AFSK/AFSK_Imperial_March/AFSK_Imperial_March.ino index ebe8b1a9..b749bb6e 100644 --- a/examples/AFSK/AFSK_Imperial_March/AFSK_Imperial_March.ino +++ b/examples/AFSK/AFSK_Imperial_March/AFSK_Imperial_March.ino @@ -51,7 +51,7 @@ void setup() { // (RF69, CC1101,, Si4432 etc.), use the basic begin() method // int state = radio.begin(); - if(state == ERR_NONE) { + if(state == RADIOLIB_ERR_NONE) { Serial.println(F("success!")); } else { Serial.print(F("failed, code ")); @@ -62,7 +62,7 @@ void setup() { // initialize AFSK client Serial.print(F("[AFSK] Initializing ... ")); state = audio.begin(); - if(state == ERR_NONE) { + if(state == RADIOLIB_ERR_NONE) { Serial.println(F("success!")); } else { Serial.print(F("failed, code ")); diff --git a/examples/AFSK/AFSK_Tone/AFSK_Tone.ino b/examples/AFSK/AFSK_Tone/AFSK_Tone.ino index 113576b3..e5dd0ab4 100644 --- a/examples/AFSK/AFSK_Tone/AFSK_Tone.ino +++ b/examples/AFSK/AFSK_Tone/AFSK_Tone.ino @@ -49,7 +49,7 @@ void setup() { // (RF69, CC1101, Si4432 etc.), use the basic begin() method // int state = radio.begin(); - if(state == ERR_NONE) { + if(state == RADIOLIB_ERR_NONE) { Serial.println(F("success!")); } else { Serial.print(F("failed, code ")); @@ -60,7 +60,7 @@ void setup() { // initialize AFSK client Serial.print(F("[AFSK] Initializing ... ")); state = audio.begin(); - if(state == ERR_NONE) { + if(state == RADIOLIB_ERR_NONE) { Serial.println(F("success!")); } else { Serial.print(F("failed, code ")); diff --git a/examples/AFSK/AFSK_Tone_AM/AFSK_Tone_AM.ino b/examples/AFSK/AFSK_Tone_AM/AFSK_Tone_AM.ino index 7d780f42..9394d9ab 100644 --- a/examples/AFSK/AFSK_Tone_AM/AFSK_Tone_AM.ino +++ b/examples/AFSK/AFSK_Tone_AM/AFSK_Tone_AM.ino @@ -46,7 +46,7 @@ void setup() { // (RF69, CC1101, Si4432 etc.), use the basic begin() method // int state = radio.begin(); - if(state == ERR_NONE) { + if(state == RADIOLIB_ERR_NONE) { Serial.println(F("success!")); } else { Serial.print(F("failed, code ")); @@ -57,7 +57,7 @@ void setup() { // initialize AFSK client Serial.print(F("[AFSK] Initializing ... ")); state = audio.begin(); - if(state == ERR_NONE) { + if(state == RADIOLIB_ERR_NONE) { Serial.println(F("success!")); } else { Serial.print(F("failed, code ")); @@ -68,7 +68,7 @@ void setup() { // after that, set mode to OOK Serial.print(F("[SX1278] Switching to OOK ... ")); state = radio.setOOK(true); - if(state == ERR_NONE) { + if(state == RADIOLIB_ERR_NONE) { Serial.println(F("success!")); } else { Serial.print(F("failed, code ")); diff --git a/src/protocols/AFSK/AFSK.cpp b/src/protocols/AFSK/AFSK.cpp index ee3c7a0a..53ffe7d9 100644 --- a/src/protocols/AFSK/AFSK.cpp +++ b/src/protocols/AFSK/AFSK.cpp @@ -11,7 +11,7 @@ int16_t AFSKClient::begin() { int16_t AFSKClient::tone(uint16_t freq, bool autoStart) { if(freq == 0) { - return(ERR_INVALID_FREQUENCY); + return(RADIOLIB_ERR_INVALID_FREQUENCY); } if(autoStart) { @@ -19,12 +19,14 @@ int16_t AFSKClient::tone(uint16_t freq, bool autoStart) { RADIOLIB_ASSERT(state); } - Module::tone(_pin, freq); - return(ERR_NONE); + Module* mod = _phy->getMod(); + mod->tone(_pin, freq); + return(RADIOLIB_ERR_NONE); } int16_t AFSKClient::noTone() { - Module::noTone(_pin); + Module* mod = _phy->getMod(); + mod->noTone(_pin); return(_phy->standby()); } diff --git a/src/protocols/AFSK/AFSK.h b/src/protocols/AFSK/AFSK.h index 79183d5c..9df3cb41 100644 --- a/src/protocols/AFSK/AFSK.h +++ b/src/protocols/AFSK/AFSK.h @@ -50,7 +50,7 @@ class AFSKClient { */ int16_t noTone(); -#ifndef RADIOLIB_GODMODE +#if !defined(RADIOLIB_GODMODE) private: #endif PhysicalLayer* _phy;