Skip to content

Commit

Permalink
Fix #50 - RSSI percent greater than 99
Browse files Browse the repository at this point in the history
  • Loading branch information
danarrib committed May 12, 2021
1 parent 778c1a6 commit 514cac3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ESP32-Modem/ESP32-Modem.ino
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ void msp2_get_inav_analog() {
uavstatus.rssiPercent = inavdata.rssi / 10.0f;
uavstatus.fuelPercent = inavdata.batteryPercentage;

if(uavstatus.rssiPercent > 99)
uavstatus.rssiPercent = 99;

uint8_t cellCount = inavdata.batteryStats >> 4;
if(cellCount==0)
cellCount = 1;
Expand Down

0 comments on commit 514cac3

Please sign in to comment.