Merge pull request #2633 from kwagyeman/kwabena/flir_boson_factory_defaults
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_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

sensors/boson: Restore FLIR BOSON Factory defaults on reset.
This commit is contained in:
Ibrahim Abdelkader 2025-03-27 09:31:42 +02:00 committed by GitHub
commit 80b2c2b17b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,10 +87,26 @@ static int reset(omv_csi_t *csi) {
return -1;
}
// Always restore factory defaults to ensure the camera is in a known state.
FLR_RESULT ret = bosonRestoreFactoryDefaultsFromFlash();
// FLIR BOSON may glitch after restoring factory defaults.
if (ret != FLR_OK && ret != FLR_COMM_ERROR_READING_COMM) {
return -1;
}
if (dvoSetOutputFormat(FLR_DVO_DEFAULT_FORMAT) != FLR_OK) {
return -1;
}
if (dvoSetType(FLR_DVO_TYPE_MONO8) != FLR_OK) {
return -1;
}
if (dvoApplyCustomSettings() != FLR_OK) {
return -1;
}
if (telemetrySetState(FLR_DISABLE) != FLR_OK) {
return -1;
}