annotate Discovery/Inc/check_warning.h @ 996:8507a87f6401 GasConsumption

Improve buzzer opreation: In the previous version the buzzer was operated in case warning events. In the new version the buzzer is inactive in surface mode in order to prevent annoying warning just because e.g. the sensors are not connected. In addition it is now possible to request a short activation only e.g. in case of the activation of the buzzer via the menu.
author Ideenmodellierer
date Mon, 21 Apr 2025 21:00:34 +0200
parents e9c37071933b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 ///////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 /// -*- coding: UTF-8 -*-
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 /// \file Discovery/Inc/check_warning.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 /// \brief header file for check and set events for warnings
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 /// \author heinrichs weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 /// \date 17-Nov-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 /// $Id$
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 ///////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 /// This program is free software: you can redistribute it and/or modify
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 /// it under the terms of the GNU General Public License as published by
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 /// the Free Software Foundation, either version 3 of the License, or
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 /// (at your option) any later version.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 /// This program is distributed in the hope that it will be useful,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 /// but WITHOUT ANY WARRANTY; without even the implied warranty of
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 /// GNU General Public License for more details.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 /// You should have received a copy of the GNU General Public License
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 /// along with this program. If not, see <http://www.gnu.org/licenses/>.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 //////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 #ifndef CHECK_WARNING_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 #define CHECK_WARNING_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 #include <stdint.h>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 #include "data_central.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32
996
8507a87f6401 Improve buzzer opreation:
Ideenmodellierer
parents: 951
diff changeset
33
8507a87f6401 Improve buzzer opreation:
Ideenmodellierer
parents: 951
diff changeset
34 #define REQUEST_BUZZER_OFF (0u)
8507a87f6401 Improve buzzer opreation:
Ideenmodellierer
parents: 951
diff changeset
35 #define REQUEST_BUZZER_ONCE (1u)
8507a87f6401 Improve buzzer opreation:
Ideenmodellierer
parents: 951
diff changeset
36 #define REQUEST_BUZZER_CONTINUOUS (2u)
8507a87f6401 Improve buzzer opreation:
Ideenmodellierer
parents: 951
diff changeset
37
8507a87f6401 Improve buzzer opreation:
Ideenmodellierer
parents: 951
diff changeset
38
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 /* Exported function prototypes ----------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 void check_warning(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41 void check_warning2(SDiveState *pDiveState);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 uint8_t actualBetterGasId(void);
773
2c243233c999 Menu shortcut for bailout / return to circuit when diving in CCR mode (mikeller)
heinrichsweikamp
parents: 637
diff changeset
43 uint8_t actualBetterBailoutGasId(void);
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 uint8_t actualBetterSetpointId(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45 uint8_t actualLeftMaxDepth(const SDiveState * pDiveState);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 void set_warning_fallback(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 void clear_warning_fallback(void);
637
d7dec417afa4 Debounce fallback warning:
Ideenmodellierer
parents: 38
diff changeset
48 uint8_t debounce_warning_fallback(uint16_t debounceStepms);
d7dec417afa4 Debounce fallback warning:
Ideenmodellierer
parents: 38
diff changeset
49 void reset_debounce_warning_fallback();
d7dec417afa4 Debounce fallback warning:
Ideenmodellierer
parents: 38
diff changeset
50
775
46c6d2380d4e Add a shortcuts to change the setpoint to the loop to the 'normal' display when diving. It is only shown when diving in CCR mode and on the loop.
heinrichsweikamp
parents: 773
diff changeset
51 uint8_t getSetpointHighId(void);
46c6d2380d4e Add a shortcuts to change the setpoint to the loop to the 'normal' display when diving. It is only shown when diving in CCR mode and on the loop.
heinrichsweikamp
parents: 773
diff changeset
52 uint8_t getSetpointLowId(void);
788
4abfb8a2a435 Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents: 775
diff changeset
53 uint8_t getSetpointDecoId(void);
951
e9c37071933b Added vibration warning:
Ideenmodellierer
parents: 788
diff changeset
54 void requestBuzzerActivation(uint8_t active);
996
8507a87f6401 Improve buzzer opreation:
Ideenmodellierer
parents: 951
diff changeset
55 uint8_t getBuzzerActivationRequest();
951
e9c37071933b Added vibration warning:
Ideenmodellierer
parents: 788
diff changeset
56 uint8_t getBuzzerActivationState();
996
8507a87f6401 Improve buzzer opreation:
Ideenmodellierer
parents: 951
diff changeset
57 void deactivateBuzzer();
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 #endif // CHECK_WARNING_H