ui update_sockets refactor (#20625)

* separate updates

* update

* no if

* no return

* fix
pull/20668/head
iejMac 2021-04-12 16:08:38 -07:00 committed by GitHub
parent 11cc0b52ce
commit e6d210d526
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -2,7 +2,7 @@ import os
Import('qt_env', 'arch', 'common', 'messaging', 'gpucommon', 'visionipc',
'cereal', 'transformations')
base_libs = [gpucommon, common, cereal, messaging, visionipc, transformations, 'zmq',
base_libs = [gpucommon, common, messaging, cereal, visionipc, transformations, 'zmq',
'capnp', 'kj', 'm', 'OpenCL', 'ssl', 'crypto', 'pthread'] + qt_env["LIBS"]
if arch == 'aarch64':
base_libs += ['log', 'utils', 'gui', 'ui', 'CB', 'gsl', 'adreno_utils', 'cutils', 'uuid']

View File

@ -140,9 +140,13 @@ static void update_model(UIState *s, const cereal::ModelDataV2::Reader &model) {
update_line_data(s, model_position, 0.5, 1.22, &scene.track_vertices, max_idx);
}
static void update_sockets(UIState *s) {
static void update_sockets(UIState *s){
SubMaster &sm = *(s->sm);
sm.update(0);
}
static void update_state(UIState *s) {
SubMaster &sm = *(s->sm);
if (sm.update(0) == 0) return;
UIScene &scene = s->scene;
if (scene.started && sm.updated("controlsState")) {
@ -346,6 +350,7 @@ static void update_status(UIState *s) {
void ui_update(UIState *s) {
update_params(s);
update_sockets(s);
update_state(s);
update_status(s);
update_alert(s);
update_vision(s);