mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
Cleaned up handling of RSSI, added resetting to 0 for RSSI over MSP.
This commit is contained in:
parent
0c84506336
commit
c6b88e5d04
13 changed files with 67 additions and 46 deletions
|
@ -323,7 +323,7 @@ static void osdDrawSingleElement(uint8_t item)
|
|||
switch (item) {
|
||||
case OSD_RSSI_VALUE:
|
||||
{
|
||||
uint16_t osdRssi = rssi * 100 / 1024; // change range
|
||||
uint16_t osdRssi = getRssi() * 100 / 1024; // change range
|
||||
if (osdRssi >= 100)
|
||||
osdRssi = 99;
|
||||
|
||||
|
@ -1148,7 +1148,7 @@ STATIC_UNIT_TESTED void osdRefresh(timeUs_t currentTimeUs)
|
|||
armState = ARMING_FLAG(ARMED);
|
||||
}
|
||||
|
||||
statRssi = scaleRange(rssi, 0, 1024, 0, 100);
|
||||
statRssi = scaleRange(getRssi(), 0, 1024, 0, 100);
|
||||
|
||||
osdUpdateStats();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue