mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-20 21:42:05 +08:00
offroad/ui: Fix layout bugs (offroad drawing on top, settings open after drive)
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9b19831e278e17ccecd1af02d8cab1f523dc5d4bb5056c5c7aa1c05d9157f515
|
||||
size 13691048
|
||||
oid sha256:b6d3698d82870268439609527eea6b350dc65f5ddacbb12120ba2ef5351c2dc4
|
||||
size 13691663
|
||||
|
||||
+1
-1
Submodule apks updated: 25e8e25624...e4bf49bc65
@@ -203,6 +203,15 @@ static int read_param_uint64_timeout(uint64_t* dest, const char* param_name, int
|
||||
}
|
||||
}
|
||||
|
||||
static void update_offroad_layout_timeout(UIState *s, int* timeout) {
|
||||
if (*timeout > 0) {
|
||||
(*timeout)--;
|
||||
} else {
|
||||
update_offroad_layout_state(s);
|
||||
*timeout = 2 * UI_FREQ;
|
||||
}
|
||||
}
|
||||
|
||||
static void ui_init(UIState *s) {
|
||||
memset(s, 0, sizeof(UIState));
|
||||
|
||||
@@ -1072,6 +1081,8 @@ int main(int argc, char* argv[]) {
|
||||
} else {
|
||||
s->scene.athenaStatus = NET_ERROR;
|
||||
}
|
||||
update_offroad_layout_timeout(s, &s->offroad_layout_timeout);
|
||||
|
||||
pthread_mutex_unlock(&s->lock);
|
||||
|
||||
// the bg thread needs to be scheduled, so the main thread needs time without the lock
|
||||
|
||||
@@ -264,6 +264,7 @@ typedef struct UIState {
|
||||
int limit_set_speed_timeout;
|
||||
int hardware_timeout;
|
||||
int last_athena_ping_timeout;
|
||||
int offroad_layout_timeout;
|
||||
|
||||
bool controls_seen;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user