mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-05 13:32:05 +08:00
fix camera malfunction ui timeout
old-commit-hash: 54c6931b5cbf1bc0e064f9a3c45d012ffcfbfdea
This commit is contained in:
+2
-1
@@ -285,7 +285,8 @@ void ui_update(UIState *s) {
|
||||
|
||||
const uint64_t frame_pkt = (s->sm)->rcv_frame("frame");
|
||||
const uint64_t frame_delayed = (s->sm)->frame - frame_pkt;
|
||||
if ((frame_pkt > s->started_frame && frame_delayed > 5 * UI_FREQ) || frame_delayed > 35 * UI_FREQ) {
|
||||
const uint64_t since_started = (s->sm)->frame - s->started_frame;
|
||||
if ((frame_pkt > s->started_frame || since_started > 15*UI_FREQ) && frame_delayed > 5*UI_FREQ) {
|
||||
// controls is fine, but rear camera is lagging or died
|
||||
s->scene.alert_text1 = "Camera Malfunction";
|
||||
s->scene.alert_text2 = "Contact Support";
|
||||
|
||||
Reference in New Issue
Block a user