mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-09-30 19:33:42 +08:00
Always keep display on with ignition (#2138)
* keep display on with ignition * fix typo Co-authored-by: Willem Melching <willem.melching@gmail.com>
This commit is contained in:
@@ -222,7 +222,7 @@ int main(int argc, char* argv[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// manage wakefulness
|
// manage wakefulness
|
||||||
if (s->started) {
|
if (s->started || s->ignition) {
|
||||||
set_awake(s, true);
|
set_awake(s, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -199,7 +199,9 @@ void update_sockets(UIState *s) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sm.updated("health")) {
|
if (sm.updated("health")) {
|
||||||
scene.hwType = sm["health"].getHealth().getHwType();
|
auto health = sm["health"].getHealth();
|
||||||
|
scene.hwType = health.getHwType();
|
||||||
|
s->ignition = health.getIgnitionLine() || health.getIgnitionCan();
|
||||||
} else if ((s->sm->frame - s->sm->rcv_frame("health")) > 5*UI_FREQ) {
|
} else if ((s->sm->frame - s->sm->rcv_frame("health")) > 5*UI_FREQ) {
|
||||||
scene.hwType = cereal::HealthData::HwType::UNKNOWN;
|
scene.hwType = cereal::HealthData::HwType::UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,6 +200,7 @@ typedef struct UIState {
|
|||||||
std::atomic<float> light_sensor;
|
std::atomic<float> light_sensor;
|
||||||
|
|
||||||
bool started;
|
bool started;
|
||||||
|
bool ignition;
|
||||||
bool is_metric;
|
bool is_metric;
|
||||||
bool longitudinal_control;
|
bool longitudinal_control;
|
||||||
uint64_t last_athena_ping;
|
uint64_t last_athena_ping;
|
||||||
|
|||||||
Reference in New Issue
Block a user