For LIGHT

Dependencies:   mbed FastPWM

Revision:
67:cfc88fd0591e
Parent:
63:a3c7f31742c9
diff -r d385a08132d7 -r cfc88fd0591e CAN/function_CAN.cpp
--- a/CAN/function_CAN.cpp	Thu May 21 02:08:49 2020 +0000
+++ b/CAN/function_CAN.cpp	Wed Jun 03 08:46:45 2020 +0000
@@ -698,7 +698,7 @@
 
 void CAN_RX_HANDLER()
 {
-    
+    CAN_TX_PWM((int16_t) 20); //1500
     can.read(msg);
     unsigned int address = msg.id;
     if(address==CID_RX_CMD){
@@ -736,6 +736,7 @@
                 valve_pos.ref = (double)VALVE_CENTER - (double)temp_ref_valve_pos * ((double)VALVE_MIN_POS-(double)VALVE_CENTER)/10000.0f;
             }
         }
+        
     } else if(address==CID_RX_REF_PWM){
         int temp_ref_pwm = (int16_t) (msg.data[0] | msg.data[1] << 8);
         Vout.ref = (double) temp_ref_pwm;