Visuals - Quality of Life - Camera View
Choose your preferred camera view for the onroad UI. This is purely a visual change and doesn't impact how openpilot drives.
This commit is contained in:
parent
3533d59547
commit
0ce100c7ce
@ -1219,7 +1219,7 @@ void AnnotatedCameraWidget::paintGL() {
|
|||||||
|
|
||||||
// Wide or narrow cam dependent on speed
|
// Wide or narrow cam dependent on speed
|
||||||
bool has_wide_cam = available_streams.count(VISION_STREAM_WIDE_ROAD);
|
bool has_wide_cam = available_streams.count(VISION_STREAM_WIDE_ROAD);
|
||||||
if (has_wide_cam) {
|
if (has_wide_cam && cameraView == 0) {
|
||||||
if ((v_ego < 10) || available_streams.size() == 1) {
|
if ((v_ego < 10) || available_streams.size() == 1) {
|
||||||
wide_cam_requested = true;
|
wide_cam_requested = true;
|
||||||
} else if (v_ego > 15) {
|
} else if (v_ego > 15) {
|
||||||
@ -1229,7 +1229,9 @@ void AnnotatedCameraWidget::paintGL() {
|
|||||||
// for replay of old routes, never go to widecam
|
// for replay of old routes, never go to widecam
|
||||||
wide_cam_requested = wide_cam_requested && s->scene.calibration_wide_valid;
|
wide_cam_requested = wide_cam_requested && s->scene.calibration_wide_valid;
|
||||||
}
|
}
|
||||||
CameraWidget::setStreamType(wide_cam_requested ? VISION_STREAM_WIDE_ROAD : VISION_STREAM_ROAD);
|
CameraWidget::setStreamType(cameraView == 1 ? VISION_STREAM_DRIVER :
|
||||||
|
cameraView == 3 || wide_cam_requested ? VISION_STREAM_WIDE_ROAD :
|
||||||
|
VISION_STREAM_ROAD);
|
||||||
|
|
||||||
s->scene.wide_cam = CameraWidget::getStreamType() == VISION_STREAM_WIDE_ROAD;
|
s->scene.wide_cam = CameraWidget::getStreamType() == VISION_STREAM_WIDE_ROAD;
|
||||||
if (s->scene.calibration_valid) {
|
if (s->scene.calibration_valid) {
|
||||||
@ -1393,6 +1395,8 @@ void AnnotatedCameraWidget::updateFrogPilotWidgets() {
|
|||||||
blindSpotLeft = scene.blind_spot_left;
|
blindSpotLeft = scene.blind_spot_left;
|
||||||
blindSpotRight = scene.blind_spot_right;
|
blindSpotRight = scene.blind_spot_right;
|
||||||
|
|
||||||
|
cameraView = scene.camera_view;
|
||||||
|
|
||||||
compass = scene.compass;
|
compass = scene.compass;
|
||||||
|
|
||||||
conditionalStatus = scene.conditional_status;
|
conditionalStatus = scene.conditional_status;
|
||||||
|
@ -247,6 +247,7 @@ private:
|
|||||||
float speedConversion;
|
float speedConversion;
|
||||||
|
|
||||||
int alertSize;
|
int alertSize;
|
||||||
|
int cameraView;
|
||||||
int conditionalStatus;
|
int conditionalStatus;
|
||||||
int currentHolidayTheme;
|
int currentHolidayTheme;
|
||||||
int customColors;
|
int customColors;
|
||||||
|
@ -400,6 +400,7 @@ void ui_update_frogpilot_params(UIState *s) {
|
|||||||
bool quality_of_life_visuals = params.getBool("QOLVisuals");
|
bool quality_of_life_visuals = params.getBool("QOLVisuals");
|
||||||
scene.big_map = quality_of_life_visuals && params.getBool("BigMap");
|
scene.big_map = quality_of_life_visuals && params.getBool("BigMap");
|
||||||
scene.full_map = scene.big_map && params.getBool("FullMap");
|
scene.full_map = scene.big_map && params.getBool("FullMap");
|
||||||
|
scene.camera_view = quality_of_life_visuals ? params.getInt("CameraView") : 0;
|
||||||
|
|
||||||
scene.speed_limit_controller = scene.longitudinal_control && params.getBool("SpeedLimitController");
|
scene.speed_limit_controller = scene.longitudinal_control && params.getBool("SpeedLimitController");
|
||||||
scene.show_slc_offset = scene.speed_limit_controller && params.getBool("ShowSLCOffset");
|
scene.show_slc_offset = scene.speed_limit_controller && params.getBool("ShowSLCOffset");
|
||||||
|
@ -281,6 +281,7 @@ typedef struct UIScene {
|
|||||||
|
|
||||||
int alert_size;
|
int alert_size;
|
||||||
int bearing_deg;
|
int bearing_deg;
|
||||||
|
int camera_view;
|
||||||
int conditional_speed;
|
int conditional_speed;
|
||||||
int conditional_speed_lead;
|
int conditional_speed_lead;
|
||||||
int conditional_status;
|
int conditional_status;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user