annotate Discovery/Inc/logbook.h @ 515:218ac999e96b

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