Skip to content

Commit

Permalink
v1.5.1 - setPowerLevelDBm() fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LowPowerLab committed Feb 7, 2022
1 parent 01f7002 commit 6469dac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions RFM69.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,13 @@ int8_t RFM69::setPowerDBm(int8_t dBm) {
else if (dBm>20) dBm=20;

//map dBm to _powerLevel according to implementation in setPowerLevel()
if (dBm<17) setPowerLevel(2+dBm);
//else if (dBm<16) setPowerLevel(4+dBm);
if (dBm<12) setPowerLevel(2+dBm);
else if (dBm<16) setPowerLevel(4+dBm);
else setPowerLevel(3+dBm);
} else { //W/CW
if (dBm<-18) dBm=-18;
else if (dBm>13) dBm=13;
setPowerLevel(18+dBm);
}
return dBm;
}
Expand Down Expand Up @@ -947,7 +948,7 @@ void RFM69::set300KBPS() {
writeReg(0x06, 0x33); //REG_FDEVLSB: 300khz (0x1333)
writeReg(0x29, 240); //set REG_RSSITHRESH to -120dBm
writeReg(0x37, 0b10010000); //DC=WHITENING, CRCAUTOOFF=0
// ** DC: 00 none, 01 manchester, 10, whitening
// ^^->DC: 00=none, 01=manchester, 10=whitening
}

//=============================================================================
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "RFM69",
"version": "1.5.0",
"version": "1.5.1",
"keywords": "rf, radio, wireless, spi",
"description": "RFM69 library for RFM69W, RFM69HW, RFM69CW, RFM69HCW (semtech SX1231, SX1231H)",
"repository":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=RFM69_LowPowerLab
version=1.5.0
version=1.5.1
author=LowPowerLab <lowpowerlab.com>
maintainer=Felix Rusu <[email protected]>
sentence=Simple Arduino library for RFM69/SX1231h based radio module transceivers
Expand Down

0 comments on commit 6469dac

Please sign in to comment.