pull/29068/head
Shane Smiskol 2 years ago
parent 30d7e16bb7
commit 452be95a91
  1. 6
      selfdrive/ui/qt/onroad.cc
  2. 4
      selfdrive/ui/qt/onroad.h

@ -306,7 +306,7 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
setProperty("speed", cur_speed); setProperty("speed", cur_speed);
setProperty("setSpeed", set_speed); setProperty("setSpeed", set_speed);
setProperty("speedUnit", s.scene.is_metric ? tr("km/h") : tr("mph")); setProperty("speedUnit", s.scene.is_metric ? tr("km/h") : tr("mph"));
setProperty("hideLowerIcons", (cs.getAlertSize() != cereal::ControlsState::AlertSize::NONE)); setProperty("hideBottomIcons", (cs.getAlertSize() != cereal::ControlsState::AlertSize::NONE));
setProperty("status", s.status); setProperty("status", s.status);
// update engageability/experimental mode button // update engageability/experimental mode button
@ -314,7 +314,7 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
// hide map settings button for alerts // hide map settings button for alerts
if (map_settings_btn->isEnabled()) { if (map_settings_btn->isEnabled()) {
map_settings_btn->setVisible(!hideLowerIcons); map_settings_btn->setVisible(!hideBottomIcons);
} }
// update DM icon // update DM icon
@ -683,7 +683,7 @@ void AnnotatedCameraWidget::paintGL() {
} }
// DMoji // DMoji
if (!hideLowerIcons && (sm.rcv_frame("driverStateV2") > s->scene.started_frame)) { if (!hideBottomIcons && (sm.rcv_frame("driverStateV2") > s->scene.started_frame)) {
update_dmonitoring(s, sm["driverStateV2"].getDriverStateV2(), dm_fade_state, rightHandDM); update_dmonitoring(s, sm["driverStateV2"].getDriverStateV2(), dm_fade_state, rightHandDM);
drawDriverState(painter, s); drawDriverState(painter, s);
} }

@ -73,7 +73,7 @@ class AnnotatedCameraWidget : public CameraWidget {
Q_PROPERTY(bool is_metric MEMBER is_metric); Q_PROPERTY(bool is_metric MEMBER is_metric);
Q_PROPERTY(bool dmActive MEMBER dmActive); Q_PROPERTY(bool dmActive MEMBER dmActive);
Q_PROPERTY(bool hideLowerIcons MEMBER hideLowerIcons); Q_PROPERTY(bool hideBottomIcons MEMBER hideBottomIcons);
Q_PROPERTY(bool rightHandDM MEMBER rightHandDM); Q_PROPERTY(bool rightHandDM MEMBER rightHandDM);
Q_PROPERTY(int status MEMBER status); Q_PROPERTY(int status MEMBER status);
@ -96,7 +96,7 @@ private:
bool is_cruise_set = false; bool is_cruise_set = false;
bool is_metric = false; bool is_metric = false;
bool dmActive = false; bool dmActive = false;
bool hideLowerIcons = false; bool hideBottomIcons = false;
bool rightHandDM = false; bool rightHandDM = false;
float dm_fade_state = 1.0; float dm_fade_state = 1.0;
bool has_us_speed_limit = false; bool has_us_speed_limit = false;

Loading…
Cancel
Save