Skip to content

Commit

Permalink
Merge pull request #1 from osmanovv/radiolib-sync-upstream
Browse files Browse the repository at this point in the history
Radiolib sync upstream
  • Loading branch information
osmanovv authored Sep 3, 2021
2 parents 8a7a3ec + f40bd07 commit e7fa0ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/mesh/RadioLibRF95.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

RadioLibRF95::RadioLibRF95(Module *mod) : SX1278(mod) {}

int16_t RadioLibRF95::begin(float freq, float bw, uint8_t sf, uint8_t cr, uint8_t syncWord, int8_t power, uint8_t currentLimit,
int16_t RadioLibRF95::begin(float freq, float bw, uint8_t sf, uint8_t cr, uint8_t syncWord, int8_t power,
uint16_t preambleLength, uint8_t gain)
{
// execute common part
int16_t state = SX127x::begin(RF95_CHIP_VERSION, syncWord, currentLimit, preambleLength);
int16_t state = SX127x::begin(RF95_CHIP_VERSION, syncWord, preambleLength);
if (state != ERR_NONE)
state = SX127x::begin(RF95_ALT_VERSION, syncWord, currentLimit, preambleLength);
state = SX127x::begin(RF95_ALT_VERSION, syncWord, preambleLength);
RADIOLIB_ASSERT(state);

// configure settings not accessible by API
Expand Down
5 changes: 1 addition & 4 deletions src/mesh/RadioLibRF95.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ class RadioLibRF95: public SX1278 {
\param power Transmission output power in dBm. Allowed values range from 2 to 17 dBm.
\param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA.
Set to 0 to disable OCP (not recommended).
\param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number.
Allowed values range from 6 to 65535.
Expand All @@ -46,7 +43,7 @@ class RadioLibRF95: public SX1278 {
\returns \ref status_codes
*/
int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 17, uint8_t currentLimit = 100, uint16_t preambleLength = 8, uint8_t gain = 0);
int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 17, uint16_t preambleLength = 8, uint8_t gain = 0);

// configuration methods

Expand Down
2 changes: 1 addition & 1 deletion src/mesh/SX1262Interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ bool SX1262Interface::init()

limitPower();

int res = lora.begin(freq, bw, sf, cr, syncWord, power, currentLimit, preambleLength, tcxoVoltage, useRegulatorLDO);
int res = lora.begin(freq, bw, sf, cr, syncWord, power, preambleLength, tcxoVoltage, useRegulatorLDO);
DEBUG_MSG("SX1262 init result %d\n", res);

#ifdef SX1262_TXEN
Expand Down

0 comments on commit e7fa0ae

Please sign in to comment.