Merge pull request #854 from openmv/sensor_init_fix

Reset sensor state in init0.
This commit is contained in:
Ibrahim Abd Elkader 2020-07-17 19:30:36 +02:00 committed by GitHub
commit 34d543c537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -239,6 +239,9 @@ void sensor_init0()
// Set fb_enabled
JPEG_FB()->enabled = fb_enabled; // controlled by the IDE.
// Reset the sesnor state
memset(&sensor, 0, sizeof(sensor_t));
}
int sensor_init()
@ -285,9 +288,6 @@ int sensor_init()
#error "OMV_XCLK_SOURCE is not set!"
#endif
/* Reset the sesnor state */
memset(&sensor, 0, sizeof(sensor_t));
/* Some sensors have different reset polarities, and we can't know which sensor
is connected before initializing cambus and probing the sensor, which in turn
requires pulling the sensor out of the reset state. So we try to probe the