mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
sensors/boson: Restore FLIR BOSON Factory defaults on reset.
It's possible to load settings into the FLIR BOSON via the desktop GUI which prevent it from outputting the expected image after reset. Always restore the factory default settings and apply all recomended steps to set the video output mode.
This commit is contained in:
parent
eb779fd48a
commit
004aff310c
@ -87,10 +87,26 @@ static int reset(omv_csi_t *csi) {
|
|||||||
return -1;
|
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) {
|
if (dvoSetType(FLR_DVO_TYPE_MONO8) != FLR_OK) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dvoApplyCustomSettings() != FLR_OK) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (telemetrySetState(FLR_DISABLE) != FLR_OK) {
|
if (telemetrySetState(FLR_DISABLE) != FLR_OK) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user