styles and syntax changes
This commit is contained in:
parent
7b6f1d075a
commit
3e1088f34a
8 changed files with 18 additions and 16 deletions
|
@ -132,6 +132,9 @@ forceLDRO KEYWORD2
|
|||
autoLDRO KEYWORD2
|
||||
getChipVersion KEYWORD2
|
||||
invertIQ KEYWORD2
|
||||
setOokThresholdType KEYWORD2
|
||||
setOokPeakThresholdDecrement KEYWORD2
|
||||
setOokFixedOrFloorThreshold KEYWORD2
|
||||
|
||||
# RF69-specific
|
||||
setAESKey KEYWORD2
|
||||
|
@ -139,6 +142,7 @@ enableAES KEYWORD2
|
|||
disableAES KEYWORD2
|
||||
getTemperature KEYWORD2
|
||||
setAmbientTemperature KEYWORD2
|
||||
setLnaTestBoost KEYWORD2
|
||||
|
||||
# CC1101-specific
|
||||
getLQI KEYWORD2
|
||||
|
|
|
@ -385,7 +385,7 @@ int16_t RF69::setOOK(bool enableOOK) {
|
|||
}
|
||||
|
||||
int16_t RF69::setOokThresholdType(uint8_t type) {
|
||||
if(type != RF69_OOK_THRESH_FIXED && type != RF69_OOK_THRESH_PEAK && RF69_OOK_THRESH_AVERAGE)
|
||||
if(type != RF69_OOK_THRESH_FIXED && type != RF69_OOK_THRESH_PEAK && type != RF69_OOK_THRESH_AVERAGE)
|
||||
return ERR_INVALID_OOK_RSSI_PEAK_TYPE;
|
||||
|
||||
int16_t state = ERR_NONE;
|
||||
|
@ -788,8 +788,9 @@ int16_t RF69::setEncoding(uint8_t encoding) {
|
|||
}
|
||||
|
||||
int16_t RF69::setLnaTestBoost(bool value) {
|
||||
if(value)
|
||||
return(_mod->SPIsetRegValue(RF69_REG_TEST_LNA, RF69_TEST_LNA_BOOST_HIGH, 7, 0));
|
||||
if(value) {
|
||||
return (_mod->SPIsetRegValue(RF69_REG_TEST_LNA, RF69_TEST_LNA_BOOST_HIGH, 7, 0));
|
||||
}
|
||||
|
||||
return(_mod->SPIsetRegValue(RF69_TEST_LNA_BOOST_NORMAL, RF69_TEST_LNA_BOOST_HIGH, 7, 0));
|
||||
}
|
||||
|
|
|
@ -330,7 +330,7 @@ int16_t SX1272::setDataShapingOOK(uint8_t sh) {
|
|||
return(state);
|
||||
}
|
||||
|
||||
float SX1272::getRSSI() {
|
||||
float SX1272::getRSSI(bool skip_activation) {
|
||||
if(getActiveModem() == SX127X_LORA) {
|
||||
// RSSI calculation uses different constant for low-frequency and high-frequency ports
|
||||
float lastPacketRSSI = -139 + _mod->SPIgetRegValue(SX127X_REG_PKT_RSSI_VALUE);
|
||||
|
|
|
@ -240,9 +240,11 @@ class SX1272: public SX127x {
|
|||
/*!
|
||||
\brief Gets recorded signal strength indicator of the latest received packet for LoRa modem, or current RSSI level for FSK modem.
|
||||
|
||||
\param skip_activation in OOK/FSK mode this function will put receiver in receive mode and then in standby. Make it TRUE if you don't want this behaviour.
|
||||
|
||||
\returns Last packet RSSI for LoRa modem, or current RSSI level for FSK modem.
|
||||
*/
|
||||
float getRSSI();
|
||||
float getRSSI(bool skip_activation = false);
|
||||
|
||||
/*!
|
||||
\brief Enables/disables CRC check of received packets.
|
||||
|
|
|
@ -315,12 +315,7 @@ int16_t SX1278::setOutputPower(int8_t power) {
|
|||
}
|
||||
|
||||
int16_t SX1278::setGain(uint8_t gain) {
|
||||
int16_t modem = getActiveModem();
|
||||
|
||||
// check active modem
|
||||
if(modem != SX127X_LORA && modem != SX127X_FSK_OOK) {
|
||||
return(ERR_WRONG_MODEM);
|
||||
}
|
||||
int16_t modem = getActiveModem();
|
||||
|
||||
// check allowed range
|
||||
if(gain > 6) {
|
||||
|
|
|
@ -248,7 +248,7 @@ class SX1278: public SX127x {
|
|||
/*!
|
||||
\brief Gets recorded signal strength indicator of the latest received packet for LoRa modem, or current RSSI level for FSK modem.
|
||||
|
||||
\param skip_activation in OOK/FSK mode this function will put receiver un receive mode and in standby. Make it TRUE if you don't want this behaviour.
|
||||
\param skip_activation in OOK/FSK mode this function will put receiver in receive mode and then in standby. Make it TRUE if you don't want this behaviour.
|
||||
|
||||
\returns Last packet RSSI for LoRa modem, or current RSSI level for FSK modem.
|
||||
*/
|
||||
|
|
|
@ -848,7 +848,7 @@ int16_t SX127x::setOokThresholdType(uint8_t type) {
|
|||
return(state);
|
||||
}
|
||||
|
||||
int16_t SX127x::setOokFixedOrFloorThreshold(short int value) {
|
||||
int16_t SX127x::setOokFixedOrFloorThreshold(uint8_t value) {
|
||||
// check active modem
|
||||
if(getActiveModem() != SX127X_FSK_OOK) {
|
||||
return(ERR_WRONG_MODEM);
|
||||
|
@ -860,7 +860,7 @@ int16_t SX127x::setOokFixedOrFloorThreshold(short int value) {
|
|||
return(state);
|
||||
}
|
||||
|
||||
int16_t SX127x::setOokPeakThresholdDecrement(short int value) {
|
||||
int16_t SX127x::setOokPeakThresholdDecrement(uint8_t value) {
|
||||
// check active modem
|
||||
if(getActiveModem() != SX127X_FSK_OOK) {
|
||||
return(ERR_WRONG_MODEM);
|
||||
|
|
|
@ -875,7 +875,7 @@ class SX127x: public PhysicalLayer {
|
|||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setOokPeakThresholdDecrement(short int value);
|
||||
int16_t setOokPeakThresholdDecrement(uint8_t value);
|
||||
|
||||
/*!
|
||||
\brief Fixed threshold for the Data Slicer in OOK mode
|
||||
|
@ -885,7 +885,7 @@ class SX127x: public PhysicalLayer {
|
|||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setOokFixedOrFloorThreshold(short int value);
|
||||
int16_t setOokFixedOrFloorThreshold(uint8_t value);
|
||||
|
||||
/*!
|
||||
\brief Query modem for the packet length of received payload.
|
||||
|
|
Loading…
Add table
Reference in a new issue