Fixes overload warning when building with ESP IDF (#1089)

* fixes overload

* fixes overload

* fixes overload warnings in ESP-IDF
This commit is contained in:
Dominic Moffat 2024-05-15 17:40:08 +01:00 committed by GitHub
parent 23dcc4b8b7
commit b336dd59f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 21 additions and 3 deletions

View file

@ -314,6 +314,10 @@ int16_t LR11x0::standby(uint8_t mode, bool wakeup) {
return(this->SPIcommand(RADIOLIB_LR11X0_CMD_SET_STANDBY, true, buff, 1)); return(this->SPIcommand(RADIOLIB_LR11X0_CMD_SET_STANDBY, true, buff, 1));
} }
int16_t LR11x0::sleep() {
return(LR11x0::sleep(true, 0));
}
int16_t LR11x0::sleep(bool retainConfig, uint32_t sleepTime) { int16_t LR11x0::sleep(bool retainConfig, uint32_t sleepTime) {
// set RF switch (if present) // set RF switch (if present)
this->mod->setRfSwitchState(Module::MODE_IDLE); this->mod->setRfSwitchState(Module::MODE_IDLE);

View file

@ -774,7 +774,10 @@ class LR11x0: public PhysicalLayer {
\param sleepTime Sleep duration (enables automatic wakeup), in multiples of 30.52 us. Ignored if set to 0. \param sleepTime Sleep duration (enables automatic wakeup), in multiples of 30.52 us. Ignored if set to 0.
\returns \ref status_codes \returns \ref status_codes
*/ */
int16_t sleep(bool retainConfig = true, uint32_t sleepTime = 0);
int16_t sleep();
int16_t sleep(bool retainConfig, uint32_t sleepTime);
// interrupt methods // interrupt methods

View file

@ -442,6 +442,11 @@ int16_t SX126x::scanChannel(uint8_t symbolNum, uint8_t detPeak, uint8_t detMin)
return(getChannelScanResult()); return(getChannelScanResult());
} }
int16_t SX126x::sleep() {
return(SX126x::sleep(true));
}
int16_t SX126x::sleep(bool retainConfig) { int16_t SX126x::sleep(bool retainConfig) {
// set RF switch (if present) // set RF switch (if present)
this->mod->setRfSwitchState(Module::MODE_IDLE); this->mod->setRfSwitchState(Module::MODE_IDLE);

View file

@ -552,7 +552,8 @@ class SX126x: public PhysicalLayer {
or to false to discard current configuration ("cold start"). Defaults to true. or to false to discard current configuration ("cold start"). Defaults to true.
\returns \ref status_codes \returns \ref status_codes
*/ */
int16_t sleep(bool retainConfig = true); int16_t sleep();
int16_t sleep(bool retainConfig);
/*! /*!
\brief Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). \brief Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator).

View file

@ -424,6 +424,10 @@ int16_t SX128x::scanChannel() {
return(getChannelScanResult()); return(getChannelScanResult());
} }
int16_t SX128x::sleep() {
return(SX128x::sleep(true));
}
int16_t SX128x::sleep(bool retainConfig) { int16_t SX128x::sleep(bool retainConfig) {
// set RF switch (if present) // set RF switch (if present)
this->mod->setRfSwitchState(Module::MODE_IDLE); this->mod->setRfSwitchState(Module::MODE_IDLE);

View file

@ -463,7 +463,8 @@ class SX128x: public PhysicalLayer {
to discard current configuration and data buffer. Defaults to true. to discard current configuration and data buffer. Defaults to true.
\returns \ref status_codes \returns \ref status_codes
*/ */
int16_t sleep(bool retainConfig = true); int16_t sleep();
int16_t sleep(bool retainConfig);
/*! /*!
\brief Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). \brief Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator).