mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-06 05:52:12 +08:00
better alert when controls takes too long to start
old-commit-hash: f8ce6502a9d66008d3a90b521707c4d1cbc51756
This commit is contained in:
+5
-4
@@ -514,7 +514,6 @@ static void ui_update(UIState *s) {
|
||||
|
||||
s->vision_connect_firstrun = false;
|
||||
|
||||
s->controls_timeout = 6 * UI_FREQ;
|
||||
s->alert_blinking_alpha = 1.0;
|
||||
s->alert_blinked = false;
|
||||
}
|
||||
@@ -813,6 +812,10 @@ int main(int argc, char* argv[]) {
|
||||
if (!s->started) {
|
||||
// always process events offroad
|
||||
check_messages(s);
|
||||
|
||||
if (s->started) {
|
||||
s->controls_timeout = 5 * UI_FREQ;
|
||||
}
|
||||
} else {
|
||||
set_awake(s, true);
|
||||
// Car started, fetch a new rgb image from ipc
|
||||
@@ -860,11 +863,9 @@ int main(int argc, char* argv[]) {
|
||||
} else if (s->started) {
|
||||
if (!s->controls_seen) {
|
||||
// car is started, but controlsState hasn't been seen at all
|
||||
LOGE("Controls failed to start");
|
||||
s->scene.alert_text1 = "openpilot Unavailable";
|
||||
s->scene.alert_text2 = "Controls Failed to Start";
|
||||
s->scene.alert_text2 = "Waiting for controls to start";
|
||||
s->scene.alert_size = cereal::ControlsState::AlertSize::MID;
|
||||
update_status(s, STATUS_WARNING);
|
||||
} else {
|
||||
// car is started, but controls is lagging or died
|
||||
LOGE("Controls unresponsive");
|
||||
|
||||
Reference in New Issue
Block a user