mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 00:03:45 +08:00
OnroadHud: update engageability and DM icons at 2Hz (#23134)
old-commit-hash: 5ab6bff67016585edbbec134123c54db2e471599
This commit is contained in:
@@ -110,12 +110,6 @@ static void update_state(UIState *s) {
|
||||
UIScene &scene = s->scene;
|
||||
s->running_time = 1e-9 * (nanos_since_boot() - sm["deviceState"].getDeviceState().getStartedMonoTime());
|
||||
|
||||
// update engageability and DM icons at 2Hz
|
||||
if (sm.frame % (UI_FREQ / 2) == 0) {
|
||||
auto cs = sm["controlsState"].getControlsState();
|
||||
scene.engageable = cs.getEngageable() || cs.getEnabled();
|
||||
scene.dm_active = sm["driverMonitoringState"].getDriverMonitoringState().getIsActiveMode();
|
||||
}
|
||||
if (sm.updated("modelV2") && s->vg) {
|
||||
update_model(s, sm["modelV2"].getModelV2());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user