diff 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
line wrap: on
line diff
--- a/code_part1/OSTC_code_c_part2/p2_deco.c	Tue Aug 09 18:16:03 2011 +0200
+++ b/code_part1/OSTC_code_c_part2/p2_deco.c	Tue Aug 09 18:30:19 2011 +0200
@@ -2596,10 +2596,10 @@
 
     //---- convert results for the ASM interface -----------------------------
     for(i=0; i<NUM_GAS; ++i)
-        if( volumes[i] > 6553.4 )
+        if( volumes[i] > 65534.0 )
             int_O_gas_volumes[i] = 65535;
         else
-            int_O_gas_volumes[i] = (unsigned short)(volumes[i]*10.0 + 0.5);
+            int_O_gas_volumes[i] = (unsigned short)(volumes[i] + 0.5);
 }
 
 //////////////////////////////////////////////////////////////////////////////