Changed return states, modified comments

1. Returned values now track the LMIC library
2. Adjusted comments for new return values, added notes on return
behavior (returns are driven by the rising/falling logic edge)
This commit is contained in:
Aaron Covrig 2020-06-15 12:36:59 -04:00
parent f0d1deba06
commit 80bff1be27
No known key found for this signature in database
GPG Key ID: 9784FE58FA0C17A9
2 changed files with 16 additions and 10 deletions

View File

@ -229,11 +229,14 @@ public:
/**
* @brief Disables a channel via the underlying LMIC library.
*
*.Note that it's return value is triggered via the *CHANGE* in state from
* *ENABLED->DISABLED*. A repeat call will lead to a return value of 'false'
* until the channel has been 'enabled' inbetween.
* This will fail to build if this component has not been configured
* (idf.py menuconfig / make menuconfig )
*
* @param channel unsigned integer indicating the channel number to disable
* @return true success
* @return true The channel was originally enabled and has now been disabled
* @return false otherwise
*/
bool disableChannel (uint8_t channel);
@ -247,7 +250,7 @@ public:
* (idf.py menuconfig / make menuconfig )
*
* @param band unsigned integer indicating which block of channels to enable
* @return true success
* @return true success, at least one of the channels in the sub-band has been enabled
* @return false otherwise
*/
bool enableSubBand(uint8_t band);
@ -255,11 +258,14 @@ public:
/**
* @brief Enables a channel via the underlying LMIC library.
*
*.Note that it's return value is triggered via the *CHANGE* in state from
* *DISABLED->ENABLED*. A repeat call will lead to a return value of 'false'
* until the channel has been 'disabled' inbetween.
* This will fail to build if this component has not been configured
* (idf.py menuconfig / make menuconfig )
*
* @param channel unsigned integer indicating which channel to enable
* @return true success
* @return true The channel was originally disabled and has now been enabled
* @return false otherwise
*/
bool enableChannel(uint8_t channel);
@ -274,7 +280,7 @@ public:
*
*
* @param band unsigned integer indicating which block of channels to disable
* @return true success
* @return true success, at least one of the channels in the sub-band was disabled
* @return false otherwise
*/
bool disableSubBand(uint8_t band);

View File

@ -264,11 +264,11 @@ void TheThingsNetwork::setRSSICal(int8_t rssiCal)
ttn_hal.rssiCal = rssiCal;
}
bool TheThingsNetwork::disableChannel(uint8_t channel){ return !LMIC_disableChannel( channel ); }
bool TheThingsNetwork::enableSubBand(uint8_t band){ return !LMIC_enableSubBand( band ); }
bool TheThingsNetwork::enableChannel(uint8_t channel){ return !LMIC_enableChannel( channel ); }
bool TheThingsNetwork::disableSubBand(uint8_t band){ return !LMIC_disableSubBand( band ); }
bool TheThingsNetwork::selectSubBand(uint8_t band){ return !LMIC_selectSubBand( band ); }
bool TheThingsNetwork::disableChannel(uint8_t channel){ return LMIC_disableChannel( channel ); }
bool TheThingsNetwork::enableSubBand(uint8_t band){ return LMIC_enableSubBand( band ); }
bool TheThingsNetwork::enableChannel(uint8_t channel){ return LMIC_enableChannel( channel ); }
bool TheThingsNetwork::disableSubBand(uint8_t band){ return LMIC_disableSubBand( band ); }
bool TheThingsNetwork::selectSubBand(uint8_t band){ return LMIC_selectSubBand( band ); }
// --- Callbacks ---