mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-21 06:13:49 +00:00
Merge pull request #869 from BeigeBox/fix/fm-rssi-offset
Fix FM RSSI reading tag byte instead of RSSI data
This commit is contained in:
commit
9cfd474607
1 changed files with 2 additions and 2 deletions
|
|
@ -108,8 +108,8 @@ bool CFMControl::writeModem(const unsigned char* data, unsigned int length)
|
|||
|
||||
if (data[0U] == TAG_RSSI) {
|
||||
uint16_t raw = 0U;
|
||||
raw |= (data[0U] << 8) & 0xFF00U;
|
||||
raw |= (data[1U] << 0) & 0x00FFU;
|
||||
raw |= (data[1U] << 8) & 0xFF00U;
|
||||
raw |= (data[2U] << 0) & 0x00FFU;
|
||||
|
||||
// Convert the raw RSSI to dBm
|
||||
int rssi = m_rssiMapper->interpolate(raw);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue