Mercurial > public > ostc4
annotate Discovery/Src/tMenuEditCustom.c @ 834:2a8af51ab04d Evo_2_23
Added event based display changes for big font view:
It is now possible to activate "Autofocus" option in custom view dialog. This enables automatic switching of the current view depending on current dive situation. Because T7 view already displays a lot of information this feature targets the T3 view.
author | Ideenmodellierer |
---|---|
date | Sun, 17 Dec 2023 21:14:17 +0100 |
parents | 7322adb00305 |
children | 717b460294cd |
rev | line source |
---|---|
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1 /////////////////////////////////////////////////////////////////////////////// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
2 /// -*- coding: UTF-8 -*- |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
3 /// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
4 /// \file Discovery/Src/tMenuEditXtra.c |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
5 /// \brief Menu Edit Xtra - Specials in Divemode like Reset Stopwatch |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
6 /// \author heinrichs weikamp gmbh |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
7 /// \date 02-Mar-2015 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
8 /// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
9 /// \details |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
10 /// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
11 /// $Id$ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
12 /////////////////////////////////////////////////////////////////////////////// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
13 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
14 /// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
15 /// This program is free software: you can redistribute it and/or modify |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
16 /// it under the terms of the GNU General Public License as published by |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
17 /// the Free Software Foundation, either version 3 of the License, or |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
18 /// (at your option) any later version. |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
19 /// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
20 /// This program is distributed in the hope that it will be useful, |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
21 /// but WITHOUT ANY WARRANTY; without even the implied warranty of |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
22 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
23 /// GNU General Public License for more details. |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
24 /// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
25 /// You should have received a copy of the GNU General Public License |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
26 /// along with this program. If not, see <http://www.gnu.org/licenses/>. |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
27 ////////////////////////////////////////////////////////////////////////////// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
28 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
29 /* Includes ------------------------------------------------------------------*/ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
30 #include "tMenuEditCustom.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
31 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
32 #include "gfx_fonts.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
33 #include "simulation.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
34 #include "timer.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
35 #include "tMenuEdit.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
36 #include "tHome.h" // for enum CUSTOMVIEWS and init_t7_compass() |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
37 #include "t3.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
38 #include "t7.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
39 #include "data_exchange_main.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
40 #include "motion.h" |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
41 #include "tMenu.h" |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
42 #include "tMenuSystem.h" |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
43 #include <math.h> |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
44 |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
45 |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
46 #define CV_PER_PAGE (5u) /* number of cv selections shown at one page */ |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
47 #define MAX_BACKLIGHT_BOOST (2u) /* max number of backlight levels which may be increased during focus state */ |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
48 |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
49 #define MAX_FOCUS_LIMITER (2u) /* max number for reducing the spot used for focus detection */ |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
50 |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
51 static uint8_t customviewsSubpage = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
52 static uint8_t customviewsSubpageMax = 0; /* number of pages needed to display all selectable views */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
53 static const uint8_t* pcv_curchangelist; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
54 /* Private function prototypes -----------------------------------------------*/ |
520 | 55 void openEdit_Customview(void); |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
56 void openEdit_BigScreen(void); |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
57 void openEdit_MotionCtrl(void); |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
58 void openEdit_ViewPort(void); |
520 | 59 void refresh_Customviews(void); |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
60 char customview_TXT2BYTE_helper(uint8_t customViewId); |
820 | 61 char customviewBF_TXT2BYTE_helper(uint8_t customViewId); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
62 /* Announced function prototypes -----------------------------------------------*/ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
63 uint8_t OnAction_CViewTimeout (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
64 uint8_t OnAction_CViewStandard (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
65 uint8_t OnAction_CViewStandardBF(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
834
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
66 uint8_t OnAction_CViewAutofocusBF(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
67 uint8_t OnAction_CornerTimeout (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
68 uint8_t OnAction_CornerStandard(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
69 uint8_t OnAction_CViewPortCalib(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
70 uint8_t OnAction_CViewPortLayout(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
71 uint8_t OnAction_CViewPortAmbient(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
72 uint8_t OnAction_CViewPortControl(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
73 uint8_t OnAction_CViewPortSpot(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
74 /* Exported functions --------------------------------------------------------*/ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
75 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
76 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
77 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
78 |
520 | 79 void refresh_Customviews(void) |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
80 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
81 char text[32]; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
82 uint8_t textpointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
83 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
84 // header |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
85 text[0] = '\001'; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
86 text[1] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
87 text[2] = TXT2BYTE_Customviews; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
88 text[3] = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
89 write_topline(text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
90 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
91 // custom view center return |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
92 textpointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
93 text[textpointer++] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
94 text[textpointer++] = TXT2BYTE_CViewTimeout; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
95 textpointer += snprintf(&text[textpointer],11," %02u\016\016 %c\017",settingsGetPointer()->tX_customViewTimeout,TXT_Seconds); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
96 write_label_var( 30, 700, ME_Y_LINE1, &FontT48, text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
97 |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
98 // custom view center primary |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
99 text[0] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
100 text[1] = TXT2BYTE_CViewStandard; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
101 text[2] = ' '; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
102 text[3] = ' '; |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
103 |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
104 text[4] = TXT_2BYTE; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
105 text[5] = customview_TXT2BYTE_helper(settingsGetPointer()->tX_customViewPrimary); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
106 text[6] = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
107 write_label_var( 30, 700, ME_Y_LINE2, &FontT48, text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
108 |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
109 // custom view big font |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
110 text[0] = TXT_2BYTE; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
111 text[1] = TXT2BYTE_ExtraDisplay; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
112 text[2] = ' '; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
113 text[3] = ' '; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
114 text[4] = TXT_2BYTE; |
820 | 115 text[5] = customviewBF_TXT2BYTE_helper(settingsGetPointer()->tX_customViewPrimaryBF); |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
116 text[6] = 0; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
117 write_label_var( 30, 700, ME_Y_LINE3, &FontT48, text); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
118 |
834
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
119 /* Bigfont autofocus selector */ |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
120 textpointer = 0; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
121 text[textpointer++] = TXT_2BYTE; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
122 text[textpointer++] = TXT2BYTE_ExtraDisplay; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
123 textpointer += snprintf(&text[textpointer],20," %c%c",TXT_2BYTE, TXT2BYTE_Autofocus); |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
124 write_label_var( 30, 700, ME_Y_LINE4, &FontT48, text); |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
125 |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
126 tMenuEdit_refresh_field(StMCustom1_CViewAutoFocusBF); |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
127 |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
128 |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
129 // field corner return |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
130 textpointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
131 text[textpointer++] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
132 text[textpointer++] = TXT2BYTE_CornerTimeout; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
133 textpointer += snprintf(&text[textpointer],11," %02u\016\016 %c\017",settingsGetPointer()->tX_userselectedLeftLowerCornerTimeout,TXT_Seconds); |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
134 write_label_var( 30, 700, ME_Y_LINE5, &FontT48, text); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
135 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
136 // field corner primary |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
137 text[0] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
138 text[1] = TXT2BYTE_CornerStandard; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
139 text[2] = ' '; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
140 text[3] = ' '; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
141 switch(settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
142 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
143 /* Temperature */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
144 case LLC_Temperature: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
145 text[4] = TXT_Temperature; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
146 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
147 /* Average Depth */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
148 case LLC_AverageDepth: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
149 text[4] = TXT_AvgDepth; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
150 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
151 /* ppO2 */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
152 case LLC_ppO2: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
153 text[4] = TXT_ppO2; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
154 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
155 /* Stop Uhr */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
156 case LLC_Stopwatch: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
157 text[4] = TXT_Stopwatch; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
158 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
159 /* Ceiling */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
160 case LLC_Ceiling: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
161 text[4] = TXT_Ceiling; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
162 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
163 /* Future TTS */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
164 case LLC_FutureTTS: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
165 text[4] = TXT_FutureTTS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
166 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
167 /* CNS */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
168 case LLC_CNS: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
169 text[4] = TXT_CNS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
170 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
171 case LLC_GF: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
172 text[4] = TXT_ActualGradient; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
173 break; |
656 | 174 case LLC_ScrubberTime: |
175 text[4] = TXT_ScrubTime; | |
176 break; | |
177 | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
178 #ifdef ENABLE_BOTTLE_SENSOR |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
179 case LCC_BottleBar: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
180 text[4] = TXT_AtemGasVorrat; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
181 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
182 #endif |
662 | 183 |
184 #ifdef ENABLE_PSCR_MODE | |
185 case LCC_SimPpo2: | |
186 text[4] = TXT_SimPpo2; | |
187 break; | |
188 #endif | |
751 | 189 #ifdef ENABLE_CO2_SUPPORT |
190 case LCC_CO2: | |
191 text[4] = TXT_CO2Sensor; | |
192 break; | |
193 #endif | |
737
5071d554aaa5
NEW: Add mini compass with marker declination indication
heinrichsweikamp
parents:
706
diff
changeset
|
194 case LLC_Compass: |
5071d554aaa5
NEW: Add mini compass with marker declination indication
heinrichsweikamp
parents:
706
diff
changeset
|
195 text[4] = TXT_2BYTE; |
5071d554aaa5
NEW: Add mini compass with marker declination indication
heinrichsweikamp
parents:
706
diff
changeset
|
196 text[5] = TXT2BYTE_Compass; |
5071d554aaa5
NEW: Add mini compass with marker declination indication
heinrichsweikamp
parents:
706
diff
changeset
|
197 |
5071d554aaa5
NEW: Add mini compass with marker declination indication
heinrichsweikamp
parents:
706
diff
changeset
|
198 break; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
199 /* none */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
200 case LLC_Empty: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
201 text[4] = '-'; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
202 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
203 default: |
630 | 204 text[4] = 'X'; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
205 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
206 } |
737
5071d554aaa5
NEW: Add mini compass with marker declination indication
heinrichsweikamp
parents:
706
diff
changeset
|
207 if (text[4] != TXT_2BYTE) { |
5071d554aaa5
NEW: Add mini compass with marker declination indication
heinrichsweikamp
parents:
706
diff
changeset
|
208 text[5] = 0; |
5071d554aaa5
NEW: Add mini compass with marker declination indication
heinrichsweikamp
parents:
706
diff
changeset
|
209 } else { |
5071d554aaa5
NEW: Add mini compass with marker declination indication
heinrichsweikamp
parents:
706
diff
changeset
|
210 text[6] = 0; |
5071d554aaa5
NEW: Add mini compass with marker declination indication
heinrichsweikamp
parents:
706
diff
changeset
|
211 } |
5071d554aaa5
NEW: Add mini compass with marker declination indication
heinrichsweikamp
parents:
706
diff
changeset
|
212 |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
213 write_label_var( 30, 700, ME_Y_LINE6, &FontT48, text); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
214 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
215 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
216 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
217 |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
218 void refresh_ViewPort(void) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
219 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
220 char text[32]; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
221 uint8_t textIndex = 0; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
222 float distance = 0.0; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
223 SSettings* pSettings = settingsGetPointer(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
224 GFX_DrawCfgScreen* pdrawScreen; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
225 point_t lowerleft = {0,0}; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
226 point_t upperright = {799,479}; |
575
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
227 float localLimit = 0.1; |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
228 uint8_t spotSize = (pSettings->viewPortMode >> 5) & 0x03; |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
229 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
230 text[0] = '\001'; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
231 text[1] = TXT_2BYTE; |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
232 text[2] = TXT2BYTE_MotionCtrl; |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
233 text[3] = 0; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
234 write_topline(text); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
235 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
236 text[0] = TXT_2BYTE; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
237 text[1] = TXT2BYTE_CalibView; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
238 text[2] = 0; |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
239 write_label_var( 30, 700, ME_Y_LINE2, &FontT48, text); |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
240 |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
241 |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
242 textIndex = 0; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
243 text[textIndex++] = TXT_2BYTE; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
244 text[textIndex++] = TXT2BYTE_FocusSpotSize; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
245 text[textIndex++] = 0; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
246 write_label_var( 30, 340, ME_Y_LINE3, &FontT48, text); |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
247 |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
248 textIndex = 0; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
249 text[textIndex++] = TXT_2BYTE; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
250 switch(spotSize) |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
251 { |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
252 case 2: text[textIndex++] = TXT2BYTE_Minimum; break; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
253 case 1: text[textIndex++] = TXT2BYTE_Normal; break; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
254 default: |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
255 case 0: text[textIndex++] = TXT2BYTE_Maximum; break; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
256 } |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
257 text[textIndex++] = 0; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
258 write_label_var( 500, 800, ME_Y_LINE3, &FontT48, text); |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
259 |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
260 textIndex = 0; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
261 text[textIndex++] = TXT_2BYTE; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
262 text[textIndex++] = TXT2BYTE_IndicateFrame; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
263 text[textIndex++] = 0; |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
264 write_label_var( 30, 340, ME_Y_LINE4, &FontT48, text); |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
265 textIndex = 0; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
266 text[textIndex++] = '\006' - ((settingsGetPointer()->viewPortMode >> 4) & 1); |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
267 text[textIndex++] = 0; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
268 write_label_var( 500, 800, ME_Y_LINE4, &FontT48, text); |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
269 textIndex = 0; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
270 text[textIndex++] = TXT_2BYTE; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
271 text[textIndex++] = TXT2BYTE_BoostBacklight; |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
272 text[textIndex++] = 0; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
273 write_label_var( 30, 340, ME_Y_LINE5, &FontT48, text); |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
274 textIndex = 0; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
275 snprintf(&text[textIndex],32,"%d",(settingsGetPointer()->viewPortMode & 0x3)); |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
276 write_label_var( 500, 800, ME_Y_LINE5, &FontT48, text); |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
277 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
278 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
279 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
280 /* test if we are in focus */ |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
281 if((pSettings->viewPitch != 0.0) || (pSettings->viewRoll != 0.0) || (pSettings->viewYaw != 0.0)) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
282 { |
625
028d8f3a9410
Switch Sector / Scroll detection to vector implementation:
Ideenmodellierer
parents:
604
diff
changeset
|
283 distance = checkViewport(stateUsed->lifeData.compass_roll, stateUsed->lifeData.compass_pitch, stateUsed->lifeData.compass_heading, MOTION_ENABLE_ALL); |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
284 |
575
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
285 /* show "bar graph" indicating the distance to the center point */ |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
286 textIndex = 0; |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
287 text[textIndex++] = '\001'; |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
288 |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
289 if(fabs(distance) < localLimit) |
575
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
290 { |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
291 text[textIndex++] = '+'; |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
292 } |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
293 else |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
294 { |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
295 while (localLimit < 0.6) |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
296 { |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
297 localLimit += 0.1; |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
298 text[textIndex++] = '-'; |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
299 text[textIndex++] = '-'; |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
300 if(fabs(distance) < localLimit) |
575
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
301 { |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
302 break; |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
303 } |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
304 } |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
305 } |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
306 text[textIndex] = 0; |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
307 write_label_var( 30, 700, ME_Y_LINE1, &FontT48, text); |
86c4baa6ba29
Change style of viewport calibration menu:
Ideenmodellierer
parents:
572
diff
changeset
|
308 |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
309 /* MotionCtrl */ |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
310 textIndex = 0; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
311 |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
312 text[textIndex++] = TXT_2BYTE; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
313 text[textIndex++] = TXT2BYTE_MotionCtrl; |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
314 text[textIndex++] = 0; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
315 write_label_var( 30, 340, ME_Y_LINE6, &FontT48, text); |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
316 textIndex = 0; |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
317 text[textIndex++] = TXT_2BYTE; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
318 switch(settingsGetPointer()->MotionDetection) |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
319 { |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
320 case MOTION_DETECT_OFF: |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
321 text[textIndex++] = TXT2BYTE_MoCtrlNone; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
322 break; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
323 case MOTION_DETECT_MOVE: |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
324 text[textIndex++] = TXT2BYTE_MoCtrlPitch; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
325 break; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
326 case MOTION_DETECT_SECTOR: |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
327 text[textIndex++] = TXT2BYTE_MoCtrlSector; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
328 break; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
329 case MOTION_DETECT_SCROLL: |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
330 text[textIndex++] = TXT2BYTE_MoCtrlScroll; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
331 break; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
332 default: |
630 | 333 textIndex += snprintf(&text[4],4,"%u",settingsGetPointer()->MotionDetection); |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
334 break; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
335 } |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
336 text[textIndex] = 0; |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
337 write_label_var(500, 800, ME_Y_LINE6, &FontT48, text); |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
338 |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
339 |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
340 if(viewInFocus()) |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
341 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
342 set_Backlight_Boost(settingsGetPointer()->viewPortMode & 0x03); |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
343 if((pSettings->viewPortMode >> 4) & 0x01) |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
344 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
345 pdrawScreen = getMenuEditScreen(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
346 GFX_draw_box(pdrawScreen,lowerleft,upperright,0,CLUT_NiceGreen); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
347 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
348 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
349 else |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
350 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
351 set_Backlight_Boost(0); |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
352 if((pSettings->viewPortMode >> 4) & 0x01) |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
353 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
354 pdrawScreen = getMenuEditScreen(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
355 GFX_draw_box(pdrawScreen,lowerleft,upperright,0,CLUT_MenuTopBackground); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
356 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
357 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
358 resetFocusState(); /* no other instance shall be impacted by the local detection */ |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
359 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
360 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
361 |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
362 void openEdit_Custom(uint8_t line) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
363 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
364 set_globalState_Menu_Line(line); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
365 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
366 switch(line) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
367 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
368 case 1: |
706
10b7d271b9c4
Bugfix: only reset menu if a new sub menu is created:
Ideenmodellierer
parents:
700
diff
changeset
|
369 default: openEdit_Customview(); |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
370 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
371 case 2: openEdit_BigScreen(); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
372 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
373 case 3: openEdit_CustomviewDivemode(cv_changelist); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
374 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
375 case 4: openEdit_CustomviewDivemode(cv_changelist_BS); |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
376 break; |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
377 case 5: openEdit_ViewPort(); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
378 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
379 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
380 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
381 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
382 /* Private functions ---------------------------------------------------------*/ |
520 | 383 void openEdit_Customview(void) |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
384 { |
706
10b7d271b9c4
Bugfix: only reset menu if a new sub menu is created:
Ideenmodellierer
parents:
700
diff
changeset
|
385 resetMenuEdit(CLUT_MenuPageCustomView); |
520 | 386 refresh_Customviews(); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
387 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
388 write_field_button(StMCustom1_CViewTimeout, 400, 700, ME_Y_LINE1, &FontT48, ""); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
389 write_field_button(StMCustom1_CViewStandard, 400, 700, ME_Y_LINE2, &FontT48, ""); |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
390 write_field_button(StMCustom1_CViewStandardBF, 400, 700, ME_Y_LINE3, &FontT48, ""); |
834
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
391 write_field_on_off(StMCustom1_CViewAutoFocusBF, 650, 700, ME_Y_LINE4, &FontT48, "", settingsGetPointer()->cvAutofocus); |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
392 write_field_button(StMCustom1_CornerTimeout, 400, 700, ME_Y_LINE5, &FontT48, ""); |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
393 write_field_button(StMCustom1_CornerStandard, 400, 700, ME_Y_LINE6, &FontT48, ""); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
394 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
395 setEvent(StMCustom1_CViewTimeout, (uint32_t)OnAction_CViewTimeout); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
396 setEvent(StMCustom1_CViewStandard, (uint32_t)OnAction_CViewStandard); |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
397 setEvent(StMCustom1_CViewStandardBF, (uint32_t)OnAction_CViewStandardBF); |
834
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
398 setEvent(StMCustom1_CViewAutoFocusBF, (uint32_t)OnAction_CViewAutofocusBF); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
399 setEvent(StMCustom1_CornerTimeout, (uint32_t)OnAction_CornerTimeout); |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
400 setEvent(StMCustom1_CornerStandard, (uint32_t)OnAction_CornerStandard); |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
401 } |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
402 |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
403 void openEdit_BigScreen(void) |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
404 { |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
405 uint8_t newValue = 0; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
406 SSettings *pSettings = settingsGetPointer(); |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
407 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
408 newValue = pSettings->extraDisplay + 1; |
739 | 409 |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
410 if(newValue >= EXTRADISPLAY_END) |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
411 { |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
412 newValue = EXTRADISPLAY_none; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
413 } |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
414 pSettings->extraDisplay = newValue; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
415 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
416 exitMenuEdit_to_Menu_with_Menu_Update_do_not_write_settings_for_this_only(); |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
417 } |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
418 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
419 void openEdit_MotionCtrl(void) |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
420 { |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
421 uint8_t newValue = 0; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
422 SSettings *pSettings = settingsGetPointer(); |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
423 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
424 switch(pSettings->MotionDetection) |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
425 { |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
426 case MOTION_DETECT_OFF: |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
427 newValue = MOTION_DETECT_MOVE; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
428 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
429 case MOTION_DETECT_MOVE: |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
430 newValue = MOTION_DETECT_SECTOR; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
431 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
432 case MOTION_DETECT_SECTOR: |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
433 newValue = MOTION_DETECT_SCROLL; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
434 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
435 case MOTION_DETECT_SCROLL: |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
436 newValue = MOTION_DETECT_OFF; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
437 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
438 default: |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
439 newValue = MOTION_DETECT_OFF; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
440 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
441 } |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
442 pSettings->MotionDetection = newValue; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
443 InitMotionDetection(); |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
444 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
445 exitMenuEdit_to_Menu_with_Menu_Update_do_not_write_settings_for_this_only(); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
446 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
447 |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
448 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
449 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
450 void openEdit_ViewPort(void) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
451 { |
706
10b7d271b9c4
Bugfix: only reset menu if a new sub menu is created:
Ideenmodellierer
parents:
700
diff
changeset
|
452 resetMenuEdit(CLUT_MenuPageCustomView); |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
453 refresh_ViewPort(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
454 |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
455 write_field_button(StMCustom5_CViewPortCalib, 400, 700, ME_Y_LINE2, &FontT48, ""); |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
456 write_field_button(StMCustom5_CViewPortSpotSize,400, 700, ME_Y_LINE3, &FontT48, ""); |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
457 write_field_button(StMCustom5_CViewPortLayout, 400, 700, ME_Y_LINE4, &FontT48, ""); |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
458 write_field_button(StMCustom5_CViewPortAmbient, 400, 700, ME_Y_LINE5, &FontT48, ""); |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
459 write_field_button(StMCustom5_CViewPortControl, 400, 700, ME_Y_LINE6, &FontT48, ""); |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
460 |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
461 setEvent(StMCustom5_CViewPortCalib, (uint32_t)OnAction_CViewPortCalib); |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
462 setEvent(StMCustom5_CViewPortSpotSize, (uint32_t)OnAction_CViewPortSpot); |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
463 setEvent(StMCustom5_CViewPortLayout, (uint32_t)OnAction_CViewPortLayout); |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
464 setEvent(StMCustom5_CViewPortAmbient, (uint32_t)OnAction_CViewPortAmbient); |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
465 setEvent(StMCustom5_CViewPortControl, (uint32_t)OnAction_CViewPortControl); |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
466 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
467 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
468 |
520 | 469 char customview_TXT2BYTE_helper(uint8_t customViewId) |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
470 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
471 char text = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
472 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
473 switch(customViewId) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
474 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
475 case CVIEW_sensors: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
476 text = TXT2BYTE_O2monitor; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
477 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
478 case CVIEW_sensors_mV: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
479 text = TXT2BYTE_O2voltage; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
480 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
481 case CVIEW_Compass: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
482 text = TXT2BYTE_Compass; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
483 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
484 case CVIEW_Decolist: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
485 text = TXT2BYTE_Decolist; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
486 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
487 case CVIEW_Tissues: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
488 text = TXT2BYTE_Tissues; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
489 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
490 case CVIEW_Profile: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
491 text = TXT2BYTE_Profile; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
492 break; |
531 | 493 case CVIEW_Gaslist: |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
494 text = TXT2BYTE_Gaslist; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
495 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
496 case CVIEW_EADTime: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
497 text = TXT2BYTE_Info; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
498 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
499 case CVIEW_SummaryOfLeftCorner: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
500 text = TXT2BYTE_Summary; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
501 break; |
805
dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents:
751
diff
changeset
|
502 case CVIEW_Timer: |
dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents:
751
diff
changeset
|
503 text = TXT2BYTE_Timer; |
dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents:
751
diff
changeset
|
504 break; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
505 case CVIEW_noneOrDebug: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
506 text = TXT2BYTE_DispNoneDbg; |
820 | 507 break; |
508 default: | |
509 break; | |
510 } | |
511 return text; | |
512 } | |
513 char customviewBF_TXT2BYTE_helper(uint8_t customViewId) | |
514 { | |
515 char text = 0; | |
516 | |
517 switch(customViewId) | |
518 { | |
519 case CVIEW_T3_noneOrDebug: | |
520 text = TXT2BYTE_DispNoneDbg; | |
521 break; | |
522 case CVIEW_T3_sensors: | |
523 text = TXT2BYTE_O2monitor; | |
524 break; | |
525 case CVIEW_T3_Compass: | |
526 text = TXT2BYTE_Compass; | |
527 break; | |
528 case CVIEW_T3_Decostop: | |
529 text = TXT2BYTE_Decolist; | |
530 break; | |
531 #ifdef ENABLE_T3_PROFILE_VIEW | |
532 case CVIEW_T3_Profile: | |
533 text = TXT2BYTE_Profile; | |
534 break; | |
535 #endif | |
536 case CVIEW_T3_GasList: | |
537 text = TXT2BYTE_Gaslist; | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
538 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
539 case CVIEW_T3_MaxDepth: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
540 text = TXT2BYTE_MaxDepth; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
541 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
542 case CVIEW_T3_StopWatch: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
543 text = TXT2BYTE_Stopwatch; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
544 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
545 case CVIEW_T3_TTS: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
546 text = TXT2BYTE_TTS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
547 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
548 case CVIEW_T3_ppO2andGas: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
549 text = TXT2BYTE_ppoNair; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
550 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
551 case CVIEW_T3_Navigation: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
552 text = TXT2BYTE_Navigation; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
553 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
554 case CVIEW_T3_DepthData: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
555 text = TXT2BYTE_DepthData; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
556 break; |
542
6960df7ddb09
Added new t3 view showing first deco stop and tts in parallel:
Ideenmodellierer
parents:
541
diff
changeset
|
557 case CVIEW_T3_DecoTTS: |
6960df7ddb09
Added new t3 view showing first deco stop and tts in parallel:
Ideenmodellierer
parents:
541
diff
changeset
|
558 text = TXT2BYTE_DecoTTS; |
6960df7ddb09
Added new t3 view showing first deco stop and tts in parallel:
Ideenmodellierer
parents:
541
diff
changeset
|
559 break; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
560 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
561 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
562 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
563 return text; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
564 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
565 |
520 | 566 uint8_t OnAction_CViewTimeout(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
567 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
568 uint8_t value; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
569 value = settingsGetPointer()->tX_customViewTimeout; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
570 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
571 if(value < 5) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
572 value = 5; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
573 else if(value < 10) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
574 value = 10; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
575 else if(value < 15) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
576 value = 15; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
577 else if(value < 20) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
578 value = 20; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
579 else if(value < 30) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
580 value = 30; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
581 else if(value < 45) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
582 value = 45; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
583 else if(value < 60) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
584 value = 60; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
585 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
586 value = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
587 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
588 settingsGetPointer()->tX_customViewTimeout = value; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
589 return UPDATE_DIVESETTINGS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
590 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
591 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
592 |
520 | 593 uint8_t OnAction_CViewStandard(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
594 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
595 uint8_t newValue; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
596 switch(settingsGetPointer()->tX_customViewPrimary) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
597 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
598 case CVIEW_sensors: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
599 newValue = CVIEW_sensors_mV; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
600 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
601 case CVIEW_sensors_mV: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
602 newValue = CVIEW_Compass; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
603 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
604 case CVIEW_Compass: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
605 newValue = CVIEW_Decolist; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
606 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
607 case CVIEW_Decolist: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
608 newValue = CVIEW_Tissues; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
609 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
610 case CVIEW_Tissues: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
611 newValue = CVIEW_Profile; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
612 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
613 case CVIEW_Profile: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
614 newValue = CVIEW_Gaslist; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
615 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
616 case CVIEW_Gaslist: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
617 newValue = CVIEW_EADTime; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
618 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
619 case CVIEW_EADTime: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
620 newValue = CVIEW_SummaryOfLeftCorner; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
621 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
622 case CVIEW_SummaryOfLeftCorner: |
805
dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents:
751
diff
changeset
|
623 newValue = CVIEW_Timer; |
dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents:
751
diff
changeset
|
624 break; |
dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents:
751
diff
changeset
|
625 case CVIEW_Timer: |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
626 newValue = CVIEW_noneOrDebug; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
627 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
628 case CVIEW_noneOrDebug: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
629 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
630 newValue = CVIEW_sensors; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
631 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
632 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
633 settingsGetPointer()->tX_customViewPrimary = newValue; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
634 return UPDATE_DIVESETTINGS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
635 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
636 |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
637 uint8_t OnAction_CViewStandardBF(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
638 { |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
639 uint8_t index = 0; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
640 uint8_t newValue; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
641 |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
642 /* list contains all views which may be selected => get index of current setting */ |
820 | 643 while((settingsGetPointer()->tX_customViewPrimaryBF != cv_changelist_BS[index]) && (cv_changelist_BS[index] != CVIEW_T3_END)) |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
644 { |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
645 index++; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
646 } |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
647 if((cv_changelist_BS[index] == CVIEW_T3_END) || (cv_changelist_BS[index+1] == CVIEW_T3_END)) /* invalid or last setting */ |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
648 { |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
649 newValue = cv_changelist_BS[0]; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
650 } |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
651 else |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
652 { |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
653 newValue = cv_changelist_BS[index + 1]; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
654 } |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
655 |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
656 settingsGetPointer()->tX_customViewPrimaryBF = newValue; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
657 return UPDATE_DIVESETTINGS; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
658 } |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
659 |
834
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
660 uint8_t OnAction_CViewAutofocusBF(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
661 { |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
662 SSettings *pSettings = settingsGetPointer(); |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
663 if(pSettings->cvAutofocus) |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
664 { |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
665 pSettings->cvAutofocus = 0; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
666 } |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
667 else |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
668 { |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
669 pSettings->cvAutofocus = 1; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
670 } |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
671 tMenuEdit_set_on_off(editId, pSettings->cvAutofocus); |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
672 return UPDATE_DIVESETTINGS; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
673 } |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
674 |
520 | 675 uint8_t OnAction_CornerTimeout(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
676 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
677 uint8_t value; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
678 value = settingsGetPointer()->tX_userselectedLeftLowerCornerTimeout; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
679 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
680 if(value < 5) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
681 value = 5; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
682 else if(value < 10) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
683 value = 10; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
684 else if(value < 15) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
685 value = 15; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
686 else if(value < 20) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
687 value = 20; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
688 else if(value < 30) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
689 value = 30; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
690 else if(value < 45) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
691 value = 45; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
692 else if(value < 60) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
693 value = 60; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
694 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
695 value = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
696 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
697 settingsGetPointer()->tX_userselectedLeftLowerCornerTimeout = value; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
698 return UPDATE_DIVESETTINGS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
699 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
700 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
701 |
520 | 702 uint8_t OnAction_CornerStandard(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
703 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
704 uint8_t value; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
705 value = settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
706 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
707 value += 1; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
708 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
709 if(value >= LLC_END) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
710 value = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
711 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
712 settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary = value; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
713 return UPDATE_DIVESETTINGS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
714 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
715 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
716 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
717 uint8_t OnAction_Customview_Toggle(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
718 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
719 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
720 uint8_t line = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
721 SSettings *pSettings = settingsGetPointer(); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
722 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
723 switch(editId) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
724 { |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
725 case StMCustom3_CViewSelection1: line = 1; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
726 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
727 case StMCustom3_CViewSelection2: line = 2; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
728 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
729 case StMCustom3_CViewSelection3: line = 3; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
730 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
731 case StMCustom3_CViewSelection4: line = 4; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
732 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
733 case StMCustom3_CViewSelection5: line = 5; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
734 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
735 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
736 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
737 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
738 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
739 if(pcv_curchangelist == cv_changelist) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
740 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
741 pSettings->cv_configuration ^= 1 << (pcv_curchangelist[customviewsSubpage * 5 + line-1]); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
742 if(t7_GetEnabled_customviews() == 0) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
743 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
744 pSettings->cv_configuration ^= (1 << CVIEW_noneOrDebug); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
745 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
746 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
747 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
748 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
749 pSettings->cv_config_BigScreen ^= 1 << (pcv_curchangelist[customviewsSubpage * 5 + line-1]); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
750 if(t3_GetEnabled_customviews() == 0) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
751 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
752 pSettings->cv_config_BigScreen ^= (1 << CVIEW_noneOrDebug); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
753 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
754 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
755 return UPDATE_DIVESETTINGS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
756 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
757 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
758 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
759 uint8_t OnAction_Customview_NextPage(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
760 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
761 customviewsSubpage++; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
762 if(customviewsSubpage == customviewsSubpageMax) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
763 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
764 customviewsSubpage = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
765 } |
750
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
766 CustomviewDivemode_refresh(); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
767 return UPDATE_DIVESETTINGS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
768 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
769 |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
770 uint8_t OnAction_CViewPortCalib(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
771 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
772 float heading; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
773 if(settingsGetPointer()->compassInertia) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
774 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
775 heading = (uint16_t)compass_getCompensated(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
776 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
777 else |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
778 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
779 heading = (uint16_t)stateUsed->lifeData.compass_heading; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
780 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
781 calibrateViewport(stateUsed->lifeData.compass_roll,stateUsed->lifeData.compass_pitch,heading); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
782 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
783 return UPDATE_DIVESETTINGS; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
784 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
785 uint8_t OnAction_CViewPortLayout(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
786 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
787 SSettings* pSettings = settingsGetPointer(); |
700 | 788 if((pSettings->viewPortMode & 0x10) != 0) |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
789 { |
640 | 790 pSettings->viewPortMode &= 0xEF; /* 1110 1111 */ |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
791 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
792 else |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
793 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
794 pSettings->viewPortMode |= 0x10; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
795 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
796 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
797 return UPDATE_DIVESETTINGS; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
798 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
799 uint8_t OnAction_CViewPortAmbient(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
800 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
801 SSettings* pSettings = settingsGetPointer(); |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
802 if(((pSettings->viewPortMode +1) & 0x03) <= MAX_BACKLIGHT_BOOST) |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
803 { |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
804 pSettings->viewPortMode++; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
805 } |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
806 else |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
807 { |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
808 pSettings->viewPortMode &= 0xFC; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
809 } |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
810 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
811 return UPDATE_DIVESETTINGS; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
812 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
813 |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
814 uint8_t OnAction_CViewPortControl(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
815 { |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
816 uint8_t newValue = 0; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
817 SSettings *pSettings = settingsGetPointer(); |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
818 |
604
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
819 switch(pSettings->MotionDetection) |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
820 { |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
821 case MOTION_DETECT_OFF: |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
822 newValue = MOTION_DETECT_MOVE; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
823 break; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
824 case MOTION_DETECT_MOVE: |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
825 newValue = MOTION_DETECT_SECTOR; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
826 break; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
827 case MOTION_DETECT_SECTOR: |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
828 newValue = MOTION_DETECT_SCROLL; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
829 break; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
830 case MOTION_DETECT_SCROLL: |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
831 newValue = MOTION_DETECT_OFF; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
832 break; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
833 default: |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
834 newValue = MOTION_DETECT_OFF; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
835 break; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
836 } |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
837 pSettings->MotionDetection = newValue; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
838 return UPDATE_DIVESETTINGS; |
fb5bb04ad914
Merged menu items of viewport and motion control:
Ideenmodellierer
parents:
600
diff
changeset
|
839 } |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
840 |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
841 uint8_t OnAction_CViewPortSpot(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
842 { |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
843 uint8_t newValue = 0; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
844 SSettings *pSettings = settingsGetPointer(); |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
845 |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
846 newValue = ((pSettings->viewPortMode >> 5) + 1) & 0x03; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
847 if(newValue > MAX_FOCUS_LIMITER) |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
848 { |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
849 newValue = 0; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
850 } |
640 | 851 pSettings->viewPortMode &= 0x9F; /* 1001 1111 */ |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
852 pSettings->viewPortMode |= (newValue << 5); |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
853 return UPDATE_DIVESETTINGS; |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
854 } |
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
625
diff
changeset
|
855 |
520 | 856 void openEdit_CustomviewDivemode(const uint8_t* pcv_changelist) |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
857 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
858 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
859 SSettings *pSettings = settingsGetPointer(); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
860 char text[MAX_PAGE_TEXTSIZE]; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
861 uint8_t textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
862 uint32_t id; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
863 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
864 uint8_t i; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
865 |
706
10b7d271b9c4
Bugfix: only reset menu if a new sub menu is created:
Ideenmodellierer
parents:
700
diff
changeset
|
866 resetMenuEdit(CLUT_MenuPageCustomView); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
867 customviewsSubpageMax = (tHome_getNumberOfAvailableCVs(pcv_changelist) / CV_PER_PAGE) + 1; |
531 | 868 |
869 if(pcv_curchangelist != pcv_changelist) /* new selection base? => reset page index */ | |
870 { | |
871 customviewsSubpage = 0; | |
872 } | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
873 pcv_curchangelist = pcv_changelist; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
874 |
520 | 875 CustomviewDivemode_refresh(pcv_changelist); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
876 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
877 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
878 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
879 textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
880 id = pcv_changelist[customviewsSubpage * 5 + i]; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
881 if((id == CVIEW_END) || (id == CVIEW_T3_END)) /* last list item? */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
882 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
883 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
884 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
885 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
886 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
887 if(pcv_changelist == cv_changelist) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
888 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
889 text[textPointer++] = '\006' - CHECK_BIT_THOME(pSettings->cv_configuration,id); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
890 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
891 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
892 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
893 text[textPointer++] = '\006' - CHECK_BIT_THOME(pSettings->cv_config_BigScreen,id); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
894 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
895 text[textPointer++] = ' '; |
520 | 896 textPointer += snprintf(&text[textPointer], 60, "%c%c\n\r", TXT_2BYTE, customview_TXT2BYTE_helper(id)); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
897 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
898 switch(i) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
899 { |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
900 case 0: write_field_button(StMCustom3_CViewSelection1, 30, 800, ME_Y_LINE1, &FontT48, ""); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
901 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
902 case 1: write_field_button(StMCustom3_CViewSelection2, 30, 800, ME_Y_LINE2, &FontT48, ""); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
903 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
904 case 2: write_field_button(StMCustom3_CViewSelection3, 30, 800, ME_Y_LINE3, &FontT48, ""); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
905 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
906 case 3: write_field_button(StMCustom3_CViewSelection4, 30, 800, ME_Y_LINE4, &FontT48, ""); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
907 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
908 case 4: write_field_button(StMCustom3_CViewSelection5, 30, 800, ME_Y_LINE5, &FontT48, ""); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
909 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
910 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
911 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
912 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
913 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
914 } |
750
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
915 for(;i<5;i++) /* clear empty lines in case menu shows less than 5 entries */ |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
916 { |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
917 switch(i) |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
918 { |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
919 case 0: write_label_var( 30, 800, ME_Y_LINE1, &FontT48, ""); |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
920 break; |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
921 case 1: write_label_var( 30, 800, ME_Y_LINE2, &FontT48, ""); |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
922 break; |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
923 case 2: write_label_var( 30, 800, ME_Y_LINE3, &FontT48, ""); |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
924 break; |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
925 case 3: write_label_var( 30, 800, ME_Y_LINE4, &FontT48, ""); |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
926 break; |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
927 case 4: write_label_var( 30, 800, ME_Y_LINE5, &FontT48, ""); |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
928 break; |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
929 default: |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
930 break; |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
931 }; |
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
932 } |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
933 if(customviewsSubpageMax != 1) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
934 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
935 textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
936 text[textPointer++] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
937 text[textPointer++] = TXT2BYTE_ButtonNext; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
938 text[textPointer] = 0; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
939 write_field_button(StMCustom3_CViewSelection6, 30, 800, ME_Y_LINE6, &FontT48, text); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
940 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
941 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
942 /* because of the ID handling inside of the functions, all buttons needs to be assigned before the events may be set => have the same loop twice */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
943 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
944 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
945 id = pcv_changelist[customviewsSubpage * 5 + i]; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
946 if((id == CVIEW_END) || (id == CVIEW_T3_END)) /* last list item? */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
947 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
948 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
949 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
950 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
951 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
952 switch(i) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
953 { |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
954 case 0: setEvent(StMCustom3_CViewSelection1, (uint32_t)OnAction_Customview_Toggle); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
955 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
956 case 1: setEvent(StMCustom3_CViewSelection2, (uint32_t)OnAction_Customview_Toggle); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
957 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
958 case 2: setEvent(StMCustom3_CViewSelection3, (uint32_t)OnAction_Customview_Toggle); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
959 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
960 case 3: setEvent(StMCustom3_CViewSelection4, (uint32_t)OnAction_Customview_Toggle); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
961 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
962 case 4: setEvent(StMCustom3_CViewSelection5, (uint32_t)OnAction_Customview_Toggle); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
963 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
964 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
965 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
966 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
967 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
968 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
969 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
970 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
971 if(customviewsSubpageMax != 1) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
972 { |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
973 setEvent(StMCustom3_CViewSelection6,(uint32_t)OnAction_Customview_NextPage); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
974 } |
750
6bd21ebe1a93
Avoid blinking in customer view selection page:
Ideenmodellierer
parents:
739
diff
changeset
|
975 |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
976 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
977 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
978 |
520 | 979 void openEdit_CustomviewDivemodeMenu(uint8_t line) |
980 { | |
981 static uint8_t customviewsSubpage = 0; | |
982 SSettings *pSettings = settingsGetPointer(); | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
983 |
815
ce8f71217f45
Bugfix CustomView selection during dive mode:
Ideenmodellierer
parents:
805
diff
changeset
|
984 customviewsSubpageMax = (tHome_getNumberOfAvailableCVs(cv_changelist) / CV_PER_PAGE) + 1; |
520 | 985 |
986 if((line == 6) || (cv_changelist[customviewsSubpage * 5 + line-1] == CVIEW_END)) /* select next set of views */ | |
987 { | |
988 customviewsSubpage++; | |
815
ce8f71217f45
Bugfix CustomView selection during dive mode:
Ideenmodellierer
parents:
805
diff
changeset
|
989 if(customviewsSubpage == customviewsSubpageMax) |
520 | 990 { |
991 customviewsSubpage = 0; | |
992 } | |
993 set_CustomsviewsSubpage(customviewsSubpage); | |
994 /* rebuild the selection page with the next set of customer views */ | |
815
ce8f71217f45
Bugfix CustomView selection during dive mode:
Ideenmodellierer
parents:
805
diff
changeset
|
995 updateSpecificMenu(StMSYS); |
520 | 996 openMenu(0); |
997 } | |
998 else | |
999 { | |
1000 pSettings->cv_configuration ^= 1 << (cv_changelist[customviewsSubpage * 5 + line-1]); | |
1001 if(t7_GetEnabled_customviews() == 0) | |
1002 { | |
1003 pSettings->cv_configuration ^= (1 << CVIEW_noneOrDebug); | |
1004 } | |
1005 InitMotionDetection(); /* consider new view setup for view selection by motion */ | |
1006 exitMenuEdit_to_Menu_with_Menu_Update(); | |
1007 } | |
1008 } | |
1009 | |
1010 uint8_t OnAction_ExtraDisplay (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
1011 { | |
1012 uint8_t newValue; | |
1013 | |
1014 newValue = settingsGetPointer()->extraDisplay + 1; | |
739 | 1015 |
520 | 1016 if(newValue >= EXTRADISPLAY_END) |
1017 { | |
1018 newValue = EXTRADISPLAY_none; | |
1019 } | |
1020 settingsGetPointer()->extraDisplay = newValue; | |
1021 return UNSPECIFIC_RETURN; | |
1022 } | |
1023 | |
1024 void CustomviewDivemode_refresh() | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1025 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1026 SSettings *pSettings = settingsGetPointer(); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1027 char text[MAX_PAGE_TEXTSIZE]; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1028 uint8_t textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1029 uint32_t id; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1030 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1031 uint8_t i; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1032 |
531 | 1033 text[textPointer++] = '\001'; |
1034 text[textPointer++] = TXT_2BYTE; | |
1035 text[textPointer++] = TXT2BYTE_SelectCustomviews; | |
1036 text[textPointer++] = ' '; | |
1037 text[textPointer++] = '1' + customviewsSubpage; | |
1038 text[textPointer++] = 0; | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1039 write_topline(text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1040 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1041 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1042 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1043 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1044 textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1045 id = pcv_curchangelist[customviewsSubpage * 5 + i]; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1046 if((id == CVIEW_END) || (id == CVIEW_T3_END)) /* last list item? */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1047 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1048 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1049 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1050 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1051 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1052 if(pcv_curchangelist == cv_changelist) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1053 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1054 text[textPointer++] = '\006' - CHECK_BIT_THOME(pSettings->cv_configuration,id); |
820 | 1055 text[textPointer++] = ' '; |
1056 textPointer += snprintf(&text[textPointer], 60, "%c%c\n\r", TXT_2BYTE, customview_TXT2BYTE_helper(id)); | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1057 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1058 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1059 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1060 text[textPointer++] = '\006' - CHECK_BIT_THOME(pSettings->cv_config_BigScreen,id); |
820 | 1061 text[textPointer++] = ' '; |
1062 textPointer += snprintf(&text[textPointer], 60, "%c%c\n\r", TXT_2BYTE, customviewBF_TXT2BYTE_helper(id)); | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1063 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1064 |
820 | 1065 switch(i) |
1066 { | |
1067 case 0: write_label_var( 30, 800, ME_Y_LINE1, &FontT48, text); | |
1068 break; | |
1069 case 1: write_label_var( 30, 800, ME_Y_LINE2, &FontT48, text); | |
1070 break; | |
1071 case 2: write_label_var( 30, 800, ME_Y_LINE3, &FontT48, text); | |
1072 break; | |
1073 case 3: write_label_var( 30, 800, ME_Y_LINE4, &FontT48, text); | |
1074 break; | |
1075 case 4: write_label_var( 30, 800, ME_Y_LINE5, &FontT48, text); | |
1076 break; | |
1077 default: | |
1078 break; | |
1079 } | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1080 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1081 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1082 if(customviewsSubpageMax != 1) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1083 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1084 textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1085 text[textPointer++] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1086 text[textPointer++] = TXT2BYTE_ButtonNext; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1087 text[textPointer] = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1088 write_label_var( 30, 800, ME_Y_LINE6, &FontT48, text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1089 } |
515
218ac999e96b
Added missing display of button labels in refresh function:
Ideenmodellierer
parents:
506
diff
changeset
|
1090 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1091 } |
834
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1092 |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1093 uint8_t HandleAFCompass() |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1094 { |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1095 static uint8_t debounce = 0; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1096 static uint8_t lastState = 0; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1097 uint8_t detectionState = 0; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1098 |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1099 float pitch = stateRealGetPointer()->lifeData.compass_pitch; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1100 float roll = stateRealGetPointer()->lifeData.compass_roll; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1101 |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1102 if((pitch > -5.0) && (pitch < 5.0) && (roll > -5.0) && (roll < 5.0)) /* OSTC in horizontal position */ |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1103 { |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1104 if(debounce < 10) debounce++; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1105 if(debounce == 10) |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1106 { |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1107 detectionState = 1; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1108 // debounce = 0; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1109 // t3_select_customview(CVIEW_T3_Navigation); |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1110 } |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1111 } |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1112 else |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1113 { |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1114 if(debounce > 0) debounce--; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1115 if(debounce == 0) |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1116 { |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1117 detectionState = 2; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1118 } |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1119 } |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1120 if(detectionState) /* no state change => return 0 */ |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1121 { |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1122 if((detectionState == lastState)) |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1123 { |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1124 detectionState = 0; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1125 } |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1126 else |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1127 { |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1128 lastState = detectionState; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1129 } |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1130 } |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1131 return detectionState; |
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
820
diff
changeset
|
1132 } |