# HG changeset patch # User Ideenmodellierer # Date 1618856060 -7200 # Node ID ff2b393e290f9820df7f5acd67b1b33da36c4339 # Parent 15f6f0b5786c604efc616a95c5d373518947a80b Motion detection: Enable focus after focus calibration: In previous version the focus detection was disabled while operating menus, also for the viewport calibration entry. As result when calibrating the view, it took some time till the focus was displayed (most likely causing confusion by the diver). To avoid this the suspension is now stopped when the view is calibrated => OSTC will enter focus mode using the new value diff -r 15f6f0b5786c -r ff2b393e290f Discovery/Src/motion.c --- a/Discovery/Src/motion.c Tue Apr 13 19:25:41 2021 +0200 +++ b/Discovery/Src/motion.c Mon Apr 19 20:14:20 2021 +0200 @@ -278,7 +278,7 @@ detectionState_t detectSectorButtonEvent(float focusOffset) { static uint8_t lastTargetSector = 0xFF; - static float lastfocusOffset = 0.0; + static float lastfocusOffset = 1000.0; uint8_t newTargetSector; @@ -288,6 +288,7 @@ if((newTargetSector != lastTargetSector) && (fabsf(focusOffset - lastfocusOffset) > (sectorDetection.size / 3))) { lastfocusOffset = focusOffset; + lastTargetSector = newTargetSector; if(settingsGetPointer()->design == 3) /* Big font view ? */ { t3_select_customview(GetCVForSector(newTargetSector)); diff -r 15f6f0b5786c -r ff2b393e290f Discovery/Src/tMenuEditXtra.c --- a/Discovery/Src/tMenuEditXtra.c Tue Apr 13 19:25:41 2021 +0200 +++ b/Discovery/Src/tMenuEditXtra.c Mon Apr 19 20:14:20 2021 +0200 @@ -111,6 +111,7 @@ void openEdit_CalibViewport(void) { calibrateViewport(stateUsed->lifeData.compass_roll, stateUsed->lifeData.compass_pitch, stateUsed->lifeData.compass_heading); + suspendMotionDetection(0); /* exit to focus mode directly */ exitMenuEdit_to_Home(); }