Mercurial > public > ostc4
annotate Discovery/Src/tMenuXtra.c @ 618:96af74455420
Development bugfix: focus state not remembered:
Somehow the static in front of the focus state has disappeared. After returning it again the focus detection is available again.
author | Ideenmodellierer |
---|---|
date | Wed, 27 Jan 2021 22:04:45 +0100 |
parents | 1b243c6c7067 |
children | 890440ab993a |
rev | line source |
---|---|
38 | 1 /////////////////////////////////////////////////////////////////////////////// |
2 /// -*- coding: UTF-8 -*- | |
3 /// | |
4 /// \file Discovery/Src/tMenuXtra.c | |
5 /// \brief Menu Xtra - Specials in Divemode like Reset Stopwatch | |
6 /// \author heinrichs weikamp gmbh | |
7 /// \date 02-Mar-2015 | |
8 /// | |
9 /// \details | |
10 /// | |
11 /// $Id$ | |
12 /////////////////////////////////////////////////////////////////////////////// | |
13 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh | |
14 /// | |
15 /// This program is free software: you can redistribute it and/or modify | |
16 /// it under the terms of the GNU General Public License as published by | |
17 /// the Free Software Foundation, either version 3 of the License, or | |
18 /// (at your option) any later version. | |
19 /// | |
20 /// This program is distributed in the hope that it will be useful, | |
21 /// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
22 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
23 /// GNU General Public License for more details. | |
24 /// | |
25 /// You should have received a copy of the GNU General Public License | |
26 /// along with this program. If not, see <http://www.gnu.org/licenses/>. | |
27 ////////////////////////////////////////////////////////////////////////////// | |
28 | |
29 /* Includes ------------------------------------------------------------------*/ | |
30 #include <stdio.h> | |
31 #include <string.h> | |
32 #include "tMenu.h" | |
33 #include "tStructure.h" | |
34 #include "tMenuXtra.h" | |
35 #include "text_multilanguage.h" | |
36 #include "data_central.h" | |
37 #include "simulation.h" | |
609
1b243c6c7067
Bugfix: CalibViewport were shown even in case the compile switch had not been set:
Ideenmodellierer
parents:
547
diff
changeset
|
38 #include "configuration.h" |
38 | 39 |
40 /* Exported functions --------------------------------------------------------*/ | |
41 | |
42 uint32_t tMXtra_refresh(uint8_t line, char *text, uint16_t *tab, char *subtext) | |
43 { | |
44 uint8_t textPointer; | |
45 | |
46 textPointer = 0; | |
47 *tab = 500; | |
48 *subtext = 0; | |
49 | |
50 if((line == 0) || (line == 1)) | |
51 { | |
52 text[textPointer++] = TXT_2BYTE; | |
53 text[textPointer++] = TXT2BYTE_ResetStopwatch; | |
54 } | |
55 strcpy(&text[textPointer],"\n\r"); | |
56 textPointer += 2; | |
57 /* | |
58 if((line == 0) || (line == 2)) | |
59 { | |
60 text[textPointer++] = TXT_2BYTE; | |
61 text[textPointer++] = TXT2BYTE_ResetAvgDepth; | |
62 } | |
63 strcpy(&text[textPointer],"\n\r"); | |
64 textPointer += 2; | |
65 */ | |
66 if((line == 0) || (line == 2)) | |
67 { | |
68 text[textPointer++] = TXT_2BYTE; | |
69 text[textPointer++] = TXT2BYTE_CompassHeading; | |
70 } | |
71 strcpy(&text[textPointer],"\n\r"); | |
72 textPointer += 2; | |
73 | |
74 if((line == 0) || (line == 3)) | |
75 { | |
76 text[textPointer++] = TXT_2BYTE; | |
77 text[textPointer++] = TXT2BYTE_SetMarker; | |
78 } | |
79 strcpy(&text[textPointer],"\n\r"); | |
80 textPointer += 2; | |
81 | |
609
1b243c6c7067
Bugfix: CalibViewport were shown even in case the compile switch had not been set:
Ideenmodellierer
parents:
547
diff
changeset
|
82 #ifdef ENABLE_MOTION_CONTROL |
547 | 83 if((line == 0) || (line == 4)) |
84 { | |
85 text[textPointer++] = TXT_2BYTE; | |
86 text[textPointer++] = TXT2BYTE_CalibView; | |
87 } | |
88 strcpy(&text[textPointer],"\n\r"); | |
89 textPointer += 2; | |
609
1b243c6c7067
Bugfix: CalibViewport were shown even in case the compile switch had not been set:
Ideenmodellierer
parents:
547
diff
changeset
|
90 #endif |
547 | 91 |
38 | 92 if(is_stateUsedSetToSim()) |
93 { | |
547 | 94 if((line == 0) || (line == 5)) |
38 | 95 { |
96 text[textPointer++] = TXT_2BYTE; | |
97 text[textPointer++] = TXT2BYTE_SimFollowDecoStops; | |
98 text[textPointer++] = ' '; | |
99 text[textPointer++] = ' '; | |
100 if(simulation_get_heed_decostops()) | |
101 text[textPointer++] = '\005'; | |
102 else | |
103 text[textPointer++] = '\006'; | |
104 } | |
105 strcpy(&text[textPointer],"\n\r"); | |
106 textPointer += 2; | |
107 } | |
347
77de014928d6
Added option to manually leave dive mode to system menu
ideenmodellierer
parents:
38
diff
changeset
|
108 else |
77de014928d6
Added option to manually leave dive mode to system menu
ideenmodellierer
parents:
38
diff
changeset
|
109 { |
547 | 110 if((line == 0) || (line == 5)) /* end dive mode only used during real dives */ |
347
77de014928d6
Added option to manually leave dive mode to system menu
ideenmodellierer
parents:
38
diff
changeset
|
111 { |
77de014928d6
Added option to manually leave dive mode to system menu
ideenmodellierer
parents:
38
diff
changeset
|
112 text[textPointer++] = TXT_2BYTE; |
77de014928d6
Added option to manually leave dive mode to system menu
ideenmodellierer
parents:
38
diff
changeset
|
113 text[textPointer++] = TXT2BYTE_EndDiveMode; |
77de014928d6
Added option to manually leave dive mode to system menu
ideenmodellierer
parents:
38
diff
changeset
|
114 } |
77de014928d6
Added option to manually leave dive mode to system menu
ideenmodellierer
parents:
38
diff
changeset
|
115 strcpy(&text[textPointer],"\n\r"); |
77de014928d6
Added option to manually leave dive mode to system menu
ideenmodellierer
parents:
38
diff
changeset
|
116 textPointer += 2; |
77de014928d6
Added option to manually leave dive mode to system menu
ideenmodellierer
parents:
38
diff
changeset
|
117 } |
38 | 118 |
119 return StMXTRA; | |
120 } | |
121 |