Mercurial > public > hwos_code
comparison src/p2_deco.c @ 34:d7e6dfd5b498
small cleanup
author | heinrichsweikamp |
---|---|
date | Sun, 04 Aug 2013 17:52:44 +0200 |
parents | 5d4a4fb0e8a6 |
children | c61b7a4e317c |
comparison
equal
deleted
inserted
replaced
33:5d4a4fb0e8a6 | 34:d7e6dfd5b498 |
---|---|
214 static float calc_He_ratio; // Simulated (switched) helium ratio. | 214 static float calc_He_ratio; // Simulated (switched) helium ratio. |
215 static float CNS_fraction; // new in v.101 | 215 static float CNS_fraction; // new in v.101 |
216 static float float_saturation_multiplier; // new in v.101 | 216 static float float_saturation_multiplier; // new in v.101 |
217 static float float_desaturation_multiplier; // new in v.101 | 217 static float float_desaturation_multiplier; // new in v.101 |
218 static float float_deco_distance; // new in v.101 | 218 static float float_deco_distance; // new in v.101 |
219 //static char flag_in_divemode; // new in v.108 | |
220 | 219 |
221 static unsigned char deco_gas_change[NUM_GAS]; // new in v.109 | 220 static unsigned char deco_gas_change[NUM_GAS]; // new in v.109 |
222 | 221 |
223 //---- Bank 7 parameters ----------------------------------------------------- | 222 //---- Bank 7 parameters ----------------------------------------------------- |
224 #ifndef UNIX | 223 #ifndef UNIX |
896 // cycle through the 16 Bühlmann tissues for Helium | 895 // cycle through the 16 Bühlmann tissues for Helium |
897 pres_tissue_He[ci] = 0.0; | 896 pres_tissue_He[ci] = 0.0; |
898 } | 897 } |
899 | 898 |
900 clear_deco_table(); | 899 clear_deco_table(); |
901 // flag_in_divemode = 0; | |
902 char_O_deco_status = 0; | 900 char_O_deco_status = 0; |
903 char_O_nullzeit = 0; | 901 char_O_nullzeit = 0; |
904 int_O_ascenttime = 0; | 902 int_O_ascenttime = 0; |
905 char_O_gradient_factor = 0; | 903 char_O_gradient_factor = 0; |
906 char_O_relative_gradient_GF = 0; | 904 char_O_relative_gradient_GF = 0; |
1144 // | 1142 // |
1145 void calc_hauptroutine_calc_deco(void) | 1143 void calc_hauptroutine_calc_deco(void) |
1146 { | 1144 { |
1147 overlay unsigned char loop; | 1145 overlay unsigned char loop; |
1148 | 1146 |
1149 for(loop = 0; loop < 32; ++loop) | 1147 for(loop = 0; loop < 16; ++loop) |
1150 { | 1148 { |
1151 // Limit loops to 512ms, using timer 5: | 1149 // Limit loops to 512ms, using timer 5: |
1152 if( tmr5() & (512*32) ) | 1150 if( tmr5() & (512*32) ) |
1153 break; | 1151 break; |
1154 // Do not ascent while doing a gas switch ? | 1152 |
1155 if( calc_nextdecodepth() ) | 1153 if( calc_nextdecodepth() ) |
1156 { | 1154 { |
1157 if( temp_depth_limit == 0 ) | 1155 if( temp_depth_limit == 0 ) |
1158 goto Surface; | 1156 goto Surface; |
1159 | 1157 |