[SX127x] Set OOK parameter before setting the bitrate to avoid reading undefined variable
This commit is contained in:
parent
16073f05ea
commit
4426c9174d
1 changed files with 4 additions and 4 deletions
|
@ -74,6 +74,10 @@ int16_t SX127x::beginFSK(uint8_t chipVersion, float br, float freqDev, float rxB
|
|||
RADIOLIB_ASSERT(state);
|
||||
}
|
||||
|
||||
// enable/disable OOK
|
||||
state = setOOK(enableOOK);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// set bit rate
|
||||
state = SX127x::setBitRate(br);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
@ -103,10 +107,6 @@ int16_t SX127x::beginFSK(uint8_t chipVersion, float br, float freqDev, float rxB
|
|||
state = disableAddressFiltering();
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// enable/disable OOK
|
||||
state = setOOK(enableOOK);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// set default RSSI measurement config
|
||||
state = setRSSIConfig(2);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
|
Loading…
Add table
Reference in a new issue