Mercurial > public > ostc4
annotate Discovery/Inc/tHome.h @ 929:63c340abd70e Evo_2_23
Add a line to the compass heading dive menu that shows the currently set heading to enable the
diver to confirm it / add it to notes.
Also add a log entry every time a new compass heading is set or the heading is cleared.
And add a way to add compass headings to the log without changing the currently set heading -
this was added after discussion with cave divers who are interested in recording headings
when mapping out caves.
From mikeller
author | heinrichsweikamp |
---|---|
date | Mon, 02 Dec 2024 11:16:10 +0100 |
parents | 2225c467f1e9 |
children |
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" | |
493
b560e474e319
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, | |
740
5078da3845c0
Added button lock after wakeup in surface mode:
Ideenmodellierer
parents:
672
diff
changeset
|
56 EXTRADISPLAY_BFACTIVE, |
5078da3845c0
Added button lock after wakeup in surface mode:
Ideenmodellierer
parents:
672
diff
changeset
|
57 #ifdef HAVEDECOGAME |
38 | 58 EXTRADISPLAY_DECOGAME, |
740
5078da3845c0
Added button lock after wakeup in surface mode:
Ideenmodellierer
parents:
672
diff
changeset
|
59 #endif |
38 | 60 EXTRADISPLAY_END |
61 }; | |
62 | |
820 | 63 #define LEGACY_T3_START_ID_PRE_TIMER (15u) /* Value == index of the first real T3 view before introduction of timer */ |
64 #define LEGACY_CV_END_POST_TIMER (15u) /* Value CV_END in an intermediate version. Used to identify an indexing problem */ | |
65 | |
38 | 66 enum CUSTOMVIEWS |
67 { | |
68 CVIEW_noneOrDebug = 0, | |
69 CVIEW_sensors, | |
70 CVIEW_Compass, | |
71 CVIEW_Decolist, | |
72 CVIEW_Tissues, | |
73 CVIEW_Profile, | |
74 CVIEW_EADTime, | |
75 CVIEW_Gaslist, | |
76 CVIEW_sensors_mV, | |
77 CVIEW_Hello, | |
78 CVIEW_CompassDebug, | |
79 CVIEW_SummaryOfLeftCorner, | |
672 | 80 CVIEW_Charger, |
770
8deb28b2d4da
CCR overview in surface mode. Makes it easy to quickly check that all settings (mode, setpoints, diluent, scrubber timer) are correct when preparing to dive (also makes the OC gas list available in surface mode for the same reason).
heinrichsweikamp
parents:
740
diff
changeset
|
81 CVIEW_CcrSummary, |
805
dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents:
770
diff
changeset
|
82 CVIEW_Timer, |
899
2225c467f1e9
Added data path and visualization for position data:
Ideenmodellierer
parents:
837
diff
changeset
|
83 CVIEW_Position, |
837 | 84 CVIEW_END /* The ID is used in shift operation => 31 is the max number of supported views */ |
820 | 85 }; |
86 | |
87 enum CUSTOMVIEWS_BF | |
88 { | |
89 CVIEW_T3_noneOrDebug = 0, | |
90 CVIEW_T3_sensors, | |
91 CVIEW_T3_Compass, | |
38 | 92 CVIEW_T3_Decostop, |
93 CVIEW_T3_TTS, | |
94 CVIEW_T3_MaxDepth, | |
95 CVIEW_T3_ppO2andGas, | |
96 CVIEW_T3_StopWatch, | |
97 CVIEW_T3_GasList, | |
98 CVIEW_T3_Temperature, | |
99 CVIEW_T3_ApnoeSurfaceInfo, | |
493
b560e474e319
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
100 CVIEW_T3_Navigation, |
b560e474e319
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
101 CVIEW_T3_DepthData, |
542
6960df7ddb09
Added new t3 view showing first deco stop and tts in parallel:
Ideenmodellierer
parents:
505
diff
changeset
|
102 CVIEW_T3_DecoTTS, |
594
280c11153080
Added compile switch for new T3 View Profile
Ideenmodellierer
parents:
542
diff
changeset
|
103 #ifdef ENABLE_T3_PROFILE_VIEW |
280c11153080
Added compile switch for new T3 View Profile
Ideenmodellierer
parents:
542
diff
changeset
|
104 CVIEW_T3_Profile, |
280c11153080
Added compile switch for new T3 View Profile
Ideenmodellierer
parents:
542
diff
changeset
|
105 #endif |
820 | 106 CVIEW_T3_END /* The ID is used in shift operation => 31 is the max number of supported views */ |
38 | 107 }; |
108 | |
109 // for custom view switch on/off 161122 hw | |
379 | 110 extern const uint8_t cv_changelist[]; |
493
b560e474e319
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
111 extern const uint8_t cv_changelist_BS[]; |
b560e474e319
Added possibility to switch between "classic" bigfont views and a selection with a new information combination
Ideenmodellierer
parents:
386
diff
changeset
|
112 |
38 | 113 #define CHECK_BIT_THOME(var,pos) (((var)>>(pos)) & 1) |
114 | |
115 typedef struct | |
116 { | |
117 uint16_t Hours; | |
118 uint16_t Minutes; | |
119 uint16_t Seconds; | |
120 uint32_t Total; | |
121 | |
122 } SDivetime; | |
123 | |
124 | |
125 typedef struct | |
126 { | |
127 uint8_t Days; | |
128 uint8_t Hours; | |
129 uint8_t Minutes; | |
130 uint8_t Seconds; | |
131 uint32_t Total; | |
132 } SSurfacetime; | |
133 | |
134 | |
135 extern _Bool warning_count_high_time; | |
136 extern _Bool display_count_high_time; | |
137 extern uint8_t errorsInSettings; | |
138 | |
139 | |
140 void tHome_init(void); | |
141 void tHome_refresh(void); | |
142 void tHome_sleepmode_fun(void); | |
143 void set_globalState_tHome(void); | |
144 void tHome_change_field_button_pressed(void); | |
361
b111fc4250e9
Pass action to customer vie update function.
Ideenmodellierer
parents:
289
diff
changeset
|
145 void tHome_change_customview_button_pressed(uint8_t action); |
38 | 146 |
147 void tHome_findNextStop(const uint16_t *list, uint8_t *depthOut, uint16_t *lengthOut); | |
148 void tHomeDiveMenuControl(uint8_t sendAction); | |
149 void tHome_tick(void); | |
150 | |
151 uint8_t tHome_gas_writer(uint8_t oxygen_percentage, uint8_t helium_percentage, char *text); | |
152 uint32_t tHome_DateCode(RTC_DateTypeDef *dateInput); | |
153 | |
154 void tHome_init_compass(void); | |
505 | 155 uint8_t tHome_getNumberOfAvailableCVs(const uint8_t* pcv_list); |
38 | 156 |
157 float t3_basics_lines_depth_and_divetime(GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXl1, GFX_DrawCfgWindow* tXr1, uint8_t mode); | |
158 void t3_basics_battery_low_customview_extra(GFX_DrawCfgWindow* tXc1); | |
159 void t3_basics_show_customview_warnings(GFX_DrawCfgWindow* tXc1); | |
160 void t3_basics_refresh_customview(float depth, uint8_t tX_selection_customview, GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXc1, GFX_DrawCfgWindow* tXc2, uint8_t mode); | |
161 void t3_basics_refresh_apnoeRight(float depth, uint8_t tX_selection_customview, GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXc1, GFX_DrawCfgWindow* tXc2, uint8_t mode); | |
162 //void _findNextStop(const uint16_t *list, uint8_t *depthOut, uint16_t *lengthOut); | |
163 void t3_basics_colorscheme_mod(char *text); | |
505 | 164 void t3_basics_change_customview(uint8_t *tX_selection_customview, const uint8_t *tX_customviews, uint8_t action); |
38 | 165 |
166 uint8_t tHome_show_lost_connection_count(GFX_DrawCfgScreen *ScreenToWriteOn); | |
167 | |
168 #endif /* THOME_H */ |