comparison code_part1/OSTC_code_c_part2/p2_deco.c @ 288:9feb224f6871

Manage gas-switch marked stops in volume consumption.
author JeanDo
date Thu, 21 Apr 2011 04:54:12 +0200
parents 8514588eb6a2
children 4dbff2aa31ee
comparison
equal deleted inserted replaced
287:5f2fe81fde9f 288:9feb224f6871
2365 if( deepest_first ) 2365 if( deepest_first )
2366 { 2366 {
2367 time = char_O_deco_time[i]; 2367 time = char_O_deco_time[i];
2368 if( time == 0 ) break; // End of table: done. 2368 if( time == 0 ) break; // End of table: done.
2369 2369
2370 ascent = depth = char_O_deco_depth[i]; 2370 ascent = depth = char_O_deco_depth[i] & 0x7F;
2371 if( i < 31 ) 2371 if( i < 31 )
2372 ascent -= char_O_deco_depth[i+1]; 2372 ascent -= char_O_deco_depth[i+1] & 0x7F;
2373 } 2373 }
2374 else 2374 else
2375 { 2375 {
2376 time = char_O_deco_time[31-i]; 2376 time = char_O_deco_time[31-i];
2377 if( time == 0 ) continue; // not yet: still searh table. 2377 if( time == 0 ) continue; // not yet: still searh table.
2378 2378
2379 ascent = depth = char_O_deco_depth[31-i]; 2379 ascent = depth = char_O_deco_depth[31-i] & 0x7F;
2380 if( i < 31 ) 2380 if( i < 31 )
2381 ascent -= char_O_deco_depth[30-i]; 2381 ascent -= char_O_deco_depth[30-i] & 0x7F;
2382 } 2382 }
2383 2383
2384 // Gas switch depth ? 2384 // Gas switch depth ?
2385 for(j=0; j<5; ++j) 2385 for(j=0; j<5; ++j)
2386 { 2386 {