changeset 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 4eba86129d35
children 8fa2de4414a8
files Discovery/Src/motion.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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);