annotate Common/Inc/settings.h @ 876:5b325372db4b Evo_2_23

Minor: Enable CO2-Sensor as default now also enable voltage display in addition to %-Battery
author heinrichsweikamp
date Fri, 16 Aug 2024 16:17:51 +0200
parents e373e90a48db
children 608d3e918146
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 Common/Inc/settings.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 /// \brief
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 /// \author Heinrichs Weikamp
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 /// \date 2018
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 SETTINGS_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 #define SETTINGS_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29
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: 776
diff changeset
30 #include <stdint.h>
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: 776
diff changeset
31 #include <stdbool.h>
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: 776
diff changeset
32
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 // From Common/Inc:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 #include "FirmwareData.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 //#include "data_central.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37
92
be35821a4974 Stable to test. button sensitiveness fix. + global_constants.
Dmitry Romanov <kitt@bk.ru>
parents: 38
diff changeset
38 #include "global_constants.h"
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 // From Common/Drivers/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #include "stm32f4xx_hal.h"
710
8adf9b8fc7fa Extension scrubber time:
Ideenmodellierer
parents: 702
diff changeset
41 #include "stm32f4xx_hal_rtc.h"
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42
691
52d68cf9994c Improvment external interface usage:
Ideenmodellierer
parents: 676
diff changeset
43 #include "configuration.h"
52d68cf9994c Improvment external interface usage:
Ideenmodellierer
parents: 676
diff changeset
44
92
be35821a4974 Stable to test. button sensitiveness fix. + global_constants.
Dmitry Romanov <kitt@bk.ru>
parents: 38
diff changeset
45
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 #define NUM_GASES 5
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 #define NUM_OFFSET_DILUENT 5
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 #define SPECIAL_GAS_ID 0
864
fa431d42b5fb Fix incorrect logging of bailout to Open Circuit when using the best gas.
heinrichsweikamp
parents: 819
diff changeset
49 #define NO_GAS_ID 255
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 #define ERROR_ 0xFF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 #define CCRMODE_FixedSetpoint 0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 #define CCRMODE_Sensors 1
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
55 #define CCRMODE_Simulation 2
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 #define DIVEMODE_OC 0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 #define DIVEMODE_CCR 1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 #define DIVEMODE_Gauge 2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 #define DIVEMODE_Apnea 3
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
61 #define DIVEMODE_PSCR 4
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 #define GF_MODE 1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 #define VPM_MODE 2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 #define VPM_FROM_FORTRAN 0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 #define VPM_BACHELORWORK 1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 #define BUEHLMANN_OSTC4 0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 #define BUEHLMANN_hwOS 1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 #define MMDDYY 0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 #define DDMMYY 1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 #define YYMMDD 2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75
337
38367bb982b8 Set Max value for pressure offset to 50mBar (20mBar before)
ideenmodellierer
parents: 210
diff changeset
76 #define PRESSURE_OFFSET_LIMIT_MBAR 50
38367bb982b8 Set Max value for pressure offset to 50mBar (20mBar before)
ideenmodellierer
parents: 210
diff changeset
77
560
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
78 #define MAX_COMPASS_COMP (2u)
640
f735f1123526 Development bugfix Viewport settings:
Ideenmodellierer
parents: 626
diff changeset
79 #define MAX_VIEWPORT_MODE (0x7F)
560
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
80
676
c855753af9a6 Allow longer scrubber time
Jan Mulder <jan@jlmulder.nl>
parents: 662
diff changeset
81 #define MAX_SCRUBBER_TIME (999u)
758
b6d8a6fbf4fd - Colours for scrubber display when time remaining falls below a threshold value
heinrichsweikamp
parents: 741
diff changeset
82 #define MIN_SCRUBBER_TIME -99
652
f6212495f34f Allow setpoint starting at 0.4 ppO2:
Ideenmodellierer
parents: 650
diff changeset
83 #define MIN_PPO2_SP_CBAR (40u)
650
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 640
diff changeset
84
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
85 #define PSCR_MAX_O2_DROP (15u)
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
86 #define PSCR_MIN_LUNG_RATIO (5u)
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
87 #define PSCR_MAX_LUNG_RATIO (20u)
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
88
691
52d68cf9994c Improvment external interface usage:
Ideenmodellierer
parents: 676
diff changeset
89 #define UART_MAX_PROTOCOL (2u)
52d68cf9994c Improvment external interface usage:
Ideenmodellierer
parents: 676
diff changeset
90
805
dd7ce655db26 Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents: 796
diff changeset
91 #define FUTURE_SPARE_SIZE (0u) /* Applied for reuse of old, not used, scooter block (was 32 bytes)*/
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
92
560
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
93 typedef enum
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
94 {
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
95 O2_SENSOR_SOURCE_OPTIC = 0,
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
96 O2_SENSOR_SOURCE_ANALOG,
702
6d7c812fc173 Added digital o2 sensor to settings and data exchange:
Ideenmodellierer
parents: 691
diff changeset
97 O2_SENSOR_SOURCE_DIGITAL,
6d7c812fc173 Added digital o2 sensor to settings and data exchange:
Ideenmodellierer
parents: 691
diff changeset
98 O2_SENSOR_SOURCE_ANADIG,
691
52d68cf9994c Improvment external interface usage:
Ideenmodellierer
parents: 676
diff changeset
99 #ifdef ENABLE_SENTINEL_MODE
52d68cf9994c Improvment external interface usage:
Ideenmodellierer
parents: 676
diff changeset
100 O2_SENSOR_SOURCE_SENTINEL,
52d68cf9994c Improvment external interface usage:
Ideenmodellierer
parents: 676
diff changeset
101 #endif
560
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
102 O2_SENSOR_SOURCE_MAX
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
103 } SensorSource;
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
104 #define MAX_O2_SENSOR_SOURCE (2u)
546
daa8d4474ba0 Added new settings for Viewport:
Ideenmodellierer
parents: 542
diff changeset
105
654
890440ab993a Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents: 652
diff changeset
106 typedef enum
890440ab993a Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents: 652
diff changeset
107 {
890440ab993a Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents: 652
diff changeset
108 SCRUB_TIMER_OFF = 0,
890440ab993a Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents: 652
diff changeset
109 SCRUB_TIMER_MINUTES,
890440ab993a Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents: 652
diff changeset
110 SCRUB_TIMER_PERCENT,
890440ab993a Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents: 652
diff changeset
111 SCRUB_TIMER_END
890440ab993a Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents: 652
diff changeset
112 } ScrubTimerMode_e;
890440ab993a Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents: 652
diff changeset
113
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 /* 2015 Jan 30, hw, deco and travel added for MenuEditGas
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 * can be used for buehlmann, vpm, etc. later but be carefull
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 * with current implemenation */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 typedef struct{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 uint8_t active:1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 uint8_t first:1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 uint8_t deco:1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 uint8_t travel:1;
526
88c626d01ee5 Added new option to gas configuration: "Off":
Ideenmodellierer
parents: 505
diff changeset
122 uint8_t off:1;
830
b7d93ff6b3b2 Added selection if an active gas shall be used for deco calculation or not:
Ideenmodellierer
parents: 819
diff changeset
123 uint8_t decocalc:1;
b7d93ff6b3b2 Added selection if an active gas shall be used for deco calculation or not:
Ideenmodellierer
parents: 819
diff changeset
124 uint8_t spare:2;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 } gasubit8_t;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 typedef union{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 gasubit8_t ub;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 uint8_t uw;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 } gasbit8_Type;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 typedef struct{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 uint8_t standard:4;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 uint8_t alternative:4;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 } ubit2x4_t;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 typedef union{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 ubit2x4_t ub;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 uint8_t uw;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 } split2x4_Type;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 typedef union{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 uint8_t u8[4];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 uint32_t u32;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 } general32to8_Type;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 uint8_t oxygen_percentage;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 uint8_t helium_percentage;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 gasbit8_Type note;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 uint8_t depth_meter;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 uint8_t depth_meter_travel;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 uint8_t bottle_size_liter;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155 // uint8_t bottle_wireless_status;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 uint16_t bottle_wireless_id;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 } SGasLine;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 uint8_t setpoint_cbar;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 uint8_t depth_meter;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 gasbit8_Type note;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 } SSetpointLine;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165
654
890440ab993a Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents: 652
diff changeset
166
710
8adf9b8fc7fa Extension scrubber time:
Ideenmodellierer
parents: 702
diff changeset
167 typedef struct
8adf9b8fc7fa Extension scrubber time:
Ideenmodellierer
parents: 702
diff changeset
168 {
8adf9b8fc7fa Extension scrubber time:
Ideenmodellierer
parents: 702
diff changeset
169 uint16_t TimerMax;
758
b6d8a6fbf4fd - Colours for scrubber display when time remaining falls below a threshold value
heinrichsweikamp
parents: 741
diff changeset
170 int16_t TimerCur;
710
8adf9b8fc7fa Extension scrubber time:
Ideenmodellierer
parents: 702
diff changeset
171 RTC_DateTypeDef lastDive;
8adf9b8fc7fa Extension scrubber time:
Ideenmodellierer
parents: 702
diff changeset
172 } SScrubberData;
8adf9b8fc7fa Extension scrubber time:
Ideenmodellierer
parents: 702
diff changeset
173
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: 776
diff changeset
174 enum {
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: 776
diff changeset
175 SETPOINT_INDEX_CUSTOM = 0,
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: 776
diff changeset
176 SETPOINT_INDEX_AUTO_LOW,
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: 776
diff changeset
177 SETPOINT_INDEX_AUTO_HIGH,
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: 776
diff changeset
178 SETPOINT_INDEX_AUTO_DECO,
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: 776
diff changeset
179 };
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: 776
diff changeset
180
819
24b39a432bc2 Added debug information in case an error in the settings has been detected:
Ideenmodellierer
parents: 805
diff changeset
181 typedef struct
24b39a432bc2 Added debug information in case an error in the settings has been detected:
Ideenmodellierer
parents: 805
diff changeset
182 {
24b39a432bc2 Added debug information in case an error in the settings has been detected:
Ideenmodellierer
parents: 805
diff changeset
183 uint8_t FirstCorrection;
24b39a432bc2 Added debug information in case an error in the settings has been detected:
Ideenmodellierer
parents: 805
diff changeset
184 uint8_t Corrections;
24b39a432bc2 Added debug information in case an error in the settings has been detected:
Ideenmodellierer
parents: 805
diff changeset
185 } SSettingsStatus;
654
890440ab993a Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents: 652
diff changeset
186
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 /* SSettings
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 * gas[0] and setpoint[0] are the special ones configurable during the dive
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 uint32_t header;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 uint8_t warning_blink_dsec;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 uint8_t lastDiveLogId;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 uint32_t logFlashNextSampleStartAddress;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 SGasLine gas[1 + (2*NUM_GASES)];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 SSetpointLine setpoint[1 + NUM_GASES];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 uint8_t CCR_Mode;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 uint8_t dive_mode;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 split2x4_Type deco_type;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 uint8_t ppO2_max_deco;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 uint8_t ppO2_max_std;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 uint8_t ppO2_min;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 uint8_t CNS_max;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 uint8_t ascent_MeterPerMinute_max;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 uint8_t ascent_MeterPerMinute_showGraph;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 uint8_t future_TTS;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 uint8_t GF_high;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 uint8_t GF_low;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 uint8_t aGF_high;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 uint8_t aGF_low;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 split2x4_Type VPM_conservatism;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213 uint8_t safetystopDuration;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 uint8_t AtemMinutenVolumenLiter;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 uint8_t ReserveFractionDenominator;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 uint8_t salinity;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 uint8_t last_stop_depth_meter;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 uint8_t stop_increment_depth_meter;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 uint8_t brightness;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 uint8_t date_format;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 uint8_t selected_language;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 char customtext[60];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 uint16_t timeoutSurfacemode;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 uint8_t timeoutMenuSurface;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 uint8_t timeoutMenuDive;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 uint8_t timeoutMenuEdit;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 uint8_t timeoutInfo;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 uint8_t timeoutInfoCompass;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 uint8_t design;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 uint16_t timeoutDiveReachedZeroDepth;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 uint16_t divetimeToCreateLogbook;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 uint8_t serialHigh;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233 uint8_t serialLow;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 // SUFirmware firmwareVersion16to32bit;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 uint32_t backup_localtime_rtc_tr;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 uint32_t backup_localtime_rtc_dr;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 uint16_t totalDiveCounter;
560
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
238 uint16_t personalDiveCount;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 uint8_t showDebugInfo;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 uint8_t ButtonResponsiveness[4];// changed content in 0xFFFF0016
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 uint8_t nonMetricalSystem;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 uint8_t fallbackToFixedSetpoint;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 uint8_t bluetoothActive; /* will be set to zero on each startup at the moment */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 uint8_t safetystopDepth;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 uint32_t updateSettingsAllowedFromHeader;
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
246 uint8_t pscr_lung_ratio; /* redefined in 0xFFFF0020 */
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
247 uint8_t pscr_o2_drop; /* redefined in 0xFFFF0020 */
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
248 uint8_t co2_sensor_active; /* redefined in 0xFFFF0021 */
691
52d68cf9994c Improvment external interface usage:
Ideenmodellierer
parents: 676
diff changeset
249 uint8_t ext_uart_protocol; /* redefined in 0xFFFF0022 */
710
8adf9b8fc7fa Extension scrubber time:
Ideenmodellierer
parents: 702
diff changeset
250
8adf9b8fc7fa Extension scrubber time:
Ideenmodellierer
parents: 702
diff changeset
251 uint8_t scubberActiveId; /* redefined in 0xFFFF0023 */
8adf9b8fc7fa Extension scrubber time:
Ideenmodellierer
parents: 702
diff changeset
252 SScrubberData scrubberData[2];
796
75ace7af8212 Expanded Sensor map structure:
Ideenmodellierer
parents: 788
diff changeset
253 uint8_t ext_sensor_map_Obsolete[5];
75ace7af8212 Expanded Sensor map structure:
Ideenmodellierer
parents: 788
diff changeset
254 uint8_t buttonLockActive; /* redefined in 0xFFFF0025 */
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: 776
diff changeset
255 int8_t compassDeclinationDeg;
805
dd7ce655db26 Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents: 796
diff changeset
256 uint8_t delaySetpointLow;
dd7ce655db26 Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents: 796
diff changeset
257 uint16_t timerDurationS; /* redefined in 0xFFFF0026 */
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
258 uint8_t Future_SPARE[FUTURE_SPARE_SIZE]; /* redefined in 0xFFFF0020 (old scooter Block was 32 byte)*/
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 // new in 0xFFFF0006
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 uint8_t ppo2sensors_deactivated;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 uint8_t tX_colorscheme;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 uint8_t tX_userselectedLeftLowerCornerPrimary;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 uint8_t tX_userselectedLeftLowerCornerTimeout;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 uint8_t tX_customViewPrimary;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 uint8_t tX_customViewTimeout;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 uint8_t timeoutEnterButtonSelectDive;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 uint16_t logbookOffset;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 uint8_t alwaysShowPPO2;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 uint8_t extraDisplay;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 uint16_t display_toogle_desc;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 int8_t offsetPressure_mbar;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 int8_t offsetTemperature_centigrad;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 uint8_t gasConsumption_travel_l_min;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 uint8_t gasConsumption_bottom_l_min;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 uint8_t gasConsumption_deco_l_min;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 uint8_t debugModeOnStart;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 uint8_t IAmStolenPleaseKillMe;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 int16_t compassBearing;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 uint8_t lastKnownBatteryPercentage;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 uint8_t buttonBalance[3]; // 0 = right, 1 = center, 2 = left
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 uint8_t firmwareVersion[4];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282 uint16_t timeoutSurfacemodeWithSensors;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 // new in 0xFFFF0016
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 uint8_t VPM_model;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 uint8_t GF_model;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 // new in 0xFFFF0017
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 uint8_t FactoryButtonBase;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 uint8_t FactoryButtonBalance[3];
112
fdf0272e9213 Added new nvm parameter"FlipDisplay" indicating the screen orientation
Ideenmodellierer
parents: 38
diff changeset
289 /* new in 0xFFFF0018 */
fdf0272e9213 Added new nvm parameter"FlipDisplay" indicating the screen orientation
Ideenmodellierer
parents: 38
diff changeset
290 uint8_t FlipDisplay;
210
b2a9e9b02df0 New feature: make selected customviews persistent
Jan Mulder <jlmulder@xs4all.nl>
parents: 138
diff changeset
291 /* new in 0xFFFF0019 */
b2a9e9b02df0 New feature: make selected customviews persistent
Jan Mulder <jlmulder@xs4all.nl>
parents: 138
diff changeset
292 uint32_t cv_configuration;
368
50ea68c7a153 Added menu item for motion detection. There are several possibility to use motion detection for user action input. To select of the a new menu entry has been added to the Sys2 =>Custom View Menu (Variables in german)
ideenmodellierer
parents: 210
diff changeset
293 /* new in 0xFFFF001A */
50ea68c7a153 Added menu item for motion detection. There are several possibility to use motion detection for user action input. To select of the a new menu entry has been added to the Sys2 =>Custom View Menu (Variables in german)
ideenmodellierer
parents: 210
diff changeset
294 uint8_t MotionDetection;
498
4811f3dfaa52 Added dew parameter to enable selection of customer BigFont screens to be displayed
Ideenmodellierer
parents: 372
diff changeset
295 /* new in 0xFFFF001B */
4811f3dfaa52 Added dew parameter to enable selection of customer BigFont screens to be displayed
Ideenmodellierer
parents: 372
diff changeset
296 uint32_t cv_config_BigScreen;
539
d784f281833a Added inertia simulation for compass heading:
Ideenmodellierer
parents: 526
diff changeset
297 /* new in 0xFFFF001C */
d784f281833a Added inertia simulation for compass heading:
Ideenmodellierer
parents: 526
diff changeset
298 uint8_t compassInertia;
542
6960df7ddb09 Added new t3 view showing first deco stop and tts in parallel:
Ideenmodellierer
parents: 539
diff changeset
299 uint8_t tX_customViewPrimaryBF;
546
daa8d4474ba0 Added new settings for Viewport:
Ideenmodellierer
parents: 542
diff changeset
300 /* new in 0xFFFF001D */
626
3e1a0e267f38 Added option to select sensitivity of focus detection:
Ideenmodellierer
parents: 567
diff changeset
301 uint8_t viewPortMode; /* 7-Reserve| 6..5 - Focus spot size | 4-Focusframe | 3-Reserve | 2..0-BacklightBoost */
546
daa8d4474ba0 Added new settings for Viewport:
Ideenmodellierer
parents: 542
diff changeset
302 uint16_t viewRoll;
daa8d4474ba0 Added new settings for Viewport:
Ideenmodellierer
parents: 542
diff changeset
303 uint16_t viewPitch;
daa8d4474ba0 Added new settings for Viewport:
Ideenmodellierer
parents: 542
diff changeset
304 uint16_t viewYaw;
560
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
305 /* new in 0xFFFF001E */
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
306 uint8_t ppo2sensors_source;
5d80bb8d22cb Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents: 550
diff changeset
307 float ppo2sensors_calibCoeff[3];
567
1c95f811967c -Add 12HR Time Support
izzni
parents: 560
diff changeset
308 uint8_t amPMTime;
650
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 640
diff changeset
309 /* new in 0xFFFF001F */
5f0d3dce5ef4 Automatik setpoint change:
Ideenmodellierer
parents: 640
diff changeset
310 uint8_t autoSetpoint;
710
8adf9b8fc7fa Extension scrubber time:
Ideenmodellierer
parents: 702
diff changeset
311 uint16_t scrubTimerMax_Obsolete; /* have been replaced with new scrubber data format */
8adf9b8fc7fa Extension scrubber time:
Ideenmodellierer
parents: 702
diff changeset
312 uint16_t scrubTimerCur_Obsolete; /* have been replaced with new scrubber data format */
654
890440ab993a Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents: 652
diff changeset
313 uint8_t scrubTimerMode;
796
75ace7af8212 Expanded Sensor map structure:
Ideenmodellierer
parents: 788
diff changeset
314 uint8_t ext_sensor_map[8]; /* redefined in 0xFFFF0027 */
834
2a8af51ab04d Added event based display changes for big font view:
Ideenmodellierer
parents: 830
diff changeset
315 uint8_t cvAutofocus;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 } SSettings;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 // 8 bytes
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321 uint16_t primarySerial;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 uint8_t primaryLicence;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323 uint8_t revision8bit;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 uint8_t production_year;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 uint8_t production_month;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 uint8_t production_day;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327 uint8_t production_bluetooth_name_set;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 // 44 bytes
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 char production_info[44];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 // 8 bytes
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 uint16_t secondarySerial;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334 uint8_t secondaryLicence;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335 uint8_t secondaryReason8bit;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 uint8_t secondary_year;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 uint8_t secondary_month;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338 uint8_t secondary_day;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339 uint8_t secondary_bluetooth_name_set;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 // 4 bytes
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 char secondary_info[4];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343 } SHardwareData;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345 uint8_t writeData(uint8_t *);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346 uint8_t readData(uint8_t what,uint8_t *);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 uint8_t readDataLimits__8and16BitValues_4and7BytesOutput(uint8_t what, uint8_t * data);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 uint8_t getPPO2Max(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350 uint8_t getPPO2Min(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351 uint8_t getDiveMode(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352 uint8_t getCCRMode(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353 uint8_t getDecoType(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354 uint8_t getFutureTTS(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 SSettings* settingsGetPointer(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357 const SSettings* settingsGetPointerStandard(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358 void set_settings_to_Standard(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359 void mod_settings_for_first_start_with_empty_ext_flash(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 const SFirmwareData* firmwareDataGetPointer(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 const SHardwareData* hardwareDataGetPointer(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362 uint8_t firmwareVersion_16bit_high(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363 uint8_t firmwareVersion_16bit_low(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364 void hardwareBatchCode(uint8_t *high, uint8_t *low);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366 uint8_t RTEminimum_required_high(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 uint8_t RTEminimum_required_low(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368 uint8_t FONTminimum_required_high(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369 uint8_t FONTminimum_required_low(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 void setActualRTEversion(uint8_t high, uint8_t low);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372 void getActualRTEandFONTversion(uint8_t *RTEhigh, uint8_t *RTElow, uint8_t *FONThigh, uint8_t *FONTlow);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 void set_new_settings_missing_in_ext_flash(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375 uint8_t check_and_correct_settings(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376 uint8_t newFirmwareVersionCheckViaSettings(void);
765
da8126d5ea9f After a firmware update, use the factory settings for button sensitivity if these exist, the default settings otherwise.
heinrichsweikamp
parents: 758
diff changeset
377 void set_settings_button_to_factory_with_individual_buttonBalance(void);
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 uint8_t getLicence(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 void firmwareGetDate(RTC_DateTypeDef *SdateOutput);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381 void settingsHelperButtonSens_original_translate_to_hwOS_values(const uint32_t inputValueRaw, uint8_t *outArray4Values);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383 uint8_t buttonBalanceTranslatorHexToArray(uint8_t hexValue, uint8_t* outputArray);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384 uint8_t buttonBalanceTranslateArrayOutHex(const uint8_t* inputArray);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385 void getButtonFactorDefaults(uint8_t* basePercentage, uint8_t* buttonBalanceArray);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386 void settingsWriteFactoryDefaults(uint8_t inputValueRaw, uint8_t *inputBalanceArray);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 void settingsHelperButtonSens_keepPercentageValues(uint32_t inputValueRaw, uint8_t *outArray4Values);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389 uint8_t settingsHelperButtonSens_translate_percentage_to_hwOS_values(uint8_t inputValuePercentage);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 uint8_t settingsHelperButtonSens_translate_hwOS_values_to_percentage(uint8_t inputValuePIC);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391
819
24b39a432bc2 Added debug information in case an error in the settings has been detected:
Ideenmodellierer
parents: 805
diff changeset
392 void get_CorrectionStatus(SSettingsStatus* Status);
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
393 void reset_SettingWarning();
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
394 uint8_t isSettingsWarning();
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 654
diff changeset
395
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: 776
diff changeset
396 bool checkAndFixSetpointSettings(void);
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397 #endif // SETTINGS_H