camerad: fix running AR0231 in single road cam mode (#34148)

Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
Adeeb Shihadeh
2024-12-03 14:16:28 -08:00
committed by GitHub
parent 7aeabc37d0
commit c4edfa8b25
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -69,10 +69,10 @@ public:
};
void CameraState::init(VisionIpcServer *v, cl_device_id device_id, cl_context ctx) {
if (!camera.enabled) return;
camera.camera_open(v, device_id, ctx);
if (!camera.enabled) return;
fl_pix = camera.cc.focal_len / camera.sensor->pixel_size_mm;
set_exposure_rect();
+2 -2
View File
@@ -264,12 +264,12 @@ int SpectraCamera::clear_req_queue() {
}
void SpectraCamera::camera_open(VisionIpcServer *v, cl_device_id device_id, cl_context ctx) {
if (!enabled) return;
if (!openSensor()) {
return;
}
if (!enabled) return;
// size is driven by all the HW that handles frames,
// the video encoder has certain alignment requirements in this case
stride = VENUS_Y_STRIDE(COLOR_FMT_NV12, sensor->frame_width);