ui update_sockets refactor (#20625)
* separate updates * update * no if * no return * fixpull/20668/head
parent
11cc0b52ce
commit
e6d210d526
|
@ -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']
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue