Skip to content

Commit

Permalink
Merge pull request #6488 from avsaase/avs-blink-watts-current-warning
Browse files Browse the repository at this point in the history
Blink osd power on current draw alarm
  • Loading branch information
digitalentity committed Jan 11, 2021
2 parents 1961e89 + 8d5d17f commit e5e8b41
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2037,6 +2037,11 @@ static bool osdDrawSingleElement(uint8_t item)
osdFormatCentiNumber(buff, getPower(), 0, 2, 0, 3);
buff[3] = SYM_WATT;
buff[4] = '\0';

uint8_t current_alarm = osdConfig()->current_alarm;
if ((current_alarm > 0) && ((getAmperage() / 100.0f) > current_alarm)) {
TEXT_ATTRIBUTES_ADD_BLINK(elemAttr);
}
break;
}

Expand Down

0 comments on commit e5e8b41

Please sign in to comment.