* turn speed (text) to yellow when braking.

This commit is contained in:
dragonpilot
2020-03-16 13:52:48 +10:00
parent d1bfc252f3
commit 4df20acf65
3 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -671,7 +671,7 @@ static void ui_draw_vision_speed(UIState *s) {
nvgFontFace(s->vg, "sans-regular");
nvgFontSize(s->vg, 36*2.5);
nvgFillColor(s->vg, nvgRGBA(255, 255, 255, 200));
nvgFillColor(s->vg, s->scene.brakeLights? COLOR_YELLOW : nvgRGBA(255, 255, 255, 200));
if (s->is_metric) {
nvgText(s->vg, viz_speed_x+viz_speed_w/2, 320, "kph", NULL);
+1
View File
@@ -548,6 +548,7 @@ void handle_message(UIState *s, Message * msg) {
}
s->scene.leftBlinker = datad.leftBlinker;
s->scene.rightBlinker = datad.rightBlinker;
s->scene.brakeLights = datad.brakeLights;
}
capn_free(&ctx);
}
+1
View File
@@ -166,6 +166,7 @@ typedef struct UIScene {
// for blinker, from kegman
bool leftBlinker;
bool rightBlinker;
bool brakeLights;
int blinker_blinkingrate;
} UIScene;