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.
Dependencies: mbed QEI HIDScope biquadFilter MODSERIAL FastPWM
Diff: motorAndSensorControl.cpp
- Revision:
- 30:161f748a1cce
- Parent:
- 28:4a5671b3d88d
- Child:
- 31:d1bd16a05148
diff -r 4a5671b3d88d -r 161f748a1cce motorAndSensorControl.cpp --- a/motorAndSensorControl.cpp Wed Oct 09 13:20:19 2019 +0000 +++ b/motorAndSensorControl.cpp Wed Oct 09 13:40:50 2019 +0000 @@ -1,7 +1,7 @@ //voltage in PWM (between -1 and 1) //period in seconds //dt the time between measurements, i.o.w. Ticker timing -/* + #include "mbed.h" #include "FastPWM.h" #include "QEI.h" @@ -28,19 +28,6 @@ const double PI = 3.14159265358979; const float countsToRadians = (2*PI)/uniqueMeasurementPoints; //Number of radians per count -struct motorReturnSub -{ - int counts; - float angle; - float velocity; -}; - -struct motorReturn -{ - motorReturnSub motor1; - motorReturnSub motor2; - motorReturnSub motor3; -} motorReturn; motorReturn motorAndEncoder(float PWM1, float PWM2, float dt) { @@ -103,4 +90,3 @@ return motorReturn } -*/ \ No newline at end of file