mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-06 22:22:11 +08:00
camerad: fix running AR0231 in single road cam mode (#34148)
Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user