don't check dMonitorState's frame if frontview is false (#19584)

old-commit-hash: 81369a65bb
commatwo_master
Dean Lee 5 years ago committed by GitHub
parent ba0a549f64
commit d731984ad9
  1. 2
      selfdrive/ui/ui.cc

@ -219,7 +219,7 @@ void update_sockets(UIState *s) {
scene.dmonitoring_state = sm["dMonitoringState"].getDMonitoringState();
scene.is_rhd = scene.dmonitoring_state.getIsRHD();
scene.frontview = scene.dmonitoring_state.getIsPreview();
} else if ((sm.frame - sm.rcv_frame("dMonitoringState")) > UI_FREQ/2) {
} else if (scene.frontview && (sm.frame - sm.rcv_frame("dMonitoringState")) > UI_FREQ/2) {
scene.frontview = false;
}
if (sm.updated("sensorEvents")) {

Loading…
Cancel
Save