mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-09-30 11:23:44 +08:00
* turn speed (text) to yellow when braking.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -166,6 +166,7 @@ typedef struct UIScene {
|
||||
// for blinker, from kegman
|
||||
bool leftBlinker;
|
||||
bool rightBlinker;
|
||||
bool brakeLights;
|
||||
int blinker_blinkingrate;
|
||||
} UIScene;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user