annotate Discovery/Inc/logbook.h @ 677:1953cd9145b3 Betatest

Move include file to common to ... ... get things compiled. The configuration.h file is also used from the RTE code, so it should be in the Common tree. Signed-off-by: Jan Mulder <jan@jlmulder.nl>
author Jan Mulder <jan@jlmulder.nl>
date Wed, 20 Apr 2022 20:25:04 +0200
parents ae7f8333c900
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/logbook.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 LOGBOOK_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 #define LOGBOOK_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 #include "data_central.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 #include "settings.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 uint8_t setpoint_cbar;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 uint8_t depth_meter;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37 } SSetpointLog;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41 uint8_t oxygen_percentage;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 uint8_t helium_percentage;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 uint8_t depth_meter;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 gasbit8_Type note;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45 } SGasListLog;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 //Logbook
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 uint16_t diveHeaderStart;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 uint8_t pBeginProfileData[3];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 uint8_t pEndProfileData[3];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 uint8_t profileLength[3];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 uint8_t logbookProfileVersion;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 uint8_t dateYear;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 uint8_t dateMonth;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 uint8_t dateDay;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 uint8_t timeHour;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 uint8_t timeMinute;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 uint8_t extraPagesWithData; /* from here on: changes in order with respect to OSTC3 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 uint16_t maxDepth;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 uint16_t diveTimeMinutes;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 uint8_t diveTimeSeconds;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 uint8_t samplingRate;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 int16_t minTemp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 uint16_t surfacePressure_mbar;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 uint16_t desaturationTime;
524
b33a8c1c72e5 Minor: Removed duplicated definition of number of available gases
Ideenmodellierer
parents: 486
diff changeset
68 SGasListLog gasordil[NUM_GASES];
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 uint8_t firmwareVersionLow;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 uint8_t firmwareVersionHigh;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 uint16_t batteryVoltage;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 uint16_t cnsAtBeginning;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 uint8_t gfAtBeginning;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 uint8_t gfAtEnd;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 uint16_t personalDiveCount;
524
b33a8c1c72e5 Minor: Removed duplicated definition of number of available gases
Ideenmodellierer
parents: 486
diff changeset
76 SSetpointLog setpoint[NUM_GASES];
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 uint16_t maxCNS;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 uint16_t averageDepth_mbar;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 uint16_t total_diveTime_seconds;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 uint8_t salinity;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 uint8_t gfLow_or_Vpm_conservatism;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 uint8_t gfHigh;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 uint8_t decoModel;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 float n2Compartments[16];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 float heCompartments[16];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 uint8_t n2CompartDesatTime_min[16];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 uint8_t heCompartDesatTime_min[16];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 uint16_t diveNumber;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89 uint8_t lastDecostop_m;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 uint8_t CCRmode;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 uint8_t diveMode;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 uint8_t hwHudLastStatus; /* from here on identical to OSTC3 again */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 uint16_t hwHudBattery_mV;
486
3db9eba89e3c Bugfix header EEPROM layout:
ideenmodellierer
parents: 471
diff changeset
94 uint8_t batteryGaugeRegisters[5]; /* former batteryGaugeRegisters (6 Bytes) which were not used => use as reserve to keep memory layout */
3db9eba89e3c Bugfix header EEPROM layout:
ideenmodellierer
parents: 471
diff changeset
95 uint8_t batteryCharge; /* first reuse byte */
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 uint16_t diveHeaderEnd;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 } SLogbookHeader;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 //Logbook OSTC3
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 uint8_t diveHeaderStart[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 uint8_t pBeginProfileData[3];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 uint8_t pEndProfileData[3];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 uint8_t logbookProfileVersion;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 uint8_t profileLength[3];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 uint8_t dateYear;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 uint8_t dateMonth;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 uint8_t dateDay;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 uint8_t timeHour;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 uint8_t timeMinute;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 uint8_t maxDepth[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 uint8_t diveTimeMinutes[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 uint8_t diveTimeSeconds;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 uint8_t minTemp[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 uint8_t surfacePressure_mbar[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 uint8_t desaturationTime[2];
524
b33a8c1c72e5 Minor: Removed duplicated definition of number of available gases
Ideenmodellierer
parents: 486
diff changeset
118 uint8_t gasordil[NUM_GASES*4];
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 uint8_t firmwareVersionLow;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 uint8_t firmwareVersionHigh;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 uint8_t batteryVoltage[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 uint8_t samplingRate;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 uint8_t cnsAtBeginning[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 uint8_t gfAtBeginning;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 uint8_t gfAtEnd;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 uint8_t personalDiveCount[2];
471
73da921869d9 bugfix: implement battery charge percentage in dive header
Jan Mulder <jlmulder@xs4all.nl>
parents: 458
diff changeset
127 uint8_t batteryCharge;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 uint8_t setpoint[5*2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 uint8_t salinity;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 uint8_t maxCNS[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 uint8_t averageDepth_mbar[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 uint8_t total_diveTime_seconds[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 uint8_t gfLow_or_Vpm_conservatism;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 uint8_t gfHigh;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 uint8_t decoModel;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 uint8_t diveNumber[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 uint8_t diveMode;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 uint8_t n2CompartDesatTime_min[16];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 uint8_t n2Compartments[16*4];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 uint8_t heCompartDesatTime_min[16];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 uint8_t heCompartments[16*4];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 uint8_t lastDecostop_m;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 uint8_t safetyDistance_10cm;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 uint8_t hwHudBattery_mV[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 uint8_t hwHudLastStatus;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 uint8_t batteryGaugeRegisters[6];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 uint8_t diveHeaderEnd[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 } SLogbookHeaderOSTC3;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 //Logbook OSTC3
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 uint8_t profileLength[3];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155 uint8_t dateYear;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 uint8_t dateMonth;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 uint8_t dateDay;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 uint8_t timeHour;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 uint8_t timeMinute;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 uint8_t maxDepth[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 uint8_t diveTimeMinutes[2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 uint8_t diveTimeSeconds;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 uint8_t totalDiveNumberLow;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 uint8_t totalDiveNumberHigh;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 uint8_t profileVersion;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 } SLogbookHeaderOSTC3compact;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 uint8_t profileLength[3];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 uint8_t samplingRate_seconds;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 uint8_t numDivisors;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 uint8_t tempType;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 uint8_t tempLength;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 uint8_t tempDivisor;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 uint8_t deco_ndlType;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 uint8_t deco_ndlLength;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 uint8_t deco_ndlDivisor;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 uint8_t gfType;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 uint8_t gfLength;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 uint8_t gfDivisor;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 uint8_t ppo2Type;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 uint8_t ppo2Length;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 uint8_t ppo2Divisor;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 uint8_t decoplanType;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 uint8_t decoplanLength;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 uint8_t decoplanDivisor;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 uint8_t cnsType;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 uint8_t cnsLength;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 uint8_t cnsDivisor;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 uint8_t tankType;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 uint8_t tankLength;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 uint8_t tankDivisor;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 } SSmallHeader;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 int8_t percentageO2;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 int8_t percentageHe;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 } SManualGas;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202
270
2e58a4094770 feature, debug: make simulator write a logbook entry
Jan Mulder <jlmulder@xs4all.nl>
parents: 269
diff changeset
203 void logbook_writeSample(const SDiveState *state);
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 void logbook_initNewdiveProfile(const SDiveState* pInfo, SSettings* pSettings);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 void logbook_EndDive(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 SLogbookHeader* logbook_getCurrentHeader(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 SLogbookHeaderOSTC3 * logbook_build_ostc3header(SLogbookHeader* pLogbookHeader);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 SLogbookHeaderOSTC3compact * logbook_build_ostc3header_compact(SLogbookHeader* pHead);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 uint8_t logbook_getNumberOfHeaders(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 uint8_t logbook_getHeader(uint8_t StepBackwards,SLogbookHeader* pLogbookHeader);
455
928a14568689 Reactivated samples for bottle pressure information:
ideenmodellierer
parents: 270
diff changeset
213 uint16_t logbook_readSampleData(uint8_t StepBackwards, uint16_t length,uint16_t* depth, uint8_t* gasid, int16_t* temperature, uint16_t* ppo2,
928a14568689 Reactivated samples for bottle pressure information:
ideenmodellierer
parents: 270
diff changeset
214 uint16_t* setpoint, uint16_t* sensor1, uint16_t* sensor2, uint16_t* sensor3, uint16_t* cns, uint8_t* bailout,
610
ae7f8333c900 Added access to logbook marker data:
Ideenmodellierer
parents: 524
diff changeset
215 uint16_t* decostopDepth, uint16_t* tank, uint8_t* event);
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 void logbook_test(void);
270
2e58a4094770 feature, debug: make simulator write a logbook entry
Jan Mulder <jlmulder@xs4all.nl>
parents: 269
diff changeset
217 void logbook_InitAndWrite(const SDiveState* pStateReal);
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 void logbook_recover_brokenlog(uint8_t headerId);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 uint16_t logbook_lastDive_diveNumber(void);
458
5dd996ed8611 Added ppO2 to dummy profile data:
ideenmodellierer
parents: 455
diff changeset
221 uint16_t logbook_fillDummySampleBuffer(SLogbookHeader* pHeader);
455
928a14568689 Reactivated samples for bottle pressure information:
ideenmodellierer
parents: 270
diff changeset
222 void logbook_readDummySamples(uint8_t* pTarget, uint16_t length);
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 #endif /* LOGBOOK_H */