Skip to content

Commit

Permalink
Merge pull request #4874 from iNavFlight/agh_fix_osd_remaining_capacity
Browse files Browse the repository at this point in the history
[OSD] Fix position of the symbol in remaining capacity indicator
  • Loading branch information
giacomo892 committed Jun 26, 2019
2 parents 8c269e9 + 7cd8ceb commit 2384e55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1294,8 +1294,8 @@ static bool osdDrawSingleElement(uint8_t item)
else // currentBatteryProfile->capacity.unit == BAT_CAPACITY_UNIT_MWH
osdFormatCentiNumber(buff + 1, getBatteryRemainingCapacity() / 10, 0, 2, 0, 3);

buff[3] = currentBatteryProfile->capacity.unit == BAT_CAPACITY_UNIT_MAH ? SYM_MAH : SYM_WH;
buff[4] = '\0';
buff[4] = currentBatteryProfile->capacity.unit == BAT_CAPACITY_UNIT_MAH ? SYM_MAH : SYM_WH;
buff[5] = '\0';

if ((getBatteryState() != BATTERY_NOT_PRESENT) && batteryUsesCapacityThresholds() && (getBatteryRemainingCapacity() <= currentBatteryProfile->capacity.warning - currentBatteryProfile->capacity.critical))
TEXT_ATTRIBUTES_ADD_BLINK(elemAttr);
Expand Down

0 comments on commit 2384e55

Please sign in to comment.