[CC1101] Fix getRSSI data source

This commit is contained in:
Jack Hance 2024-06-11 20:46:32 -05:00
parent e855636384
commit 1ea1a703a5
2 changed files with 3 additions and 3 deletions

View file

@ -1023,7 +1023,7 @@ int16_t CC1101::directMode(bool sync) {
SPIsendCommand(RADIOLIB_CC1101_CMD_IDLE);
int16_t state = 0;
this->directModeEnabled = sync;
this->directModeEnabled = true;
if(sync) {
// set GDO0 and GDO2 mapping
state |= SPIsetRegValue(RADIOLIB_CC1101_REG_IOCFG0, RADIOLIB_CC1101_GDOX_SERIAL_CLOCK , 5, 0);

View file

@ -845,7 +845,7 @@ class CC1101: public PhysicalLayer {
/*!
\brief Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.
In asynchronous direct mode, returns the current RSSI level.
In direct or asynchronous direct mode, returns the current RSSI level.
\returns RSSI in dBm.
*/
float getRSSI() override;
@ -1003,7 +1003,7 @@ class CC1101: public PhysicalLayer {
bool promiscuous = false;
bool crcOn = true;
bool directModeEnabled = true;
bool directModeEnabled = false;
int8_t power = RADIOLIB_CC1101_DEFAULT_POWER;