mirror of
https://github.com/liberatedsystems/RNode_Firmware_CE.git
synced 2025-06-28 16:27:10 -04:00
Revert to SX127X TX power value being read directly with an offset #39
This commit is contained in:
parent
44e69f910a
commit
59f6224c09
1 changed files with 1 additions and 2 deletions
|
@ -1385,10 +1385,9 @@ void sx127x::setTxPower(int level, int outputPin) {
|
||||||
writeRegister(REG_PA_DAC_7X, 0x84);
|
writeRegister(REG_PA_DAC_7X, 0x84);
|
||||||
writeRegister(REG_PA_CONFIG_7X, PA_BOOST_7X | (level - 2));
|
writeRegister(REG_PA_CONFIG_7X, PA_BOOST_7X | (level - 2));
|
||||||
}
|
}
|
||||||
_txp = level;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int8_t sx127x::getTxPower() { return _txp; }
|
int8_t sx127x::getTxPower() { byte txp = readRegister(REG_PA_CONFIG_7X); return ((int8_t)txp) - 126; } // temporary fix for SX127X power weirdness
|
||||||
|
|
||||||
void sx127x::setFrequency(uint32_t frequency) {
|
void sx127x::setFrequency(uint32_t frequency) {
|
||||||
_frequency = frequency;
|
_frequency = frequency;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue