Mercurial > public > ostc4
annotate Discovery/Src/tMenuEditCustom.c @ 574:01ee21dd311f
Improved focus detection:
In previous version th calibration window was turned into the current one. At all two translations were used causing a jitter. Now the current view is translated into the calibration windows by one step increasing the quality of the prediction.
Reworked detection of pitch/sector/scroll events:
Sector and scroll uses pitch angles to calculate the view to show. Movment detection uses movment, which may also be out of focus for a short time. To improve all detections these two use cases are now handled individual. Sector and scroll have increased action angle in case yaw and roll stay stable.
author | Ideenmodellierer |
---|---|
date | Wed, 25 Nov 2020 20:26:01 +0100 |
parents | f3463c06b2d3 |
children | 86c4baa6ba29 |
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 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
46 #define CV_PER_PAGE (5u) /* number of cv selections shown at one page */ |
520 | 47 #define CV_SUBPAGE_MAX (2u) /* max number of customer view selection pages */ |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
48 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
49 static uint8_t customviewsSubpage = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
50 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
|
51 static const uint8_t* pcv_curchangelist; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
52 /* Private function prototypes -----------------------------------------------*/ |
520 | 53 void openEdit_Customview(void); |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
54 void openEdit_BigScreen(void); |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
55 void openEdit_MotionCtrl(void); |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
56 void openEdit_ViewPort(void); |
520 | 57 void refresh_Customviews(void); |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
58 char customview_TXT2BYTE_helper(uint8_t customViewId); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
59 /* Announced function prototypes -----------------------------------------------*/ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
60 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
|
61 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
|
62 uint8_t OnAction_CViewStandardBF(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
|
63 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
|
64 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
|
65 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
|
66 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
|
67 uint8_t OnAction_CViewPortAmbient(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
|
68 /* Exported functions --------------------------------------------------------*/ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
69 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
70 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
71 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
72 |
520 | 73 void refresh_Customviews(void) |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
74 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
75 char text[32]; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
76 uint8_t textpointer = 0; |
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 // header |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
79 text[0] = '\001'; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
80 text[1] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
81 text[2] = TXT2BYTE_Customviews; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
82 text[3] = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
83 write_topline(text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
84 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
85 // custom view center return |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
86 textpointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
87 text[textpointer++] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
88 text[textpointer++] = TXT2BYTE_CViewTimeout; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
89 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
|
90 write_label_var( 30, 700, ME_Y_LINE1, &FontT48, text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
91 |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
92 // custom view center primary |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
93 text[0] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
94 text[1] = TXT2BYTE_CViewStandard; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
95 text[2] = ' '; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
96 text[3] = ' '; |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
97 |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
98 text[4] = TXT_2BYTE; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
99 text[5] = customview_TXT2BYTE_helper(settingsGetPointer()->tX_customViewPrimary); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
100 text[6] = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
101 write_label_var( 30, 700, ME_Y_LINE2, &FontT48, text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
102 |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
103 // custom view big font |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
104 text[0] = TXT_2BYTE; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
105 text[1] = TXT2BYTE_ExtraDisplay; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
106 text[2] = ' '; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
107 text[3] = ' '; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
108 text[4] = TXT_2BYTE; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
109 text[5] = customview_TXT2BYTE_helper(settingsGetPointer()->tX_customViewPrimaryBF); |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
110 text[6] = 0; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
111 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
|
112 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
113 // field corner return |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
114 textpointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
115 text[textpointer++] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
116 text[textpointer++] = TXT2BYTE_CornerTimeout; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
117 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
|
118 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
|
119 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
120 // field corner primary |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
121 text[0] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
122 text[1] = TXT2BYTE_CornerStandard; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
123 text[2] = ' '; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
124 text[3] = ' '; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
125 switch(settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
126 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
127 /* Temperature */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
128 case LLC_Temperature: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
129 text[4] = TXT_Temperature; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
130 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
131 /* Average Depth */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
132 case LLC_AverageDepth: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
133 text[4] = TXT_AvgDepth; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
134 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
135 /* ppO2 */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
136 case LLC_ppO2: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
137 text[4] = TXT_ppO2; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
138 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
139 /* Stop Uhr */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
140 case LLC_Stopwatch: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
141 text[4] = TXT_Stopwatch; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
142 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
143 /* Ceiling */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
144 case LLC_Ceiling: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
145 text[4] = TXT_Ceiling; |
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 /* Future TTS */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
148 case LLC_FutureTTS: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
149 text[4] = TXT_FutureTTS; |
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 /* CNS */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
152 case LLC_CNS: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
153 text[4] = TXT_CNS; |
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 case LLC_GF: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
156 text[4] = TXT_ActualGradient; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
157 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
158 #ifdef ENABLE_BOTTLE_SENSOR |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
159 case LCC_BottleBar: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
160 text[4] = TXT_AtemGasVorrat; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
161 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
162 #endif |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
163 /* none */ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
164 case LLC_Empty: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
165 text[4] = '-'; |
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 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
168 snprintf(&text[4],2,"%u",settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
169 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
170 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
171 text[5] = 0; |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
172 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
|
173 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
174 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
175 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
176 |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
177 void refresh_ViewPort(void) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
178 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
179 uint16_t heading; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
180 char text[32]; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
181 uint8_t textIndex = 0; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
182 float distance = 0.0; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
183 SSettings* pSettings = settingsGetPointer(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
184 GFX_DrawCfgScreen* pdrawScreen; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
185 point_t lowerleft = {0,0}; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
186 point_t upperright = {799,479}; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
187 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
188 text[0] = '\001'; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
189 text[1] = TXT_2BYTE; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
190 text[2] = TXT2BYTE_CalibView; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
191 text[3] = 0; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
192 write_topline(text); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
193 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
194 text[0] = TXT_2BYTE; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
195 text[1] = TXT2BYTE_CalibView; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
196 text[2] = 0; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
197 write_label_var( 30, 700, ME_Y_LINE3, &FontT48, text); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
198 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
199 if(pSettings->compassInertia) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
200 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
201 heading = (uint16_t)compass_getCompensated(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
202 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
203 else |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
204 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
205 heading = (uint16_t)stateUsed->lifeData.compass_heading; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
206 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
207 snprintf(text,32,"\001%03i`",heading); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
208 write_label_var( 30, 700, ME_Y_LINE1, &FontT48, text); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
209 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
210 textIndex = 0; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
211 text[textIndex++] = TXT_2BYTE; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
212 text[textIndex++] = TXT2BYTE_IndicateFrame; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
213 text[textIndex++] = ' '; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
214 text[textIndex++] = '\006' - (settingsGetPointer()->viewPortMode >> 4); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
215 text[textIndex++] = 0; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
216 write_label_var( 30, 700, ME_Y_LINE5, &FontT48, text); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
217 textIndex = 0; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
218 text[textIndex++] = TXT_2BYTE; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
219 text[textIndex++] = TXT2BYTE_BoostBacklight; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
220 text[textIndex++] = ' '; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
221 snprintf(&text[textIndex],32," %d",(settingsGetPointer()->viewPortMode & 0x3)); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
222 write_label_var( 30, 700, ME_Y_LINE6, &FontT48, text); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
223 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
224 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
225 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
226 /* test if we are in focus */ |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
227 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
|
228 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
229 distance = checkViewport(stateUsed->lifeData.compass_roll, stateUsed->lifeData.compass_pitch, stateUsed->lifeData.compass_heading); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
230 |
572 | 231 if(pSettings->showDebugInfo) |
232 { | |
233 snprintf(text,32,"\001%03.3f",distance); | |
234 write_label_var( 30, 700, ME_Y_LINE2, &FontT48, text); | |
235 } | |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
236 if(distance < 0.5) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
237 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
238 set_Backlight_Boost(settingsGetPointer()->viewPortMode & 0x03); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
239 if(pSettings->viewPortMode >> 4) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
240 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
241 pdrawScreen = getMenuEditScreen(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
242 GFX_draw_box(pdrawScreen,lowerleft,upperright,0,CLUT_NiceGreen); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
243 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
244 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
245 else |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
246 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
247 set_Backlight_Boost(0); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
248 if(pSettings->viewPortMode >> 4) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
249 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
250 pdrawScreen = getMenuEditScreen(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
251 GFX_draw_box(pdrawScreen,lowerleft,upperright,0,CLUT_MenuTopBackground); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
252 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
253 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
254 resetFocusState(); /* no other instance shall be impacted by the local detection */ |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
255 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
256 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
257 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
258 |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
259 void openEdit_Custom(uint8_t line) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
260 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
261 set_globalState_Menu_Line(line); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
262 resetMenuEdit(CLUT_MenuPageCustomView); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
263 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
264 switch(line) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
265 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
266 case 1: |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
267 default: openEdit_Customview(); |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
268 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
269 case 2: openEdit_BigScreen(); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
270 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
271 case 3: openEdit_CustomviewDivemode(cv_changelist); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
272 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
273 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
|
274 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
275 case 5: openEdit_MotionCtrl(); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
276 break; |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
277 case 6: openEdit_ViewPort(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
278 break; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
279 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
280 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
281 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
282 /* Private functions ---------------------------------------------------------*/ |
520 | 283 void openEdit_Customview(void) |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
284 { |
520 | 285 refresh_Customviews(); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
286 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
287 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
|
288 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
|
289 write_field_button(StMCustom1_CViewStandardBF, 400, 700, ME_Y_LINE3, &FontT48, ""); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
290 |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
291 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
|
292 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
|
293 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
294 setEvent(StMCustom1_CViewTimeout, (uint32_t)OnAction_CViewTimeout); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
295 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
|
296 setEvent(StMCustom1_CViewStandardBF, (uint32_t)OnAction_CViewStandardBF); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
297 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
298 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
|
299 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
|
300 } |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
301 |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
302 void openEdit_BigScreen(void) |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
303 { |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
304 uint8_t newValue = 0; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
305 SSettings *pSettings = settingsGetPointer(); |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
306 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
307 newValue = pSettings->extraDisplay + 1; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
308 if(newValue == EXTRADISPLAY_DECOGAME) /* Decogame not yet implemented */ |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
309 { |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
310 newValue++; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
311 } |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
312 if(newValue >= EXTRADISPLAY_END) |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
313 { |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
314 newValue = EXTRADISPLAY_none; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
315 } |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
316 pSettings->extraDisplay = newValue; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
317 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
318 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
|
319 } |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
320 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
321 void openEdit_MotionCtrl(void) |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
322 { |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
323 uint8_t newValue = 0; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
324 SSettings *pSettings = settingsGetPointer(); |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
325 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
326 switch(pSettings->MotionDetection) |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
327 { |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
328 case MOTION_DETECT_OFF: |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
329 newValue = MOTION_DETECT_MOVE; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
330 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
331 case MOTION_DETECT_MOVE: |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
332 newValue = MOTION_DETECT_SECTOR; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
333 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
334 case MOTION_DETECT_SECTOR: |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
335 newValue = MOTION_DETECT_SCROLL; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
336 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
337 case MOTION_DETECT_SCROLL: |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
338 newValue = MOTION_DETECT_OFF; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
339 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
340 default: |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
341 newValue = MOTION_DETECT_OFF; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
342 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
343 } |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
344 pSettings->MotionDetection = newValue; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
345 InitMotionDetection(); |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
346 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
347 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
|
348 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
349 |
552
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 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
352 void openEdit_ViewPort(void) |
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 refresh_ViewPort(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
355 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
356 write_field_button(StMCustom6_CViewPortCalib, 400, 700, ME_Y_LINE3, &FontT48, ""); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
357 write_field_button(StMCustom6_CViewPortLayout, 400, 700, ME_Y_LINE5, &FontT48, ""); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
358 write_field_button(StMCustom6_CViewPortAmbient, 400, 700, ME_Y_LINE6, &FontT48, ""); |
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 setEvent(StMCustom6_CViewPortCalib, (uint32_t)OnAction_CViewPortCalib); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
361 setEvent(StMCustom6_CViewPortLayout, (uint32_t)OnAction_CViewPortLayout); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
362 setEvent(StMCustom6_CViewPortAmbient, (uint32_t)OnAction_CViewPortAmbient); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
363 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
364 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
365 |
520 | 366 char customview_TXT2BYTE_helper(uint8_t customViewId) |
506
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 char text = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
369 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
370 switch(customViewId) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
371 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
372 case CVIEW_sensors: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
373 text = TXT2BYTE_O2monitor; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
374 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
375 case CVIEW_sensors_mV: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
376 text = TXT2BYTE_O2voltage; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
377 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
378 case CVIEW_Compass: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
379 text = TXT2BYTE_Compass; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
380 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
381 case CVIEW_Decolist: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
382 case CVIEW_T3_Decostop: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
383 text = TXT2BYTE_Decolist; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
384 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
385 case CVIEW_Tissues: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
386 text = TXT2BYTE_Tissues; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
387 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
388 case CVIEW_Profile: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
389 text = TXT2BYTE_Profile; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
390 break; |
531 | 391 case CVIEW_Gaslist: |
515
218ac999e96b
Added missing display of button labels in refresh function:
Ideenmodellierer
parents:
506
diff
changeset
|
392 case CVIEW_T3_GasList: |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
393 text = TXT2BYTE_Gaslist; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
394 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
395 case CVIEW_EADTime: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
396 text = TXT2BYTE_Info; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
397 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
398 case CVIEW_SummaryOfLeftCorner: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
399 text = TXT2BYTE_Summary; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
400 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
401 case CVIEW_noneOrDebug: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
402 text = TXT2BYTE_DispNoneDbg; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
403 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
404 case CVIEW_T3_MaxDepth: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
405 text = TXT2BYTE_MaxDepth; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
406 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
407 case CVIEW_T3_StopWatch: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
408 text = TXT2BYTE_Stopwatch; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
409 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
410 case CVIEW_T3_TTS: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
411 text = TXT2BYTE_TTS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
412 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
413 case CVIEW_T3_ppO2andGas: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
414 text = TXT2BYTE_ppoNair; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
415 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
416 case CVIEW_T3_Navigation: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
417 text = TXT2BYTE_Navigation; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
418 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
419 case CVIEW_T3_DepthData: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
420 text = TXT2BYTE_DepthData; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
421 break; |
542
6960df7ddb09
Added new t3 view showing first deco stop and tts in parallel:
Ideenmodellierer
parents:
541
diff
changeset
|
422 case CVIEW_T3_DecoTTS: |
6960df7ddb09
Added new t3 view showing first deco stop and tts in parallel:
Ideenmodellierer
parents:
541
diff
changeset
|
423 text = TXT2BYTE_DecoTTS; |
6960df7ddb09
Added new t3 view showing first deco stop and tts in parallel:
Ideenmodellierer
parents:
541
diff
changeset
|
424 break; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
425 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
426 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
427 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
428 return text; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
429 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
430 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
431 |
520 | 432 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
|
433 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
434 uint8_t value; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
435 value = settingsGetPointer()->tX_customViewTimeout; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
436 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
437 if(value < 5) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
438 value = 5; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
439 else if(value < 10) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
440 value = 10; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
441 else if(value < 15) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
442 value = 15; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
443 else if(value < 20) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
444 value = 20; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
445 else if(value < 30) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
446 value = 30; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
447 else if(value < 45) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
448 value = 45; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
449 else if(value < 60) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
450 value = 60; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
451 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
452 value = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
453 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
454 settingsGetPointer()->tX_customViewTimeout = value; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
455 return UPDATE_DIVESETTINGS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
456 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
457 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
458 |
520 | 459 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
|
460 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
461 uint8_t newValue; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
462 switch(settingsGetPointer()->tX_customViewPrimary) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
463 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
464 case CVIEW_sensors: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
465 newValue = CVIEW_sensors_mV; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
466 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
467 case CVIEW_sensors_mV: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
468 newValue = CVIEW_Compass; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
469 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
470 case CVIEW_Compass: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
471 newValue = CVIEW_Decolist; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
472 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
473 case CVIEW_Decolist: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
474 newValue = CVIEW_Tissues; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
475 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
476 case CVIEW_Tissues: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
477 newValue = CVIEW_Profile; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
478 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
479 case CVIEW_Profile: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
480 newValue = CVIEW_Gaslist; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
481 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
482 case CVIEW_Gaslist: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
483 newValue = CVIEW_EADTime; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
484 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
485 case CVIEW_EADTime: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
486 newValue = CVIEW_SummaryOfLeftCorner; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
487 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
488 case CVIEW_SummaryOfLeftCorner: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
489 newValue = CVIEW_noneOrDebug; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
490 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
491 case CVIEW_noneOrDebug: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
492 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
493 newValue = CVIEW_sensors; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
494 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
495 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
496 settingsGetPointer()->tX_customViewPrimary = newValue; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
497 return UPDATE_DIVESETTINGS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
498 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
499 |
541
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
500 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
|
501 { |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
502 uint8_t index = 0; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
503 uint8_t newValue; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
504 |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
505 /* list contains all views which may be selected => get index of current setting */ |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
506 while((settingsGetPointer()->tX_customViewPrimaryBF != cv_changelist_BS[index]) || (cv_changelist_BS[index] == CVIEW_T3_END)) |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
507 { |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
508 index++; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
509 } |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
510 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
|
511 { |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
512 newValue = cv_changelist_BS[0]; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
513 } |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
514 else |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
515 { |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
516 newValue = cv_changelist_BS[index + 1]; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
517 } |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
518 |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
519 settingsGetPointer()->tX_customViewPrimaryBF = newValue; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
520 return UPDATE_DIVESETTINGS; |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
521 } |
6fbf7cd391cb
Added default view selection and auto return to view to t3 visualization:
Ideenmodellierer
parents:
531
diff
changeset
|
522 |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
523 |
520 | 524 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
|
525 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
526 uint8_t value; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
527 value = settingsGetPointer()->tX_userselectedLeftLowerCornerTimeout; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
528 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
529 if(value < 5) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
530 value = 5; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
531 else if(value < 10) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
532 value = 10; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
533 else if(value < 15) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
534 value = 15; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
535 else if(value < 20) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
536 value = 20; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
537 else if(value < 30) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
538 value = 30; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
539 else if(value < 45) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
540 value = 45; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
541 else if(value < 60) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
542 value = 60; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
543 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
544 value = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
545 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
546 settingsGetPointer()->tX_userselectedLeftLowerCornerTimeout = value; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
547 return UPDATE_DIVESETTINGS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
548 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
549 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
550 |
520 | 551 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
|
552 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
553 uint8_t value; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
554 value = settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
555 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
556 value += 1; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
557 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
558 if(value >= LLC_END) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
559 value = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
560 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
561 settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary = value; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
562 return UPDATE_DIVESETTINGS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
563 } |
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 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
566 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
|
567 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
568 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
569 uint8_t line = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
570 SSettings *pSettings = settingsGetPointer(); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
571 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
572 switch(editId) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
573 { |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
574 case StMCustom3_CViewSelection1: line = 1; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
575 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
576 case StMCustom3_CViewSelection2: line = 2; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
577 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
578 case StMCustom3_CViewSelection3: line = 3; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
579 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
580 case StMCustom3_CViewSelection4: line = 4; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
581 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
582 case StMCustom3_CViewSelection5: line = 5; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
583 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
584 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
585 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
586 break; |
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 if(pcv_curchangelist == cv_changelist) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
589 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
590 pSettings->cv_configuration ^= 1 << (pcv_curchangelist[customviewsSubpage * 5 + line-1]); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
591 if(t7_GetEnabled_customviews() == 0) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
592 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
593 pSettings->cv_configuration ^= (1 << CVIEW_noneOrDebug); |
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 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
596 else |
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 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
|
599 if(t3_GetEnabled_customviews() == 0) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
600 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
601 pSettings->cv_config_BigScreen ^= (1 << CVIEW_noneOrDebug); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
602 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
603 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
604 return UPDATE_DIVESETTINGS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
605 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
606 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
607 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
608 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
|
609 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
610 customviewsSubpage++; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
611 if(customviewsSubpage == customviewsSubpageMax) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
612 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
613 customviewsSubpage = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
614 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
615 resetMenuEdit(CLUT_MenuPageCustomView); /* rebuild page */ |
520 | 616 openEdit_CustomviewDivemode(pcv_curchangelist); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
617 |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
618 tMenuEdit_select(StMCustom3_CViewSelection6); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
619 return UPDATE_DIVESETTINGS; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
620 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
621 |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
622 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
|
623 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
624 float heading; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
625 if(settingsGetPointer()->compassInertia) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
626 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
627 heading = (uint16_t)compass_getCompensated(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
628 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
629 else |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
630 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
631 heading = (uint16_t)stateUsed->lifeData.compass_heading; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
632 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
633 calibrateViewport(stateUsed->lifeData.compass_roll,stateUsed->lifeData.compass_pitch,heading); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
634 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
635 return UPDATE_DIVESETTINGS; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
636 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
637 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
|
638 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
639 SSettings* pSettings = settingsGetPointer(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
640 if(pSettings->viewPortMode >> 4 != 0) |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
641 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
642 pSettings->viewPortMode &= 0x0F; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
643 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
644 else |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
645 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
646 pSettings->viewPortMode |= 0x10; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
647 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
648 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
649 return UPDATE_DIVESETTINGS; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
650 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
651 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
|
652 { |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
653 SSettings* pSettings = settingsGetPointer(); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
654 pSettings->viewPortMode = (pSettings->viewPortMode + 1) & 0xF3; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
655 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
656 return UPDATE_DIVESETTINGS; |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
657 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
658 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
659 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
542
diff
changeset
|
660 |
520 | 661 void openEdit_CustomviewDivemode(const uint8_t* pcv_changelist) |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
662 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
663 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
664 SSettings *pSettings = settingsGetPointer(); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
665 char text[MAX_PAGE_TEXTSIZE]; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
666 uint8_t textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
667 uint32_t id; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
668 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
669 uint8_t i; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
670 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
671 customviewsSubpageMax = (tHome_getNumberOfAvailableCVs(pcv_changelist) / CV_PER_PAGE) + 1; |
531 | 672 |
673 if(pcv_curchangelist != pcv_changelist) /* new selection base? => reset page index */ | |
674 { | |
675 customviewsSubpage = 0; | |
676 } | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
677 pcv_curchangelist = pcv_changelist; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
678 |
520 | 679 CustomviewDivemode_refresh(pcv_changelist); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
680 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
681 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
|
682 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
683 textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
684 id = pcv_changelist[customviewsSubpage * 5 + i]; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
685 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
|
686 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
687 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
688 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
689 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
690 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
691 if(pcv_changelist == cv_changelist) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
692 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
693 text[textPointer++] = '\006' - CHECK_BIT_THOME(pSettings->cv_configuration,id); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
694 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
695 else |
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 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
|
698 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
699 text[textPointer++] = ' '; |
520 | 700 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
|
701 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
702 switch(i) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
703 { |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
704 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
|
705 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
706 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
|
707 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
708 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
|
709 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
710 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
|
711 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
712 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
|
713 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
714 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
715 break; |
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 } |
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 if(customviewsSubpageMax != 1) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
721 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
722 textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
723 text[textPointer++] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
724 text[textPointer++] = TXT2BYTE_ButtonNext; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
725 text[textPointer] = 0; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
726 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
|
727 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
728 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
729 /* 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
|
730 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
|
731 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
732 id = pcv_changelist[customviewsSubpage * 5 + i]; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
733 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
|
734 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
735 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
736 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
737 else |
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 switch(i) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
740 { |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
741 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
|
742 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
743 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
|
744 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
745 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
|
746 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
747 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
|
748 break; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
749 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
|
750 break; |
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 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
753 break; |
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 |
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 if(customviewsSubpageMax != 1) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
759 { |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
520
diff
changeset
|
760 setEvent(StMCustom3_CViewSelection6,(uint32_t)OnAction_Customview_NextPage); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
761 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
762 for(;i<5;i++) /* clear empty lines in case menu shows less than 5 entries */ |
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 switch(i) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
765 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
766 case 0: write_label_var( 30, 800, ME_Y_LINE1, &FontT48, ""); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
767 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
768 case 1: write_label_var( 30, 800, ME_Y_LINE2, &FontT48, ""); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
769 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
770 case 2: write_label_var( 30, 800, ME_Y_LINE3, &FontT48, ""); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
771 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
772 case 3: write_label_var( 30, 800, ME_Y_LINE4, &FontT48, ""); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
773 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
774 case 4: write_label_var( 30, 800, ME_Y_LINE5, &FontT48, ""); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
775 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
776 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
777 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
778 }; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
779 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
780 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
781 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
782 |
520 | 783 void openEdit_CustomviewDivemodeMenu(uint8_t line) |
784 { | |
785 static uint8_t customviewsSubpage = 0; | |
786 SSettings *pSettings = settingsGetPointer(); | |
787 char text[MAX_PAGE_TEXTSIZE]; | |
788 uint16_t tabPosition; | |
789 uint32_t id; | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
790 |
520 | 791 |
792 if((line == 6) || (cv_changelist[customviewsSubpage * 5 + line-1] == CVIEW_END)) /* select next set of views */ | |
793 { | |
794 customviewsSubpage++; | |
795 if(customviewsSubpage == CV_SUBPAGE_MAX) | |
796 { | |
797 customviewsSubpage = 0; | |
798 } | |
799 set_CustomsviewsSubpage(customviewsSubpage); | |
800 /* rebuild the selection page with the next set of customer views */ | |
801 id = tMSystem_refresh(0, text, &tabPosition, NULL); | |
802 tM_build_page(id, text, tabPosition, NULL); | |
803 openMenu(0); | |
804 } | |
805 else | |
806 { | |
807 pSettings->cv_configuration ^= 1 << (cv_changelist[customviewsSubpage * 5 + line-1]); | |
808 if(t7_GetEnabled_customviews() == 0) | |
809 { | |
810 pSettings->cv_configuration ^= (1 << CVIEW_noneOrDebug); | |
811 } | |
812 InitMotionDetection(); /* consider new view setup for view selection by motion */ | |
813 exitMenuEdit_to_Menu_with_Menu_Update(); | |
814 } | |
815 } | |
816 | |
817 uint8_t OnAction_ExtraDisplay (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
818 { | |
819 uint8_t newValue; | |
820 | |
821 newValue = settingsGetPointer()->extraDisplay + 1; | |
822 if(newValue == EXTRADISPLAY_DECOGAME) /* Decogame not yet implemented */ | |
823 { | |
824 newValue++; | |
825 } | |
826 if(newValue >= EXTRADISPLAY_END) | |
827 { | |
828 newValue = EXTRADISPLAY_none; | |
829 } | |
830 settingsGetPointer()->extraDisplay = newValue; | |
831 return UNSPECIFIC_RETURN; | |
832 } | |
833 | |
834 void CustomviewDivemode_refresh() | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
835 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
836 SSettings *pSettings = settingsGetPointer(); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
837 char text[MAX_PAGE_TEXTSIZE]; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
838 uint8_t textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
839 uint32_t id; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
840 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
841 uint8_t i; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
842 |
531 | 843 text[textPointer++] = '\001'; |
844 text[textPointer++] = TXT_2BYTE; | |
845 text[textPointer++] = TXT2BYTE_SelectCustomviews; | |
846 text[textPointer++] = ' '; | |
847 text[textPointer++] = '1' + customviewsSubpage; | |
848 text[textPointer++] = 0; | |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
849 write_topline(text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
850 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
851 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
852 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
|
853 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
854 textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
855 id = pcv_curchangelist[customviewsSubpage * 5 + i]; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
856 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
|
857 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
858 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
859 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
860 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
861 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
862 if(pcv_curchangelist == cv_changelist) |
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 text[textPointer++] = '\006' - CHECK_BIT_THOME(pSettings->cv_configuration,id); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
865 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
866 else |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
867 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
868 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
|
869 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
870 text[textPointer++] = ' '; |
520 | 871 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
|
872 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
873 switch(i) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
874 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
875 case 0: write_label_var( 30, 800, ME_Y_LINE1, &FontT48, text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
876 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
877 case 1: write_label_var( 30, 800, ME_Y_LINE2, &FontT48, text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
878 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
879 case 2: write_label_var( 30, 800, ME_Y_LINE3, &FontT48, text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
880 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
881 case 3: write_label_var( 30, 800, ME_Y_LINE4, &FontT48, text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
882 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
883 case 4: write_label_var( 30, 800, ME_Y_LINE5, &FontT48, text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
884 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
885 default: |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
886 break; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
887 } |
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 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
890 if(customviewsSubpageMax != 1) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
891 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
892 textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
893 text[textPointer++] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
894 text[textPointer++] = TXT2BYTE_ButtonNext; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
895 text[textPointer] = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
896 write_label_var( 30, 800, ME_Y_LINE6, &FontT48, text); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
897 } |
515
218ac999e96b
Added missing display of button labels in refresh function:
Ideenmodellierer
parents:
506
diff
changeset
|
898 write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext); |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
899 } |