Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TVDctrller2017_brdRev1_ver6 by
Diff: TVDCTRL.cpp
- Revision:
- 23:ee53d2658801
- Parent:
- 22:95c1f753ecad
- Child:
- 24:1de0291bc5eb
--- a/TVDCTRL.cpp Fri Nov 11 04:50:56 2016 +0000 +++ b/TVDCTRL.cpp Tue May 30 03:31:27 2017 +0000 @@ -312,9 +312,9 @@ if(myAbs(omega) < 0.349f) { //20deg/s disTrq = 0; } else if(myAbs(omega) <= 8.727f) { //500deg/s - disTrq = (int)((0xFFFF/45.0f * 5.0f) / (8.727f-0.349f) * (myAbs(omega) - 0.349f)); + disTrq = (int)((0xFFFF/45.0f * 10.0f) / (8.727f-0.349f) * (myAbs(omega) - 0.349f)); } else - disTrq = (int)(0xFFFF/45.0f * 5.0f); + disTrq = (int)(0xFFFF/45.0f * 10.0f); lastSteering = steering; @@ -520,7 +520,7 @@ } } - //printf("%d %d\r\n", torqueLow, torqueHigh); + //printf("%d %d %f\r\n", torqueRight, torqueLeft, getSteerAngle()); McpData.valA = calcTorqueToVoltage(torqueRight, RIGHT_MOTOR); McpData.valB = calcTorqueToVoltage(torqueLeft, LEFT_MOTOR);