diff --git a/src/omv/sensor.c b/src/omv/sensor.c index 0ffc87db2..8dc8cdb5e 100644 --- a/src/omv/sensor.c +++ b/src/omv/sensor.c @@ -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