Skip to content

Commit

Permalink
bat
Browse files Browse the repository at this point in the history
  • Loading branch information
rav4kumar committed Nov 11, 2020
1 parent 55f8b8b commit 3db35cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions selfdrive/ui/paint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,13 @@ void bb_ui_draw_measures_left(UIState *s, int bb_x, int bb_y, int bb_w ) {
char val_str[16];
char uom_str[6];
NVGcolor val_color = nvgRGBA(255, 255, 255, 200);
if (s->scene.pa0 > 50) {
if (s->scene.bat > 50) {
val_color = nvgRGBA(255, 0, 0, 200);
} else if (s->scene.pa0 > 40) {
} else if (s->scene.bat > 40) {
val_color = nvgRGBA(255, 188, 3, 200);
}

snprintf(val_str, sizeof(val_str), "%2.0f°C", s->scene.pa0);
snprintf(val_str, sizeof(val_str), "%2.0f°C", s->scene.bat);
snprintf(uom_str, sizeof(uom_str), "");
bb_h +=bb_ui_draw_measure(s, val_str, uom_str, "BAT TEMP",
bb_rx, bb_ry, bb_uom_dx,
Expand Down

0 comments on commit 3db35cc

Please sign in to comment.