comparison code_part1/OSTC_code_c_part2/p2_deco.c @ 441:4826dd98514b

NEW: Decoplanner OC volumes in liters (or bars), up to 65000.
author JeanDo
date Tue, 09 Aug 2011 18:30:19 +0200
parents b9cf06de8aca
children 4c7f304de294
comparison
equal deleted inserted replaced
440:a17b85b0fbcc 441:4826dd98514b
2594 volumes[gas] = 65535.0; 2594 volumes[gas] = 65535.0;
2595 } 2595 }
2596 2596
2597 //---- convert results for the ASM interface ----------------------------- 2597 //---- convert results for the ASM interface -----------------------------
2598 for(i=0; i<NUM_GAS; ++i) 2598 for(i=0; i<NUM_GAS; ++i)
2599 if( volumes[i] > 6553.4 ) 2599 if( volumes[i] > 65534.0 )
2600 int_O_gas_volumes[i] = 65535; 2600 int_O_gas_volumes[i] = 65535;
2601 else 2601 else
2602 int_O_gas_volumes[i] = (unsigned short)(volumes[i]*10.0 + 0.5); 2602 int_O_gas_volumes[i] = (unsigned short)(volumes[i] + 0.5);
2603 } 2603 }
2604 2604
2605 ////////////////////////////////////////////////////////////////////////////// 2605 //////////////////////////////////////////////////////////////////////////////
2606 2606
2607 void deco_push_tissues_to_vault(void) 2607 void deco_push_tissues_to_vault(void)