Rotating steering wheel in onroad UI

Added toggle to rotate the steering wheel in the top right corner of the onroad UI.
This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent a37d8e5830
commit 0fbbae8471
7 changed files with 38 additions and 3 deletions

View File

@@ -222,6 +222,9 @@ static void update_state(UIState *s) {
scene.turn_signal_left = carState.getLeftBlinker();
scene.turn_signal_right = carState.getRightBlinker();
}
if (scene.rotating_wheel) {
scene.steering_angle_deg = carState.getSteeringAngleDeg();
}
if (scene.driver_camera) {
scene.show_driver_camera = carState.getGearShifter() == cereal::CarState::GearShifter::REVERSE;
}
@@ -316,6 +319,7 @@ void ui_update_params(UIState *s) {
scene.driver_camera = params.getBool("DriverCamera");
scene.experimental_mode_via_press = params.getBool("ExperimentalModeViaPress");
scene.mute_dm = params.getBool("FireTheBabysitter") && params.getBool("MuteDM");
scene.rotating_wheel = params.getBool("RotatingWheel");
scene.screen_brightness = params.getInt("ScreenBrightness");
scene.wheel_icon = params.getInt("WheelIcon");
}