Onroad compass
Added toggle for an onroad compass.
This commit is contained in:
@@ -256,6 +256,12 @@ static void update_state(UIState *s) {
|
||||
}
|
||||
if (sm.updated("liveLocationKalman")) {
|
||||
auto liveLocationKalman = sm["liveLocationKalman"].getLiveLocationKalman();
|
||||
if (scene.compass) {
|
||||
auto orientation = liveLocationKalman.getCalibratedOrientationNED();
|
||||
if (orientation.getValid()) {
|
||||
scene.bearing_deg = RAD2DEG(orientation.getValue()[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sm.updated("wideRoadCameraState")) {
|
||||
auto cam_state = sm["wideRoadCameraState"].getWideRoadCameraState();
|
||||
@@ -281,6 +287,7 @@ void ui_update_params(UIState *s) {
|
||||
|
||||
scene.always_on_lateral = params.getBool("AlwaysOnLateral");
|
||||
scene.camera_view = params.getInt("CameraView");
|
||||
scene.compass = params.getBool("Compass");
|
||||
|
||||
scene.conditional_experimental = params.getBool("ConditionalExperimental");
|
||||
scene.conditional_speed = params.getInt("CESpeed");
|
||||
|
||||
Reference in New Issue
Block a user