annotate src/shared_definitions.h @ 565:0ba88db66492

CHANGE: Limit button sensitivity to 80%
author heinrichsweikamp
date Tue, 06 Feb 2018 10:07:38 +0100
parents b7eb98dbd800
children 1ab93aca7fa9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 #ifdef xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
heinrichsweikamp
parents:
diff changeset
2 ;
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
3 ; shared_definitions.h REFACTORED VERSION V2.95a1
0
heinrichsweikamp
parents:
diff changeset
4 ;
heinrichsweikamp
parents:
diff changeset
5 ; Declare variables used both in C and ASM code
heinrichsweikamp
parents:
diff changeset
6 ;
heinrichsweikamp
parents:
diff changeset
7 ; This program is free software: you can redistribute it and/or modify
heinrichsweikamp
parents:
diff changeset
8 ; it under the terms of the GNU General Public License as published by
heinrichsweikamp
parents:
diff changeset
9 ; the Free Software Foundation, either version 3 of the License, or
heinrichsweikamp
parents:
diff changeset
10 ; (at your option) any later version.
heinrichsweikamp
parents:
diff changeset
11 ;
heinrichsweikamp
parents:
diff changeset
12 ; This program is distributed in the hope that it will be useful,
heinrichsweikamp
parents:
diff changeset
13 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
heinrichsweikamp
parents:
diff changeset
14 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
heinrichsweikamp
parents:
diff changeset
15 ; GNU General Public License for more details.
heinrichsweikamp
parents:
diff changeset
16 ;
heinrichsweikamp
parents:
diff changeset
17 ; You should have received a copy of the GNU General Public License
heinrichsweikamp
parents:
diff changeset
18 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
heinrichsweikamp
parents:
diff changeset
19 ;
heinrichsweikamp
parents:
diff changeset
20 ; Copyright (c) 2010, JD Gascuel.
heinrichsweikamp
parents:
diff changeset
21 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
22 ; RATIONAL
heinrichsweikamp
parents:
diff changeset
23 ;
heinrichsweikamp
parents:
diff changeset
24 ; We must enforce good data passing between the C and the ASM parts of code.
heinrichsweikamp
parents:
diff changeset
25 ; The previous design used two independant definitions of each variable,
heinrichsweikamp
parents:
diff changeset
26 ; one in C, one in ASM. If they did not match, no error was generated, and
heinrichsweikamp
parents:
diff changeset
27 ; anything can happend at runtime...
heinrichsweikamp
parents:
diff changeset
28 ;
heinrichsweikamp
parents:
diff changeset
29 ; The new design use LINKING to ensure the variables defined in C are at the
heinrichsweikamp
parents:
diff changeset
30 ; same address when used in ASM code. And it uses a unique declaration file
heinrichsweikamp
parents:
diff changeset
31 ; (with suitable macros) to make sure they have the same size in both language.
heinrichsweikamp
parents:
diff changeset
32 ;
heinrichsweikamp
parents:
diff changeset
33 ; HISTORY
heinrichsweikamp
parents:
diff changeset
34 ; 2011-01-20: [jDG] Creation.
heinrichsweikamp
parents:
diff changeset
35 ;
heinrichsweikamp
parents:
diff changeset
36 ; NOTE
heinrichsweikamp
parents:
diff changeset
37 ;
heinrichsweikamp
parents:
diff changeset
38 ; This file have to obey both ASM and C syntax. The only common directives
heinrichsweikamp
parents:
diff changeset
39 ; are #if/#ifdef/#endif and the #define, so they are eavily used to do the
heinrichsweikamp
parents:
diff changeset
40 ; trick.
heinrichsweikamp
parents:
diff changeset
41 ;
heinrichsweikamp
parents:
diff changeset
42 ; BUGS
heinrichsweikamp
parents:
diff changeset
43 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
44 ; HISTORY
heinrichsweikamp
parents:
diff changeset
45 #endif
heinrichsweikamp
parents:
diff changeset
46
heinrichsweikamp
parents:
diff changeset
47 #ifdef __18CXX
heinrichsweikamp
parents:
diff changeset
48 //------------------------------------------------------------------------
heinrichsweikamp
parents:
diff changeset
49 // C-style declarations:
heinrichsweikamp
parents:
diff changeset
50 # ifndef TEST_MAIN
heinrichsweikamp
parents:
diff changeset
51 # define VAR_UCHAR(n) extern unsigned char n
heinrichsweikamp
parents:
diff changeset
52 # define TAB_UCHAR(n,size) extern unsigned char n[size]
heinrichsweikamp
parents:
diff changeset
53 # define VAR_UINT(n) extern unsigned short n
heinrichsweikamp
parents:
diff changeset
54 # define TAB_UINT(n,size) extern unsigned short n[size]
heinrichsweikamp
parents:
diff changeset
55 # else
heinrichsweikamp
parents:
diff changeset
56 # define VAR_UCHAR(n) unsigned char n
heinrichsweikamp
parents:
diff changeset
57 # define TAB_UCHAR(n,size) unsigned char n[size]
heinrichsweikamp
parents:
diff changeset
58 # define VAR_UINT(n) unsigned short n
heinrichsweikamp
parents:
diff changeset
59 # define TAB_UINT(n,size) unsigned short n[size]
heinrichsweikamp
parents:
diff changeset
60 # endif
heinrichsweikamp
parents:
diff changeset
61 #else
heinrichsweikamp
parents:
diff changeset
62 ;-------------------------------------------------------------------------
heinrichsweikamp
parents:
diff changeset
63 ; ASM-style declarations:
heinrichsweikamp
parents:
diff changeset
64 #define VAR_UCHAR(n) n res 1
heinrichsweikamp
parents:
diff changeset
65 #define TAB_UCHAR(n,size) n res size
heinrichsweikamp
parents:
diff changeset
66 #define VAR_UINT(n) n res 2
heinrichsweikamp
parents:
diff changeset
67 #define TAB_UINT(n,size) n res 2*size
heinrichsweikamp
parents:
diff changeset
68 #endif
heinrichsweikamp
parents:
diff changeset
69
210
7dbc1d780ca5 do not clear char_O_deco_gas in copy_deco_table
heinrichsweikamp
parents: 126
diff changeset
70
0
heinrichsweikamp
parents:
diff changeset
71 #ifdef xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
heinrichsweikamp
parents:
diff changeset
72 Define model dimensions.
heinrichsweikamp
parents:
diff changeset
73 NUM_COMP is the number of compartiments in the Bühlmann ZH-L16 model, ie 16.
heinrichsweikamp
parents:
diff changeset
74 NUM_STOPS is the maximum number of stops computed by decoplanning.
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
75 Note that the deepest stop is roughly limited to 3m * NUM_STOPS
0
heinrichsweikamp
parents:
diff changeset
76 (this is assuming all stops up to the surface are used).
heinrichsweikamp
parents:
diff changeset
77 Note also that if the table overflow, extra stops are ignored,
heinrichsweikamp
parents:
diff changeset
78 and not reported in TTS summing.
heinrichsweikamp
parents:
diff changeset
79 NUM_GAS is the number of (potentially) active gas considered during
heinrichsweikamp
parents:
diff changeset
80 ascent simulation.
heinrichsweikamp
parents:
diff changeset
81 #endif
heinrichsweikamp
parents:
diff changeset
82 #define NUM_COMP 0x10
heinrichsweikamp
parents:
diff changeset
83 #define NUM_STOPS 0x20
heinrichsweikamp
parents:
diff changeset
84 #define NUM_GAS 5
heinrichsweikamp
parents:
diff changeset
85
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
86
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
87 #ifdef __18CXX
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
88 //---- BANK 3 DATA -------------------------------------------------------
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
89 // Gather all data C-code --> ASM-code
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
90 # pragma udata overlay bank3=0x300
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
91 #else
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
92 ; In ASM, put the same bank, in overlay mode, at the same address
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
93 bank3 udata_ovr 0x300
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
94 #endif
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
95
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
96 VAR_UINT (int_O_gtissue_press); // pressure of leading compartment
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
97
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
98 VAR_UINT (int_O_desaturation_time); // time until tissues desaturated to 5% remains, in minutes
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
99 VAR_UINT (int_O_nofly_time); // altitude / no-fly waiting time time in minutes
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
100
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
101 VAR_UINT (int_O_ascenttime); // time-to-surface (TTS) in minutes
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
102 VAR_UINT (int_O_alternate_ascenttime); // TTS for the alternative dive plan
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
103
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
104 VAR_UINT (int_O_CNS_fraction); // current CNS%
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
105 VAR_UINT (int_O_normal_CNS_fraction); // CNS% at end of dive in normal dive plan
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
106 VAR_UINT (int_O_alternate_CNS_fraction); // CNS% at end of dive in alternative plan
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
107
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
108 VAR_UINT (int_O_gradient_factor); // current gradient factor in %
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
109
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
110 VAR_UCHAR (char_O_nullzeit); // remaining NDL time in minutes
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
111 VAR_UCHAR (char_O_alternate_nullzeit); // remaining NDL time for the alternative dive plan
0
heinrichsweikamp
parents:
diff changeset
112
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
113 VAR_UCHAR (char_O_main_status); // setup of the deco engine regarding the real tissue computations
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
114 VAR_UCHAR (char_O_deco_status); // setup of the deco engine regarding the decompression computations
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
115
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
116 VAR_UCHAR (char_O_gtissue_no); // number of the leading compartment
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
117
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
118 VAR_UCHAR (char_O_EAD); // equivalent air depth (EAD) of breathed gas
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
119 VAR_UCHAR (char_O_END); // equivalent narcosis depth (END) of breathed gas
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
120
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
121 VAR_UCHAR (char_O_first_deco_depth); // depth of first stop (deco or gas change)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
122 VAR_UCHAR (char_O_first_deco_time) ; // duration of first stop
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
123
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
124 TAB_UCHAR (char_O_deco_depth, NUM_STOPS); // stops table: depth, ...
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
125 TAB_UCHAR (char_O_deco_time, NUM_STOPS); // ... duration, and
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
126 TAB_UCHAR (char_O_deco_gas, NUM_STOPS); // ... gas breathed
0
heinrichsweikamp
parents:
diff changeset
127
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
128 TAB_UCHAR (char_O_deco_time_for_log, NUM_STOPS); // variant of the stops table for logging purpose
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
129
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
130 TAB_UCHAR (char_O_tissue_N2_saturation, NUM_COMP); // nitrogen tissue pressures for display purpose
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
131 TAB_UCHAR (char_O_tissue_He_saturation, NUM_COMP); // helium tissue pressures for display purpose
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
132
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
133 VAR_UCHAR (char_O_deco_warnings); // vector of warnings generated by the deco engine
0
heinrichsweikamp
parents:
diff changeset
134
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
135 TAB_UINT (int_O_gas_volumes, NUM_GAS); // gas volumes needed in liters
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
136 TAB_UINT (int_O_tank_pres_need, NUM_GAS); // tank pressures needed in bar
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
137 VAR_UINT (int_O_ceiling); // ultimate ascent bound in mbar relative pressure
0
heinrichsweikamp
parents:
diff changeset
138
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
139 VAR_UINT (int_O_O2_ppO2); // ppO2 of pure O2 at current depth
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
140 VAR_UINT (int_O_pure_ppO2); // ppO2 of the current gas or dil if breathed pure
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
141 VAR_UINT (int_O_pSCR_ppO2); // ppO2 calculated in pSCR loop
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
142 VAR_UINT (int_O_breathed_ppO2); // ppO2 actually breathed (= char_O_pure_ppO2 if in OC)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
143
0
heinrichsweikamp
parents:
diff changeset
144
heinrichsweikamp
parents:
diff changeset
145 #ifdef __18CXX
heinrichsweikamp
parents:
diff changeset
146 //---- BANK 4 DATA -------------------------------------------------------
heinrichsweikamp
parents:
diff changeset
147 // Gather all data ASM-code --> C-code
heinrichsweikamp
parents:
diff changeset
148 # pragma udata overlay bank4=0x400
heinrichsweikamp
parents:
diff changeset
149 #else
heinrichsweikamp
parents:
diff changeset
150 ; In ASM, put the same bank, in overlay mode, at the same address
heinrichsweikamp
parents:
diff changeset
151 bank4 udata_ovr 0x400
heinrichsweikamp
parents:
diff changeset
152 #endif
heinrichsweikamp
parents:
diff changeset
153
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
154 VAR_UINT (int_I_pres_respiration); // absolute pressure breathed
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
155 VAR_UINT (int_I_pres_surface); // absolute pressure at surface
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
156
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
157 VAR_UCHAR (char_I_current_gas); // number of gas currently breathed (1..5 for configured gases, 6 for the manual gas)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
158 VAR_UCHAR (char_I_He_ratio); // helium ratio of the currently breathed gas
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
159 VAR_UCHAR (char_I_O2_ratio); // oxygen ratio of the currently breathed gas
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
160
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
161 VAR_UCHAR (char_I_saturation_multiplier); // safety factor, 100 = no conservatism, 150 = 50% faster saturation
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
162 VAR_UCHAR (char_I_desaturation_multiplier);// safety factor, 100 = no conservatism, 66 = 50% slower desaturation
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
163
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
164 VAR_UCHAR (char_I_GF_High_percentage); // GF model high value
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
165 VAR_UCHAR (char_I_GF_Low_percentage); // GF model low value
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
166
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
167 VAR_UCHAR (char_I_deco_distance); // assumed extra depth below required depth for CNS and gas volumes calculations
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
168 VAR_UCHAR (char_I_depth_last_deco); // depth of the last deco stop in meters
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
169
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
170 VAR_UCHAR (char_I_deco_model); // deco model selection: 0 = ZH-L16, 1 = ZH-L16-GF (with gradient factors)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
171
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
172 VAR_UCHAR (char_I_bottom_depth); // bottom depth, used for gas volume calculations
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
173 VAR_UCHAR (char_I_bottom_time); // bottom time, used for gas volume calculations
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
174
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
175 VAR_UCHAR (char_I_dive_interval); // duration of surface break before next dive in minutes, used in simulation
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
176 VAR_UCHAR (char_I_sim_advance_time); // 'fast forward' of dive time, used in simulation (+5 min function)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
177
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
178 VAR_UCHAR (char_I_const_ppO2); // ppO2 reported from sensors or by setpoint
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
179
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
180 TAB_UCHAR (char_I_deco_gas_change,NUM_GAS); // change depths of the OC gases
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
181 TAB_UCHAR (char_I_dil_change, NUM_GAS); // change depths of the diluent gases. Attention: must be placed after char_I_deco_gas_change! Remark: not used by C code, only by ASM code
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
182
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
183 TAB_UCHAR (char_I_setpoint_change,NUM_GAS); // change depth for the setpoints in meter
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
184 TAB_UCHAR (char_I_setpoint_cbar, NUM_GAS); // setpoints in cbar
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
185
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
186 TAB_UCHAR (char_I_deco_O2_ratio, NUM_GAS); // oxygen ratios of the configured gases, used for deco calculations
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
187 TAB_UCHAR (char_I_deco_He_ratio, NUM_GAS); // helium ratios of the configured gases, used for deco calculations
0
heinrichsweikamp
parents:
diff changeset
188
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
189 TAB_UCHAR (char_I_tank_size, NUM_GAS); // tank sizes, used for pressure needs calculation
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
190 TAB_UCHAR (char_I_tank_pres_fill, NUM_GAS); // tank fill pressures, used for generating warnings
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
191
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
192 VAR_UCHAR (char_I_cc_max_frac_o2); // limiter for maximum O2% in loop
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
193 VAR_UCHAR (char_I_PSCR_drop); // pSCR parameter drop [%]
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
194 VAR_UCHAR (char_I_PSCR_lungratio); // pSCR parameter lung ratio [1/x]
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
195
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
196 VAR_UCHAR (char_I_altitude_wait); // selector for altitude / no-fly waiting time calculation
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
197
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
198 VAR_UCHAR (char_I_bottom_usage); // gas consumption during bottom part and initial ascent in liters/minute
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
199 VAR_UCHAR (char_I_deco_usage); // gas consumption during deco stops and following ascents in liters/minute
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
200
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
201 VAR_UCHAR (char_I_extra_time); // extra bottom time for fTTs and delayed ascent calculation in minutes
0
heinrichsweikamp
parents:
diff changeset
202
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
203 VAR_UCHAR (char_I_ppO2_max); // warning threshold for maximum ppO2 during working phase of the dive
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
204 VAR_UCHAR (char_I_ppO2_max_deco); // warning threshold for maximum ppO2 during deco phase of the dive
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
205 VAR_UCHAR (char_I_ppO2_min); // warning threshold for maximum ppO2 when breathing OC
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
206 VAR_UCHAR (char_I_ppO2_min_loop); // warning threshold for maximum ppO2 when breathing from CCR or pSCR
0
heinrichsweikamp
parents:
diff changeset
207
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
208 VAR_UCHAR (char_I_ascent_speed); // ascent speed in meters/minute
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
209 VAR_UCHAR (char_I_gas_change_time); // extra time spent during a stop for doing a gas change, in minutes
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
210
0
heinrichsweikamp
parents:
diff changeset
211
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
212 #ifdef xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
213 // VAR_UCHAR (char_I_step_is_1min); // Use 1min integration for tissue and CNS. DELETED ## V2.95 - made local to p2_deco.c
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
214 // VAR_UINT (int_I_temp); // new in v101 DELETED ## no fly
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
215 // VAR_UINT (int_I_divemins); // Dive time (minutes) DELETED ## V2.95 - not used by p2_deco.c
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
216 // VAR_UCHAR (char_I_temp); // new in v101 DELETED ## no fly
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
217 // VAR_UCHAR (char_I_actual_ppO2); // DELETED ## V2.94
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
218 // VAR_UCHAR (char_I_first_gas); // Gas used at start of dive (bottom mix) DELETED ## V2.95 - made local to p2_deco.c
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
219 // VAR_UCHAR (char_I_N2_ratio); // N2 ratio of the currently breathed gas DELETED ## V2.95 - not read from ASM, but actually computed by p2_deco.c from H2 and O2 ratio
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
220 // VAR_UCHAR (char_O_deco_last_stop); // Depth reached during deco planning. DELETED ## V2.95 - not used in ASM
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
221 // VAR_UCHAR (temp_bankx400); // reserved space for temporary variables
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 521
diff changeset
222 #endif