# HG changeset patch # User JeanDo # Date 1324138721 -3600 # Node ID ba1fb2e23f46ee5e6df5c9eb16ddbb7dac766c4e # Parent a2019f310176a6119d0c54038fb92e641940008c BUGFIX NDL deco blocking stops during ascent when less than 10' TTS. diff -r a2019f310176 -r ba1fb2e23f46 code_part1/OSTC_code_c_part2/p2_deco.c --- a/code_part1/OSTC_code_c_part2/p2_deco.c Sat Dec 17 11:14:01 2011 +0100 +++ b/code_part1/OSTC_code_c_part2/p2_deco.c Sat Dec 17 17:18:41 2011 +0100 @@ -1058,12 +1058,15 @@ gas_switch_set(); // setup calc_ratio's calc_nullzeit(); - /* if( char_O_nullzeit > 0 ) // Some NDL time left ? - char_O_deco_status = 0; // YES: recalc ndl next time. - else - char_O_deco_status = 2; // NO: calc ascent next time. - */ - char_O_deco_status = 2; // calc ascent next time. + if( char_O_nullzeit > 0 ) // Some NDL time left ? + { + char_O_deco_status = 0; // YES: recalc ndl next time. + clear_deco_table(); // Also clear stops ! + copy_deco_table(); + char_O_deco_last_stop = 0; // And last stop (OSTC menu anim) + } + else + char_O_deco_status = 2; // NO: calc ascent next time. break; case 2: //---- Simulate ascent to first stop ----------------------------- @@ -1288,7 +1291,7 @@ sim_tissue(1); // Simulate compartiments for 1 minute. } - // Surface not reached, need more stops... + // Surface not reached, need more stops... for menu animation. char_O_deco_last_stop = temp_depth_limit; // Reached depth. } @@ -1508,8 +1511,8 @@ // dTN2 -= exp( ... ascent time ... ppN2...) // dTHe -= exp( ... ascent time ... ppHe...) - //---- Still ok to surface after 1 or 10 minutes ? - if( t + dTN2 + dTHe <= M0 ) + //---- Ok now, and still ok to surface after 1 or 10 minutes ? + if( (t <= M0) && (t + dTN2 + dTHe <= M0) ) { tN2 += dTN2; // YES: apply gas loadings, tHe += dTHe; diff -r a2019f310176 -r ba1fb2e23f46 code_part1/OSTC_code_c_part2/p2_deco.o Binary file code_part1/OSTC_code_c_part2/p2_deco.o has changed