annotate Small_CPU/Inc/batteryGasGauge.h @ 882:608d3e918146 Evo_2_23

Added slow exit timer function: At the end of the dive the final ascent to surface should be done slowly. The new function provides a comparison of the current divers depth compared to a linear ascent simulated by the OSTC. The visualization is shown instead of the ascent speed with a little different appearance. The linear ascent is starting from the last stop depth and the time for the ascent may be configurated in the deco settings. The simulated and real peth is compared and the depth color changes based on the difference of the values. In case the diver is much below the timer depth then the timer will stop and wait for the diver to follow.
author Ideenmodellierer
date Sat, 31 Aug 2024 17:35:52 +0200
parents c1e203ffb478
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 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file batteryGasGauge.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author heinrichs weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V0.0.1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 09-Dec-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief LTC2942
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 @verbatim
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 ==============================================================================
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 ##### How to use #####
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 ==============================================================================
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 @endverbatim
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * <h2><center>&copy; COPYRIGHT(c) 2014 heinrichs weikamp</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 #ifndef BATTERY_GAS_GAUGE_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 #define BATTERY_GAS_GAUGE_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31
330
2defc8cd93ce Added check of configuration.
ideenmodellierer
parents: 38
diff changeset
32 #include <stdint.h>
2defc8cd93ce Added check of configuration.
ideenmodellierer
parents: 38
diff changeset
33
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 330
diff changeset
34 #define BATTERY_DEFAULT_VOLTAGE (6.0f)
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 330
diff changeset
35 #define BATTERY_ENDOF_CHARGE_VOLTAGE (4.05f)
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 330
diff changeset
36 #define BATTERY_CHARGER_CONNECTED_VOLTAGE (4.2f)
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 330
diff changeset
37
669
c1e203ffb478 Rework charge cycle:
Ideenmodellierer
parents: 662
diff changeset
38 #define BATTERY_CHARGE_UNKNOWN (-1.0f)
c1e203ffb478 Rework charge cycle:
Ideenmodellierer
parents: 662
diff changeset
39
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 void init_battery_gas_gauge(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 float get_voltage(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 float get_charge(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45 void battery_gas_gauge_get_data(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 void battery_gas_gauge_set_charge_full(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 void battery_gas_gauge_set(float percentage);
330
2defc8cd93ce Added check of configuration.
ideenmodellierer
parents: 38
diff changeset
48 uint8_t battery_gas_gauge_CheckConfigOK(void);
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49
669
c1e203ffb478 Rework charge cycle:
Ideenmodellierer
parents: 662
diff changeset
50 uint8_t battery_gas_gauge_isChargeValueValid(void);
c1e203ffb478 Rework charge cycle:
Ideenmodellierer
parents: 662
diff changeset
51 void battery_gas_gauge_setChargeValueValid(void);
c1e203ffb478 Rework charge cycle:
Ideenmodellierer
parents: 662
diff changeset
52
c1e203ffb478 Rework charge cycle:
Ideenmodellierer
parents: 662
diff changeset
53
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 #endif /* BATTERY_GAS_GAUGE_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/