From ed4fc84a70f59e61cce98543da381b77a47fad18 Mon Sep 17 00:00:00 2001 From: jgromes Date: Sun, 5 Mar 2023 19:30:20 +0100 Subject: [PATCH] [SX126x] Fixed calibration order (#689) (CI_BUILD_ALL) --- src/modules/SX126x/SX126x.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/SX126x/SX126x.cpp b/src/modules/SX126x/SX126x.cpp index ae5cd09c..f78b9c1e 100644 --- a/src/modules/SX126x/SX126x.cpp +++ b/src/modules/SX126x/SX126x.cpp @@ -53,16 +53,16 @@ int16_t SX126x::begin(uint8_t cr, uint8_t syncWord, uint16_t preambleLength, flo state = standby(); RADIOLIB_ASSERT(state); - // configure settings not accessible by API - state = config(RADIOLIB_SX126X_PACKET_TYPE_LORA); - RADIOLIB_ASSERT(state); - // set TCXO control, if requested if(!this->XTAL && tcxoVoltage > 0.0) { state = setTCXO(tcxoVoltage); RADIOLIB_ASSERT(state); } + // configure settings not accessible by API + state = config(RADIOLIB_SX126X_PACKET_TYPE_LORA); + RADIOLIB_ASSERT(state); + // configure publicly accessible settings state = setCodingRate(cr); RADIOLIB_ASSERT(state); @@ -127,16 +127,16 @@ int16_t SX126x::beginFSK(float br, float freqDev, float rxBw, uint16_t preambleL state = standby(); RADIOLIB_ASSERT(state); - // configure settings not accessible by API - state = config(RADIOLIB_SX126X_PACKET_TYPE_GFSK); - RADIOLIB_ASSERT(state); - // set TCXO control, if requested if(!this->XTAL && tcxoVoltage > 0.0) { state = setTCXO(tcxoVoltage); RADIOLIB_ASSERT(state); } + // configure settings not accessible by API + state = config(RADIOLIB_SX126X_PACKET_TYPE_GFSK); + RADIOLIB_ASSERT(state); + // configure publicly accessible settings state = setBitRate(br); RADIOLIB_ASSERT(state);