Driver camera view when in reverse

Added toggle to show the driver camera when in the reverse gear.
This commit is contained in:
FrogAi
2024-03-11 18:27:44 -07:00
parent 0a675d40aa
commit 73734fee8c
7 changed files with 112 additions and 87 deletions

View File

@@ -217,6 +217,9 @@ void CameraWidget::updateFrameMat() {
if (active_stream_type == VISION_STREAM_DRIVER) {
if (stream_width > 0 && stream_height > 0) {
frame_mat = get_driver_view_transform(w, h, stream_width, stream_height);
if (uiState()->scene.show_driver_camera) {
frame_mat.v[0] *= -1.0;
}
}
} else {
// Project point at "infinity" to compute x and y offsets