kopia lustrzana https://github.com/jgromes/RadioLib
Merge pull request #117 from 4m1g0/fix_undefined_ook
[SX127x] Set OOK parameter before setting the bitrate to avoid reading undefined variablepull/119/head
commit
46ee48f47b
|
@ -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);
|
||||
|
|
Ładowanie…
Reference in New Issue