[SX127x] Ignore SPI readout mismatch in FSK RX (#276)
This commit is contained in:
parent
d49a107c7e
commit
e27c3ddef5
1 changed files with 6 additions and 1 deletions
|
@ -1178,7 +1178,12 @@ bool SX127x::findChip(uint8_t ver) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t SX127x::setMode(uint8_t mode) {
|
int16_t SX127x::setMode(uint8_t mode) {
|
||||||
return(_mod->SPIsetRegValue(SX127X_REG_OP_MODE, mode, 2, 0, 5));
|
uint8_t checkMask = 0xFF;
|
||||||
|
if((getActiveModem() == SX127X_FSK_OOK) && (mode == SX127X_RX)) {
|
||||||
|
// disable checking of RX bit in FSK RX mode, as it sometimes seem to fail (#276)
|
||||||
|
checkMask = 0xFE;
|
||||||
|
}
|
||||||
|
return(_mod->SPIsetRegValue(SX127X_REG_OP_MODE, mode, 2, 0, 5, checkMask));
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t SX127x::getActiveModem() {
|
int16_t SX127x::getActiveModem() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue