rainbow

Dependencies:   mbed FastPWM

Revision:
69:3995ffeaa786
Parent:
68:328e1be06f5d
Child:
72:3436ce769b1e
diff -r 328e1be06f5d -r 3995ffeaa786 CAN/function_CAN.cpp
--- a/CAN/function_CAN.cpp	Tue May 12 11:25:00 2020 +0000
+++ b/CAN/function_CAN.cpp	Fri May 15 08:38:26 2020 +0000
@@ -383,7 +383,7 @@
         case CRX_SET_PISTON_AREA: {
             PISTON_AREA_A = (int16_t) (msg.data[1] | msg.data[2] << 8);
             PISTON_AREA_B = (int16_t) (msg.data[3] | msg.data[4] << 8);
-            PISTON_AREA_alpha = (double)PISTON_AREA_B/(double)PISTON_AREA_A;
+            PISTON_AREA_alpha = (double)PISTON_AREA_A/(double)PISTON_AREA_B;
             alpha3 = PISTON_AREA_alpha * PISTON_AREA_alpha*PISTON_AREA_alpha;
             
             ROM_RESET_DATA();
@@ -767,9 +767,6 @@
             input[ind] = (f_future[2*i+2] - f_future[0])/10000.0f+0.5f;
             ind = ind + 1;
         }
-
-
-
         
     } else if(address==CID_RX_REF_VALVE_POS) {
         int16_t temp_ref_valve_pos = (int16_t) (msg.data[0] | msg.data[1] << 8);