mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 22:23:56 +08:00
face icon reflects DM policy (#19842)
* send that
* draw icon based on whether active
* Update selfdrive/monitoring/dmonitoringd.py
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 88430f12f4
This commit is contained in:
2
cereal
2
cereal
Submodule cereal updated: 610fa77bc4...ab79999e5d
@@ -76,6 +76,7 @@ def dmonitoringd_thread(sm=None, pm=None):
|
||||
"isLowStd": driver_status.pose.low_std,
|
||||
"hiStdCount": driver_status.hi_stds,
|
||||
"isPreview": offroad,
|
||||
"isActiveMode": driver_status.active_monitoring_mode,
|
||||
}
|
||||
pm.send('dMonitoringState', dat)
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ static void ui_draw_vision_face(UIState *s) {
|
||||
const int face_size = 96;
|
||||
const int face_x = (s->scene.viz_rect.x + face_size + (bdr_s * 2));
|
||||
const int face_y = (s->scene.viz_rect.bottom() - footer_h + ((footer_h - face_size) / 2));
|
||||
ui_draw_circle_image(s, face_x, face_y, face_size, "driver_face", s->scene.dmonitoring_state.getFaceDetected());
|
||||
ui_draw_circle_image(s, face_x, face_y, face_size, "driver_face", s->scene.dmonitoring_state.getIsActiveMode());
|
||||
}
|
||||
|
||||
static void ui_draw_driver_view(UIState *s) {
|
||||
@@ -307,7 +307,7 @@ static void ui_draw_driver_view(UIState *s) {
|
||||
const int face_size = 85;
|
||||
const int icon_x = is_rhd ? rect.right() - face_size - bdr_s * 2 : rect.x + face_size + bdr_s * 2;
|
||||
const int icon_y = rect.bottom() - face_size - bdr_s * 2.5;
|
||||
ui_draw_circle_image(s, icon_x, icon_y, face_size, "driver_face", face_detected);
|
||||
ui_draw_circle_image(s, icon_x, icon_y, face_size, "driver_face", s->scene.dmonitoring_state.getIsActiveMode());
|
||||
}
|
||||
|
||||
static void ui_draw_vision_header(UIState *s) {
|
||||
|
||||
Reference in New Issue
Block a user