comparison Discovery/Inc/hud.h @ 1082:1aa45000f92c Icon_Integration tip

Added configuration menu for HUD functions: The V1 HUD has 4 functions (holes) which may be realized by one or two LEDs. The functions (like ppo2 monitoring or ascent speed) may be configurated by the diver using the HUD menu. The functions which may be selected depend on the HW configuration (e.g. the connected sensors) and the number of LEDs which are needed to realize the function. The previous HUD test implementation may still be activate usind the compile switch ENABLE_HUD_TESTING
author Ideenmodellierer
date Sun, 15 Mar 2026 21:40:35 +0100
parents
children
comparison
equal deleted inserted replaced
1081:1b38d7b8da35 1082:1aa45000f92c
1 ///////////////////////////////////////////////////////////////////////////////
2 /// -*- coding: UTF-8 -*-
3 ///
4 /// \file Discovery/Inc/hud.h
5 /// \brief
6 /// \author Heinrichs Weikamp
7 /// \date 2026
8 ///
9 /// $Id$
10 ///////////////////////////////////////////////////////////////////////////////
11 /// \par Copyright (c) 2014-2026 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 #ifndef HUD_H
28 #define HUD_H
29
30 #include <stdint.h>
31 #include <stdio.h>
32 #include <string.h>
33
34 #include "text_multilanguage.h"
35
36 #define NUM_OF_HUD_FCT (4u) /* number of different functions which may be displayed at HUD at once */
37 #define HUD_INFO_DATA_LENGTH (24u) /* expected number of received info data */
38 #define HUD_INFO_INFOSTR_LENGTH (16u)
39
40
41 #define HUD_INFO_INFOSTR_OFFSET (3u) /* offset of info string */
42 #define HUD_INFO_VERSION_OFFSET (19u) /* offset of version byte */
43
44 enum hudFct
45 {
46 HUD_FCT_NONE = 0, /* Slot will not be used */
47 HUD_FCT_WARNING, /* Show common warning indicator */
48 HUD_FCT_PPO2SUM, /* Show combined PPO2 status */
49 HUD_FCT_PPO2_0, /* Show individual PPO2 status (sensor 0) */
50 HUD_FCT_PPO2_1, /* Show individual PPO2 status (sensor 1) */
51 HUD_FCT_PPO2_2, /* Show individual PPO2 status (sensor 2) */
52 HUD_FCT_ASCENT_SPEED, /* Show indicator for ascent speed */
53 HUD_FCT_DECO, /* Show deco / depth indicator */
54 HUD_FCT_END
55 };
56
57 void hud_Init(void);
58 void hud_GetString(uint8_t id, uint8_t* pText);
59 uint8_t hud_NextFct(uint8_t curFct, uint8_t fctId);
60 void hud_UpdateStatus(void);
61 uint8_t hud_IsActive(void);
62 uint8_t hud_GetAddress(void);
63
64 #endif /* HUD_H */
65