Mercurial > public > ostc4
comparison Discovery/Src/t3.c @ 835:717b460294cd Evo_2_23
Added autofocus for BF Navigation view:
In case of activated autofocus feature for big font the navigation view will now be activated in case the OSTC4 is hold in horizontal position (like it is for example done if you take a bearing). The OSTC4 will return to the previous view in case the OSTC4 is no longer hold in horizontal position.
author | Ideenmodellierer |
---|---|
date | Sun, 17 Dec 2023 21:49:02 +0100 |
parents | 107c29934671 |
children | 18946846b95b |
comparison
equal
deleted
inserted
replaced
834:2a8af51ab04d | 835:717b460294cd |
---|---|
38 #include "tHome.h" | 38 #include "tHome.h" |
39 #include "timer.h" | 39 #include "timer.h" |
40 #include "unit.h" | 40 #include "unit.h" |
41 #include "motion.h" | 41 #include "motion.h" |
42 #include "logbook_miniLive.h" | 42 #include "logbook_miniLive.h" |
43 #include "tMenuEditCustom.h" | |
43 | 44 |
44 | 45 |
45 #define CV_PROFILE_WIDTH (600U) | 46 #define CV_PROFILE_WIDTH (600U) |
46 | 47 |
47 //* Imported function prototypes ---------------------------------------------*/ | 48 //* Imported function prototypes ---------------------------------------------*/ |
1985 return snprintf(text, size, "%c%3i'", colour, currentTimerMinutes); | 1986 return snprintf(text, size, "%c%3i'", colour, currentTimerMinutes); |
1986 } else { | 1987 } else { |
1987 return snprintf(text, size, "%c%u\016\016%%\017", colour, currentTimerMinutes * 100 / settingsGetPointer()->scrubberData[settings->scubberActiveId].TimerMax); | 1988 return snprintf(text, size, "%c%u\016\016%%\017", colour, currentTimerMinutes * 100 / settingsGetPointer()->scrubberData[settings->scubberActiveId].TimerMax); |
1988 } | 1989 } |
1989 } | 1990 } |
1991 void t3_handleAutofocus(void) | |
1992 { | |
1993 static uint8_t returnView = CVIEW_T3_END; | |
1994 | |
1995 if(stateUsed->diveSettings.activeAFViews & (1 << CVIEW_T3_Navigation)) | |
1996 { | |
1997 switch(HandleAFCompass()) | |
1998 { | |
1999 case AF_VIEW_ACTIVATED: returnView = t3_selection_customview; | |
2000 t3_select_customview(CVIEW_T3_Navigation); | |
2001 | |
2002 break; | |
2003 case AF_VIEW_DEACTIVATED: if((returnView != CVIEW_T3_END) && (t3_selection_customview == CVIEW_T3_Navigation)) | |
2004 { | |
2005 t3_select_customview(returnView); | |
2006 returnView = CVIEW_T3_END; | |
2007 } | |
2008 break; | |
2009 default: | |
2010 break; | |
2011 } | |
2012 } | |
2013 } |