From cb7b22a2ea95b37d5facba95e2718b11016bdb0a Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Sat, 18 Jul 2020 18:07:44 +0200 Subject: [PATCH] Revert "Reset sensor state in init0." This reverts commit b02f2f7ff87d4e3ba6ad5af688ec642a6c1b5761. --- src/omv/sensor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/omv/sensor.c b/src/omv/sensor.c index f4ede2639..6f391210d 100644 --- a/src/omv/sensor.c +++ b/src/omv/sensor.c @@ -239,9 +239,6 @@ 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() @@ -288,6 +285,9 @@ 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