Mercurial > public > mk2
annotate code_part1/OSTC_code_c_part2/p2_definitions.h @ 340:ecbbbd423e86
BUGFIX save negativ temperatures in logbook (bbbug #6)
BUGFIX temperature & amb_pressure averaging done in private variable.
BUGFIX Signed averaging of temperature.
author | JeanDo |
---|---|
date | Fri, 20 May 2011 00:39:05 +0200 |
parents | a99073445c18 |
children | de3b267e1fd9 |
rev | line source |
---|---|
116 | 1 // ********************************************************* |
2 // ** Common definitions for the OSTC decompression code ** | |
3 // ********************************************************* | |
4 | |
5 ////////////////////////////////////////////////////////////////////////////// | |
6 // OSTC - diving computer code | |
7 // Copyright (C) 2008 HeinrichsWeikamp GbR | |
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 | |
184 | 26 #define DBG_c_gas 0x0001 |
27 #define DBG_c_ppO2 0x0002 | |
28 #define DBG_RUN 0x0004 | |
29 #define DBG_RESTART 0x0008 | |
116 | 30 |
184 | 31 #define DBG_CdeSAT 0x0010 |
32 #define DBG_C_MODE 0x0020 | |
33 #define DBG_C_SURF 0x0040 | |
34 #define DBG_HEwoHE 0x0080 | |
116 | 35 |
321 | 36 // #define DBG_UNUSED 0x0100 |
184 | 37 #define DBG_C_DGAS 0x0200 |
38 #define DBG_C_DIST 0x0400 | |
39 #define DBG_C_LAST 0x0800 | |
116 | 40 |
184 | 41 #define DBG_C_GF 0x1000 |
42 #define DBG_ZH16ERR 0x2000 | |
43 #define DBG_PHIGH 0x4000 | |
44 #define DBG_PLOW 0x8000 | |
116 | 45 |
184 | 46 #define DBS_mode 0x0001 |
47 #define DBS_ppO2 0x0002 | |
48 #define DBS_HE_sat 0x0004 | |
321 | 49 // #define DBS_UNUSED 0x0008 |
184 | 50 |
51 #define DBS_SAT2l 0x0010 | |
52 #define DBS_SAT2h 0x0020 | |
53 #define DBS_GFLOW2l 0x0040 | |
54 #define DBS_GFLOW2h 0x0080 | |
55 | |
56 #define DBS_GFHGH2l 0x0100 | |
57 #define DBS_GFHGH2h 0x0200 | |
58 #define DBS_GASO22l 0x0400 | |
59 #define DBS_GASO22h 0x0800 | |
60 | |
61 #define DBS_DIST2h 0x1000 | |
62 #define DBS_LAST2h 0x2000 | |
63 #define DBS_DECOO2l 0x4000 | |
64 #define DBS_DECOO2h 0x8000 | |
116 | 65 |
184 | 66 #define DBS2_PRES2h 0x0001 |
67 #define DBS2_PRES2l 0x0002 | |
68 #define DBS2_SURF2l 0x0004 | |
69 #define DBS2_SURF2h 0x0008 | |
70 | |
71 #define DBS2_DESAT2l 0x0010 | |
72 #define DBS2_DESAT2h 0x0020 | |
73 #define DBS2_GFDneg 0x0040 | |
116 | 74 |
184 | 75 #define MBAR_REACH_GASCHANGE_AUTO_CHANGE_OFF 150 |
116 | 76 |
77 // ************************* | |
78 // ** P R O T O T Y P E S ** | |
79 // ************************* | |
80 | |
167 | 81 extern void calc_percentage(void); |
82 extern void deco_calc_hauptroutine(void); | |
83 extern void deco_clear_tissue(void); | |
84 extern void deco_calc_percentage(void); | |
85 extern void deco_calc_wo_deco_step_1_min(void); | |
86 extern void deco_debug(void); | |
87 extern void deco_gradient_array(void); | |
88 extern void deco_hash(void); | |
89 extern void deco_calc_desaturation_time(void); | |
90 extern void deco_calc_CNS_fraction(void); | |
91 extern void deco_clear_CNS_fraction(void); | |
92 extern void deco_push_tissues_to_vault(void); | |
93 extern void deco_pull_tissues_from_vault(void); | |
222
638f8e17bd51
Prototyping deco_gas_volumes() to compute gas consumption per tank with decoplanning.
JeanDo
parents:
200
diff
changeset
|
94 extern void deco_gas_volumes(void); |
116 | 95 |
184 | 96 // *********************************************** |
97 // ** Allow compile on VisualC ** | |
98 // *********************************************** | |
99 | |
100 #ifdef WIN32 | |
101 // Some keywords just dont exists on Visual C++: | |
102 # define CROSS_COMPILE | |
103 # define __18CXX | |
104 # define ram | |
105 # define rom | |
106 # define overlay | |
107 # define PARAMETER | |
108 | |
192 | 109 #include <assert.h> |
110 | |
184 | 111 // Avoid warnings about float/double mismatches: |
112 # pragma warning(disable: 4244 4068 4305) | |
113 #else | |
114 # define PARAMETER static | |
235 | 115 # ifdef __DEBUG |
116 # define assert(predicate) if( !(predicate) ) assert_failed(__LINE__) | |
117 # else | |
118 # define assert(predicate) | |
119 # endif | |
184 | 120 #endif |
121 | |
167 | 122 ////////////////////////////////////////////////////////////////////////////// |