Mercurial > public > ostc4
annotate Discovery/Src/tMenuCustom.c @ 857:ba1aebc6d5af Evo_2_23
Developer feature debug warning:
The debug warnings are only available to developers who activate the feature via compile switch. After that it is possible to define a condition and a content of a warning which will be shown if a special situation occure (visualized in the main view as already done for other warnings like ppo2). In the first implementation details regarding the error state of the DiveO2 will be shown in case the sensor reports a problem. Feel free to change the implementation in case you want to observe another behavior.
author | Ideenmodellierer |
---|---|
date | Sun, 05 May 2024 17:27:28 +0200 |
parents | 4a6bffaa38b3 |
children |
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/tMenuCustom.c |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
5 /// \brief Menu Custom - Provide access to custom view options |
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 25-Aug-2020 |
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-2020 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 <stdio.h> |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
31 #include <string.h> |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
32 #include "tMenu.h" |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
33 #include "tHome.h" |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
34 #include "tStructure.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
35 #include "tMenuCustom.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
36 #include "text_multilanguage.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
37 #include "data_central.h" |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
38 #include "motion.h" |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
521
diff
changeset
|
39 #include "gfx_fonts.h" |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
521
diff
changeset
|
40 #include "tInfo.h" |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
521
diff
changeset
|
41 #include "motion.h" |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
42 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
43 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
44 /* Exported functions --------------------------------------------------------*/ |
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 uint32_t tMCustom_refresh(uint8_t line, char *text, uint16_t *tab, char *subtext) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
47 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
48 uint8_t textPointer; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
49 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
50 textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
51 *tab = 550; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
52 *subtext = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
53 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
54 if((line == 0) || (line == 1)) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
55 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
56 text[textPointer++] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
57 text[textPointer++] = TXT2BYTE_Customviews; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
58 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
59 text[textPointer++] = '\n'; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
60 text[textPointer++] = '\r'; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
61 text[textPointer] = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
62 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
63 if((line == 0) || (line == 2)) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
64 { |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
65 text[textPointer++] = TXT_2BYTE; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
66 text[textPointer++] = TXT2BYTE_ExtraDisplay; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
67 text[textPointer++] = ' '; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
68 text[textPointer++] = ' '; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
69 text[textPointer++] = TXT_2BYTE; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
70 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
71 switch(settingsGetPointer()->extraDisplay) |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
72 { |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
73 /* BigFont */ |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
74 case EXTRADISPLAY_BIGFONT: |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
75 text[textPointer++] = TXT2BYTE_ExtraBigFont; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
76 break; |
739 | 77 /* Start screen */ |
78 case EXTRADISPLAY_BFACTIVE: | |
79 text[textPointer++] = TXT2BYTE_ExtraActive; | |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
80 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
81 /* none */ |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
82 case EXTRADISPLAY_none: |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
83 text[textPointer++] = TXT2BYTE_ExtraNone; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
84 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
85 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
86 default: |
630 | 87 snprintf(&text[textPointer++],4,"%u",settingsGetPointer()->extraDisplay); |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
88 break; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
89 } |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
90 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
91 strcpy(&text[textPointer],"\n\r"); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
92 textPointer += 2; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
93 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
94 if((line == 0) || (line == 3)) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
95 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
96 text[textPointer++] = TXT_2BYTE; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
97 text[textPointer++] = TXT2BYTE_SelectCustomviews; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
98 } |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
99 strcpy(&text[textPointer],"\n\r"); |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
100 textPointer += 2; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
101 |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
102 if((line == 0) || (line == 4)) |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
103 { |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
104 text[textPointer++] = TXT_2BYTE; |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
105 text[textPointer++] = TXT2BYTE_SelectBigFont; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
106 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
107 strcpy(&text[textPointer],"\n\r"); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
108 textPointer += 2; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
109 |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
110 #ifdef ENABLE_MOTION_CONTROL |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
111 if((line == 0) || (line == 5)) |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
112 { |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
113 /* MotionCtrl */ |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
114 text[textPointer++] = TXT_2BYTE; |
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
115 text[textPointer++] = TXT2BYTE_MotionCtrl; |
552
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
521
diff
changeset
|
116 } |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
521
diff
changeset
|
117 |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
521
diff
changeset
|
118 strcpy(&text[textPointer],"\n\r"); |
531e7818b737
Added menu structure to acces viewport calibration:
Ideenmodellierer
parents:
521
diff
changeset
|
119 textPointer += 2; |
521
e221cf762f45
Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents:
506
diff
changeset
|
120 #endif |
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
121 return StMCustom; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
122 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
123 |