From 2f16349c4cffe592d9b97a37ded37e8215ed8892 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Fri, 3 Jul 2020 12:30:47 -0700 Subject: [PATCH] fix hardcoded frequencies in UI --- selfdrive/ui/ui.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index 1e39a9fab6..982bc976f7 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -40,8 +40,8 @@ static void enable_event_processing(bool yes) { static void set_awake(UIState *s, bool awake) { #ifdef QCOM if (awake) { - // 30 second timeout at 30 fps - s->awake_timeout = 30*30; + // 30 second timeout + s->awake_timeout = 30*UI_FREQ; } if (s->awake != awake) { s->awake = awake; @@ -395,7 +395,7 @@ void handle_message(UIState *s, SubMaster &sm) { } if (sm.updated("health")) { scene.hwType = sm["health"].getHealth().getHwType(); - s->hardware_timeout = 5*30; // 5 seconds at 30 fps + s->hardware_timeout = 5*UI_FREQ; // 5 seconds } if (sm.updated("driverState")) { scene.driver_state = sm["driverState"].getDriverState();