Skip to content

Commit

Permalink
camerad: fix running AR0231 in single road cam mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Comma Device committed Dec 3, 2024
1 parent 7aeabc3 commit 4b09662
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions system/camerad/cameras/camera_qcom2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ class CameraState {
};

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();

Expand Down
4 changes: 2 additions & 2 deletions system/camerad/cameras/spectra.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4b09662

Please sign in to comment.