Mercurial > public > mk2
diff code_part1/OSTC_code_c_part2/p2_deco.c @ 278:17aab4ca0547
BUGFIX CCR decoplan fails (bug bb42).
Make decoplaning faster (just update tissue during bottomtime).
Animate ascent depth during decoplaning.
author | JeanDo |
---|---|
date | Tue, 19 Apr 2011 02:26:41 +0200 |
parents | 02303915c199 |
children | 8514588eb6a2 |
line wrap: on
line diff
--- a/code_part1/OSTC_code_c_part2/p2_deco.c Mon Apr 18 10:23:22 2011 +0200 +++ b/code_part1/OSTC_code_c_part2/p2_deco.c Tue Apr 19 02:26:41 2011 +0200 @@ -925,6 +925,16 @@ } ////////////////////////////////////////////////////////////////////////////// +// Called every 1 min during decoplanning. +// Update tissues for 1 min. +// +void deco_calc_tissue(void) +{ + RESET_C_STACK + calc_hauptroutine_update_tissues(); +} + +////////////////////////////////////////////////////////////////////////////// void deco_calc_wo_deco_step_1_min(void) { @@ -1240,7 +1250,7 @@ copy_deco_table(); int_O_ascenttime = 0; // Reset DTR. char_O_nullzeit = 0; // Reset bottom time. - char_O_deco_status = 0; // Calc bottom-time/nullzeit next iteration. + char_O_deco_status = 0; // Calc bottom-time/nullzeit next iteration. // Values that should be reset just once for the full real dive. // This is used to record the lowest stop for the whole dive, @@ -1457,6 +1467,7 @@ copy_deco_table(); calc_ascenttime(); char_O_deco_status = 0; // calc nullzeit next time. + char_O_deco_last_stop = 0; // Surface reached. return; } } @@ -1473,6 +1484,7 @@ // Surface not reached, need more stops... char_O_deco_status = 1; // calc more stops next time. + char_O_deco_last_stop = temp_depth_limit; // Reached depth. } //////////////////////////////////////////////////////////////////////////////