Mercurial > public > ostc4
annotate Discovery/Inc/tHome.h @ 502:cf06c12c06d1
Bugfix display of disabled screen.
It is possible to select a screen as default which is in parallel disabled in the selection view. To avoid this the enable / disable state is not also checked when entering dive mode. The check function was depending on an ACTION. The functionality has been changed to allow the function call without ACTION.
author | Ideenmodellierer |
---|---|
date | Mon, 24 Aug 2020 19:43:13 +0200 |
parents | 0d2449e9d659 |
children | 06b21f1e47a5 |
rev | line source |
---|---|
38 | 1 /////////////////////////////////////////////////////////////////////////////// |
2 /// -*- coding: UTF-8 -*- | |
3 /// | |
4 /// \file Discovery/Inc/tHome.h | |
5 /// \brief Control for Surface and Dive Templates | |
6 /// \author heinrichs weikamp gmbh | |
7 /// \date 10-November-2014 | |
8 /// | |
9 /// $Id$ | |
10 /////////////////////////////////////////////////////////////////////////////// | |
11 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh | |
12 /// | |
13 /// This program is free software: you can redistribute it and/or modify | |
14 /// it under the terms of the GNU General Public License as published by | |
15 /// the Free Software Foundation, either version 3 of the License, or | |
16 /// (at your option) any later version. | |
17 /// | |
18 /// This program is distributed in the hope that it will be useful, | |
19 /// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 /// GNU General Public License for more details. | |
22 /// | |
23 /// You should have received a copy of the GNU General Public License | |
24 /// along with this program. If not, see <http://www.gnu.org/licenses/>. | |
25 ////////////////////////////////////////////////////////////////////////////// | |
26 | |
27 /* Define to prevent recursive inclusion -------------------------------------*/ | |
28 #ifndef THOME_H | |
29 #define THOME_H | |
30 | |
31 /* Includes ------------------------------------------------------------------*/ | |
32 | |
33 #include <stdio.h> | |
34 #include <string.h> | |
35 #include "stm32f4xx_hal.h" | |
36 #include "base.h" | |
37 #include "gfx.h" | |
38 #include "gfx_colors.h" | |
39 #include "gfx_engine.h" | |
40 #include "text_multilanguage.h" | |
41 #include "settings.h" | |
42 #include "data_central.h" | |
43 #include "data_exchange.h" | |
44 #include "check_warning.h" | |
500
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
45 #include "configuration.h" |
38 | 46 |
47 extern const uint16_t BigFontSeperationLeftRight; // in t3.c | |
48 extern const uint16_t BigFontSeperationTopBottom; // in t3.c | |
49 | |
50 #define MAX_AGE_DECOINFO_MS (120000) | |
51 | |
52 enum EXTRADISPLAYS | |
53 { | |
54 EXTRADISPLAY_none = 0, | |
55 EXTRADISPLAY_BIGFONT, | |
56 EXTRADISPLAY_DECOGAME, | |
500
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
57 #ifdef ENABLE_BIGFONT_VX |
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
58 EXTRADISPLAY_BIGFONT2, |
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
59 #endif |
38 | 60 EXTRADISPLAY_END |
61 }; | |
62 | |
63 enum CUSTOMVIEWS | |
64 { | |
65 CVIEW_noneOrDebug = 0, | |
66 CVIEW_sensors, | |
67 CVIEW_Compass, | |
68 CVIEW_Decolist, | |
69 CVIEW_Tissues, | |
70 CVIEW_Profile, | |
71 CVIEW_EADTime, | |
72 CVIEW_Gaslist, | |
73 CVIEW_sensors_mV, | |
74 CVIEW_Hello, | |
75 CVIEW_CompassDebug, | |
76 CVIEW_SummaryOfLeftCorner, | |
77 CVIEW_END, | |
78 CVIEW_T3_Decostop, | |
79 CVIEW_T3_TTS, | |
80 CVIEW_T3_MaxDepth, | |
81 CVIEW_T3_ppO2andGas, | |
82 CVIEW_T3_StopWatch, | |
83 CVIEW_T3_GasList, | |
84 CVIEW_T3_Temperature, | |
85 CVIEW_T3_ApnoeSurfaceInfo, | |
500
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
86 #ifdef ENABLE_BIGFONT_VX |
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
87 CVIEW_T3_Navigation, |
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
88 CVIEW_T3_DepthData, |
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
89 #endif |
38 | 90 CVIEW_T3_END |
91 }; | |
92 | |
93 // for custom view switch on/off 161122 hw | |
379 | 94 extern const uint8_t cv_changelist[]; |
500
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
95 extern const uint8_t cv_changelist_BS[]; |
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
96 #ifdef ENABLE_BIGFONT_VX |
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
97 extern const uint8_t cv_changelist_BSV2[]; |
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
98 #endif |
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
99 |
38 | 100 #define CHECK_BIT_THOME(var,pos) (((var)>>(pos)) & 1) |
101 | |
102 typedef struct | |
103 { | |
104 uint16_t Hours; | |
105 uint16_t Minutes; | |
106 uint16_t Seconds; | |
107 uint32_t Total; | |
108 | |
109 } SDivetime; | |
110 | |
111 | |
112 typedef struct | |
113 { | |
114 uint8_t Days; | |
115 uint8_t Hours; | |
116 uint8_t Minutes; | |
117 uint8_t Seconds; | |
118 uint32_t Total; | |
119 } SSurfacetime; | |
120 | |
121 | |
122 extern _Bool warning_count_high_time; | |
123 extern _Bool display_count_high_time; | |
124 extern uint8_t errorsInSettings; | |
125 | |
126 | |
127 void tHome_init(void); | |
128 void tHome_refresh(void); | |
129 void tHome_sleepmode_fun(void); | |
130 void set_globalState_tHome(void); | |
131 void tHome_change_field_button_pressed(void); | |
361
b111fc4250e9
Pass action to customer vie update function.
Ideenmodellierer
parents:
289
diff
changeset
|
132 void tHome_change_customview_button_pressed(uint8_t action); |
38 | 133 |
134 void tHome_findNextStop(const uint16_t *list, uint8_t *depthOut, uint16_t *lengthOut); | |
135 void tHomeDiveMenuControl(uint8_t sendAction); | |
136 void tHome_tick(void); | |
137 | |
138 uint8_t tHome_gas_writer(uint8_t oxygen_percentage, uint8_t helium_percentage, char *text); | |
139 uint32_t tHome_DateCode(RTC_DateTypeDef *dateInput); | |
140 | |
141 void tHome_init_compass(void); | |
142 | |
143 float t3_basics_lines_depth_and_divetime(GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXl1, GFX_DrawCfgWindow* tXr1, uint8_t mode); | |
144 void t3_basics_battery_low_customview_extra(GFX_DrawCfgWindow* tXc1); | |
145 void t3_basics_show_customview_warnings(GFX_DrawCfgWindow* tXc1); | |
146 void t3_basics_refresh_customview(float depth, uint8_t tX_selection_customview, GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXc1, GFX_DrawCfgWindow* tXc2, uint8_t mode); | |
147 void t3_basics_refresh_apnoeRight(float depth, uint8_t tX_selection_customview, GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXc1, GFX_DrawCfgWindow* tXc2, uint8_t mode); | |
148 //void _findNextStop(const uint16_t *list, uint8_t *depthOut, uint16_t *lengthOut); | |
149 void t3_basics_colorscheme_mod(char *text); | |
500
0d2449e9d659
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
150 void t3_basics_change_customview(uint8_t *tX_selection_customview, uint8_t *tX_customviews, uint8_t action); |
38 | 151 |
152 uint8_t tHome_show_lost_connection_count(GFX_DrawCfgScreen *ScreenToWriteOn); | |
153 | |
154 #endif /* THOME_H */ |