Merge pull request #2648 from openmv/sleep_no_fail
Some checks failed
🔎 Check Code Formatting / formatting-check (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_GIGA) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NANO_33_BLE_SENSE) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NANO_RP2040_CONNECT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NICLA_VISION) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_PORTENTA_H7) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV2) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV3) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV4) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV4P) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMVPT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_AE3) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_RT1060) (push) Has been cancelled
🔥 Firmware Build / code-size-report (push) Has been cancelled
🔥 Firmware Build / stable-release (push) Has been cancelled
🔥 Firmware Build / development-release (push) Has been cancelled

misc/csi: Don't fail if sleep is not implemented.
This commit is contained in:
Ibrahim Abdelkader 2025-04-07 21:17:07 +02:00 committed by GitHub
commit 563f49bd0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -584,13 +584,9 @@ __weak int omv_csi_sleep(int enable) {
// Disable any ongoing frame capture.
omv_csi_abort(true, false);
// Check if the control is supported.
if (csi.sleep == NULL) {
return OMV_CSI_ERROR_CTL_UNSUPPORTED;
}
// Call the sensor specific function.
if (csi.sleep(&csi, enable) != 0) {
if (csi.sleep != NULL &&
csi.sleep(&csi, enable) != 0) {
return OMV_CSI_ERROR_CTL_FAILED;
}