|
|
@ -137,7 +137,10 @@ static void update_state(UIState *s) { |
|
|
|
if (sm.updated("pandaState")) { |
|
|
|
if (sm.updated("pandaState")) { |
|
|
|
auto pandaState = sm["pandaState"].getPandaState(); |
|
|
|
auto pandaState = sm["pandaState"].getPandaState(); |
|
|
|
scene.pandaType = pandaState.getPandaType(); |
|
|
|
scene.pandaType = pandaState.getPandaType(); |
|
|
|
scene.ignition = pandaState.getIgnitionLine() || pandaState.getIgnitionCan(); |
|
|
|
|
|
|
|
|
|
|
|
if (scene.pandaType != cereal::PandaState::PandaType::UNKNOWN) { |
|
|
|
|
|
|
|
scene.ignition = pandaState.getIgnitionLine() || pandaState.getIgnitionCan(); |
|
|
|
|
|
|
|
} |
|
|
|
} else if ((s->sm->frame - s->sm->rcv_frame("pandaState")) > 5*UI_FREQ) { |
|
|
|
} else if ((s->sm->frame - s->sm->rcv_frame("pandaState")) > 5*UI_FREQ) { |
|
|
|
scene.pandaType = cereal::PandaState::PandaType::UNKNOWN; |
|
|
|
scene.pandaType = cereal::PandaState::PandaType::UNKNOWN; |
|
|
|
} |
|
|
|
} |
|
|
|