diff Discovery/Src/motion.c @ 618:96af74455420

Development bugfix: focus state not remembered: Somehow the static in front of the focus state has disappeared. After returning it again the focus detection is available again.
author Ideenmodellierer
date Wed, 27 Jan 2021 22:04:45 +0100
parents 916998f90e39
children 6826731ff2be
line wrap: on
line diff
--- a/Discovery/Src/motion.c	Wed Jan 27 22:03:11 2021 +0100
+++ b/Discovery/Src/motion.c	Wed Jan 27 22:04:45 2021 +0100
@@ -730,7 +730,7 @@
 void HandleMotionDetection(void)
 {
     detectionState_t pitchstate = DETECT_NOTHING;
-    uint8_t wasInFocus = 0;
+    static uint8_t wasInFocus = 0;
 
 	evaluateMotionDelta(stateUsed->lifeData.compass_roll, stateUsed->lifeData.compass_pitch, stateUsed->lifeData.compass_heading);
 	checkViewport(stateUsed->lifeData.compass_roll, stateUsed->lifeData.compass_pitch, stateUsed->lifeData.compass_heading);