SX127x::setOokFixedOrFloorThreshold

pull/274/head
Christophe Painchaud 2021-03-17 00:56:25 +01:00
rodzic 2a01f0785e
commit f4fac4c09e
2 zmienionych plików z 23 dodań i 1 usunięć

Wyświetl plik

@ -844,10 +844,23 @@ int16_t SX127x::setOokThresholdType(uint8_t type) {
int16_t state = ERR_NONE;
state = _mod->SPIsetRegValue(SX127X_REG_OOK_PEAK, type, 4, 3, 5);
return(state);
}
int16_t SX127x::setOokFixedOrFloorThreshold(short int value) {
// check active modem
if(getActiveModem() != SX127X_FSK_OOK) {
return(ERR_WRONG_MODEM);
}
int16_t state = ERR_NONE;
state = _mod->SPIsetRegValue(SX127X_REG_OOK_FIX, value, 7, 0, 5);
return(state);
}
int16_t SX127x::setOOK(bool enableOOK) {
// check active modem

Wyświetl plik

@ -868,6 +868,15 @@ class SX127x: public PhysicalLayer {
*/
int16_t setOokThresholdType(uint8_t type);
/*!
\brief Fixed threshold for the Data Slicer in OOK mode
Floor threshold for the Data Slicer in OOK when Peak mode is used
\param value (in DB)
\returns \ref status_codes
*/
int16_t setOokFixedOrFloorThreshold(short int value);
/*!
\brief Query modem for the packet length of received payload.