Mercurial > public > mk2
annotate code_part1/OSTC_code_c_part2/p2_definitions.h @ 826:2151c4135fad
CHANGE: Battery percent based on ON-Time instead of battery voltage
author | heinrichsweikamp |
---|---|
date | Wed, 30 Sep 2015 20:25:28 +0200 |
parents | 4fd718965e8f |
children |
rev | line source |
---|---|
116 | 1 // ********************************************************* |
2 // ** Common definitions for the OSTC decompression code ** | |
3 // ********************************************************* | |
4 | |
5 ////////////////////////////////////////////////////////////////////////////// | |
815 | 6 // OSTC Mk.2, 2N and 2C - diving computer code |
807
c50296c3059e
BUGFIX: Divetime had unwanted "." behind the minutes
heinrichsweikamp
parents:
743
diff
changeset
|
7 // Copyright (C) 2015 HeinrichsWeikamp GbR |
116 | 8 // |
9 // This program is free software: you can redistribute it and/or modify | |
10 // it under the terms of the GNU General Public License as published by | |
11 // the Free Software Foundation, either version 3 of the License, or | |
12 // (at your option) any later version. | |
13 // | |
14 // This program is distributed in the hope that it will be useful, | |
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 // GNU General Public License for more details. | |
18 // | |
19 // You should have received a copy of the GNU General Public License | |
20 // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 // | |
22 ////////////////////////////////////////////////////////////////////////////// | |
23 // history: | |
24 // 12/25/10 v110: [jDG] split in three files (deco.c, main.c, definitions.h) | |
25 | |
532 | 26 /* |
184 | 27 #define DBG_c_gas 0x0001 |
28 #define DBG_c_ppO2 0x0002 | |
29 #define DBG_RUN 0x0004 | |
30 #define DBG_RESTART 0x0008 | |
116 | 31 |
184 | 32 #define DBG_CdeSAT 0x0010 |
33 #define DBG_C_MODE 0x0020 | |
34 #define DBG_C_SURF 0x0040 | |
35 #define DBG_HEwoHE 0x0080 | |
116 | 36 |
321 | 37 // #define DBG_UNUSED 0x0100 |
184 | 38 #define DBG_C_DGAS 0x0200 |
39 #define DBG_C_DIST 0x0400 | |
40 #define DBG_C_LAST 0x0800 | |
116 | 41 |
184 | 42 #define DBG_C_GF 0x1000 |
43 #define DBG_ZH16ERR 0x2000 | |
44 #define DBG_PHIGH 0x4000 | |
45 #define DBG_PLOW 0x8000 | |
116 | 46 |
184 | 47 #define DBS_mode 0x0001 |
48 #define DBS_ppO2 0x0002 | |
49 #define DBS_HE_sat 0x0004 | |
321 | 50 // #define DBS_UNUSED 0x0008 |
711
f555590f1419
minor cleanups for CNS/NOAA bugfix.
JeanDo <jd.gascuel@free.fr>
parents:
601
diff
changeset
|
51 |
184 | 52 #define DBS_SAT2l 0x0010 |
53 #define DBS_SAT2h 0x0020 | |
54 #define DBS_GFLOW2l 0x0040 | |
55 #define DBS_GFLOW2h 0x0080 | |
711
f555590f1419
minor cleanups for CNS/NOAA bugfix.
JeanDo <jd.gascuel@free.fr>
parents:
601
diff
changeset
|
56 |
184 | 57 #define DBS_GFHGH2l 0x0100 |
58 #define DBS_GFHGH2h 0x0200 | |
59 #define DBS_GASO22l 0x0400 | |
60 #define DBS_GASO22h 0x0800 | |
711
f555590f1419
minor cleanups for CNS/NOAA bugfix.
JeanDo <jd.gascuel@free.fr>
parents:
601
diff
changeset
|
61 |
184 | 62 #define DBS_DIST2h 0x1000 |
63 #define DBS_LAST2h 0x2000 | |
64 #define DBS_DECOO2l 0x4000 | |
65 #define DBS_DECOO2h 0x8000 | |
116 | 66 |
184 | 67 #define DBS2_PRES2h 0x0001 |
68 #define DBS2_PRES2l 0x0002 | |
69 #define DBS2_SURF2l 0x0004 | |
70 #define DBS2_SURF2h 0x0008 | |
711
f555590f1419
minor cleanups for CNS/NOAA bugfix.
JeanDo <jd.gascuel@free.fr>
parents:
601
diff
changeset
|
71 |
184 | 72 #define DBS2_DESAT2l 0x0010 |
73 #define DBS2_DESAT2h 0x0020 | |
74 #define DBS2_GFDneg 0x0040 | |
116 | 75 |
532 | 76 */ |
77 | |
184 | 78 #define MBAR_REACH_GASCHANGE_AUTO_CHANGE_OFF 150 |
116 | 79 |
80 // ************************* | |
81 // ** P R O T O T Y P E S ** | |
82 // ************************* | |
83 | |
167 | 84 extern void calc_percentage(void); |
85 extern void deco_calc_hauptroutine(void); | |
86 extern void deco_clear_tissue(void); | |
87 extern void deco_calc_percentage(void); | |
88 extern void deco_calc_wo_deco_step_1_min(void); | |
368 | 89 extern void deco_calc_dive_interval(void); |
167 | 90 extern void deco_gradient_array(void); |
91 extern void deco_hash(void); | |
92 extern void deco_calc_desaturation_time(void); | |
93 extern void deco_calc_CNS_fraction(void); | |
820 | 94 extern void deco_calc_CNS_decrease_15min(void); |
167 | 95 extern void deco_clear_CNS_fraction(void); |
96 extern void deco_push_tissues_to_vault(void); | |
97 extern void deco_pull_tissues_from_vault(void); | |
488 | 98 extern void deco_calc_CNS_planning(void); |
222
638f8e17bd51
Prototyping deco_gas_volumes() to compute gas consumption per tank with decoplanning.
JeanDo
parents:
200
diff
changeset
|
99 extern void deco_gas_volumes(void); |
116 | 100 |
184 | 101 // *********************************************** |
102 // ** Allow compile on VisualC ** | |
103 // *********************************************** | |
104 | |
711
f555590f1419
minor cleanups for CNS/NOAA bugfix.
JeanDo <jd.gascuel@free.fr>
parents:
601
diff
changeset
|
105 #if defined(WIN32) || defined(UNIX) |
184 | 106 // Some keywords just dont exists on Visual C++: |
107 # define CROSS_COMPILE | |
108 # define __18CXX | |
109 # define ram | |
110 # define rom | |
111 # define overlay | |
112 # define PARAMETER | |
113 | |
114 // Avoid warnings about float/double mismatches: | |
548 | 115 # ifdef WIN32 |
116 # pragma warning(disable: 4244 4068 4305) | |
117 # endif | |
184 | 118 #else |
119 # define PARAMETER static | |
235 | 120 # ifdef __DEBUG |
121 # define assert(predicate) if( !(predicate) ) assert_failed(__LINE__) | |
122 # else | |
123 # define assert(predicate) | |
124 # endif | |
184 | 125 #endif |
126 | |
167 | 127 ////////////////////////////////////////////////////////////////////////////// |