Update SX127x.cpp

This commit is contained in:
Chris Terwilliger 2021-12-20 18:25:41 -05:00 committed by GitHub
parent 9f842acfe7
commit 2477d38727
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -948,6 +948,14 @@ int16_t SX127x::setOokPeakThresholdDecrement(uint8_t value) {
return(_mod->SPIsetRegValue(RADIOLIB_SX127X_REG_OOK_AVG, value, 7, 5, 5));
}
int16_t SX127x::setOokPeakThresholdStep(uint8_t value) {
// check active modem
if(getActiveModem() != RADIOLIB_SX127X_FSK_OOK) {
return(RADIOLIB_ERR_WRONG_MODEM);
}
return(_mod->SPIsetRegValue(RADIOLIB_SX127X_REG_OOK_PEAK, value, 2, 0, 5));
}
int16_t SX127x::enableBitSync() {
return(_mod->SPIsetRegValue(RADIOLIB_SX127X_REG_OOK_PEAK, RADIOLIB_SX127X_BIT_SYNC_ON, 5, 5, 5));
}