# HG changeset patch # User ideenmodellierer # Date 1568660260 -7200 # Node ID 939bc4da68122fe0ac94620c47c108320996435a # Parent a90100959871468a7cf24eadf1e77657d91087fd Motion events effect custom view in dive mode only For faster tests motion detection was also applied to the surface menu. On surface users will most likly use the buttons for operation => deactivated detection to avoid jumping views diff -r a90100959871 -r 939bc4da6812 Discovery/Src/base.c --- a/Discovery/Src/base.c Mon Sep 16 20:21:06 2019 +0200 +++ b/Discovery/Src/base.c Mon Sep 16 20:57:40 2019 +0200 @@ -488,17 +488,20 @@ DoDisplayRefresh = 0; RefreshDisplay(); - switch(settingsGetPointer()->MotionDetection) + if(stateUsed->mode == MODE_DIVE) /* handle motion events in divemode only */ { - case MOTION_DETECT_MOVE: pitchstate = detectPitch(stateRealGetPointer()->lifeData.compass_pitch); - break; - case MOTION_DETECT_SECTOR: pitchstate = detectSectorButtonEvent(stateRealGetPointer()->lifeData.compass_pitch); - break; - case MOTION_DETECT_SCROLL: pitchstate = detectScrollButtonEvent(stateRealGetPointer()->lifeData.compass_pitch); - break; - default: - pitchstate = DETECT_NOTHING; - break; + switch(settingsGetPointer()->MotionDetection) + { + case MOTION_DETECT_MOVE: pitchstate = detectPitch(stateRealGetPointer()->lifeData.compass_pitch); + break; + case MOTION_DETECT_SECTOR: pitchstate = detectSectorButtonEvent(stateRealGetPointer()->lifeData.compass_pitch); + break; + case MOTION_DETECT_SCROLL: pitchstate = detectScrollButtonEvent(stateRealGetPointer()->lifeData.compass_pitch); + break; + default: + pitchstate = DETECT_NOTHING; + break; + } } if(DETECT_NEG_PITCH == pitchstate)