comparison Discovery/Src/base.c @ 642:c737cf5d9067

Do not show focus indicator in case motion detection is suspended: Motion detection will be suspended in case the diver is operating the OSTC using the buttons. In previous versions the focus indicator was shown even the motion detection was not active => may cause confusion. The indicator is now only shown in case the detection is active Added hystresis for switching between sector views: In previous versions small jitter at the angle signal could cause fast switching of the custom view. An offset has now been added to avoid this scenario
author Ideenmodellierer
date Wed, 24 Mar 2021 21:28:41 +0100
parents 028d8f3a9410
children 7b5a063f080f
comparison
equal deleted inserted replaced
641:ed5422ac4ffb 642:c737cf5d9067
520 #ifdef ENABLE_MOTION_CONTROL 520 #ifdef ENABLE_MOTION_CONTROL
521 if((stateUsed->mode == MODE_DIVE) && (settingsGetPointer()->MotionDetection != MOTION_DETECT_OFF)) /* handle motion events in divemode only */ 521 if((stateUsed->mode == MODE_DIVE) && (settingsGetPointer()->MotionDetection != MOTION_DETECT_OFF)) /* handle motion events in divemode only */
522 { 522 {
523 if(get_globalState() != StD) 523 if(get_globalState() != StD)
524 { 524 {
525 suspendMotionDetection(1); /* do not change custom views while divers is operating the computer */ 525 suspendMotionDetection(10); /* do not change custom views while divers is operating the computer */
526 } 526 }
527 HandleMotionDetection(); 527 HandleMotionDetection();
528 } 528 }
529 #endif 529 #endif
530 530
788 } else if ((action == ACTION_BUTTON_ENTER) || (action == ACTION_PITCH_NEG) || (action == ACTION_PITCH_POS)) 788 } else if ((action == ACTION_BUTTON_ENTER) || (action == ACTION_PITCH_NEG) || (action == ACTION_PITCH_POS))
789 { 789 {
790 790
791 if ((status.page == PageDive) && (status.line == 0)) 791 if ((status.page == PageDive) && (status.line == 0))
792 { 792 {
793 if((action == ACTION_BUTTON_ENTER) && ((pSettings->MotionDetection == MOTION_DETECT_SECTOR) || (pSettings->MotionDetection == MOTION_DETECT_SCROLL))) 793 if(action == ACTION_BUTTON_ENTER)
794 { 794 {
795 suspendMotionDetection(10); 795 suspendMotionDetection(10);
796 } 796 }
797 tHome_change_customview_button_pressed(action); 797 tHome_change_customview_button_pressed(action);
798 } 798 }
799 else if (status.page == PageSurface) 799 else if (status.page == PageSurface)
800 tHome_change_customview_button_pressed(action); 800 tHome_change_customview_button_pressed(action);
801 else 801 else
802 {
802 tHomeDiveMenuControl(action); 803 tHomeDiveMenuControl(action);
804 }
803 } 805 }
804 break; 806 break;
805 807
806 case BaseMenu: 808 case BaseMenu:
807 if (status.line == 0) 809 if (status.line == 0)