2014 sift / Mbed 2 deprecated TVDctrller2017_brdRev1_PandA

Dependencies:   mbed

Fork of TVDctrller2017_brdRev1_ver6 by 2014 sift

Revision:
43:5da6b1574227
Parent:
40:8e33c60c6590
Child:
44:d433bb5f77c0
diff -r 3ab09d0e3071 -r 5da6b1574227 main.cpp
--- a/main.cpp	Sat Oct 28 06:44:09 2017 +0000
+++ b/main.cpp	Thu Nov 02 01:56:46 2017 +0000
@@ -145,8 +145,8 @@
         writeCanBuff((int)(getVelocity() / LSB_MOTORSPEED),canVehicleSpeed,CANDATANUM_VEHICLESPEED);
         writeCanBuff(getSteerAngle()+127, canSteer, CANDATANUM_STEERING);
         writeCanBuff(calcRequestTorque(), canRequestTorque, CANDATANUM_REQTRQ);
-        writeCanBuff(getMotorTorque(RIGHT), canMotorTorqueR, CANDATANUM_MOTORTRQ);
-        writeCanBuff(getMotorTorque(LEFT), canMotorTorqueL, CANDATANUM_MOTORTRQ);
+        writeCanBuff(getMotorTorque(RR_MOTOR), canMotorTorqueR, CANDATANUM_MOTORTRQ);
+        writeCanBuff(getMotorTorque(RL_MOTOR), canMotorTorqueL, CANDATANUM_MOTORTRQ);
 
         do {
             if(canWriteSucceeded != 0b11111) {
@@ -162,7 +162,7 @@
                     canWriteSucceeded |= (can.write(CANMessage(CANID_LEFT_TRQ, canMotorTorqueL, CANDATANUM_MOTORTRQ)) << 4);
                 //printf("%d\r\n", canWriteSucceeded);
             }
-        } while(timer.read_ms() < CONTROL_CYCLE_MS);      //制御周期管理 関数内処理時間より短い時間の制御周期の設定は禁止
+        } while(timer.read() < CONTROL_CYCLE_S);      //制御周期管理 関数内処理時間より短い時間の制御周期の設定は禁止
         //printf("\r\n");
 
         //printf("%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t\r\n", eCounter.apsUnderVolt, eCounter.apsExceedVolt, eCounter.apsErrorTolerance, eCounter.apsStick, eCounter.brakeUnderVolt, eCounter.brakeExceedVolt, eCounter.brakeFuzzyVolt, eCounter.brakeOverRide);