cameradisableFullDisable

This commit is contained in:
firestar5683
2026-05-25 01:40:01 -05:00
parent 68123093c3
commit 76dbf9412a
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -272,6 +272,7 @@ void camerad_thread() {
for (const auto &config : ALL_CAMERA_CONFIGS) {
auto cam = std::make_unique<CameraState>(&m, config);
cam->init(&v, device_id, ctx);
if (!cam->camera.enabled) continue;
cams.emplace_back(std::move(cam));
}
+6 -1
View File
@@ -280,7 +280,12 @@ void SpectraCamera::camera_open(VisionIpcServer *v, cl_device_id device_id, cl_c
return;
}
if (!enabled) return;
if (!enabled) {
// Disabled or failed cameras still run through sensor setup, but they
// should not keep an idle session around for the rest of camerad's life.
camera_close();
return;
}
buf.out_img_width = sensor->frame_width / sensor->out_scale;
buf.out_img_height = (sensor->hdr_offset > 0 ? (sensor->frame_height - sensor->hdr_offset) / 2 : sensor->frame_height) / sensor->out_scale;