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-dev-f303 FastPWM3
Dependents: GT_MOTOR_24NM_V03 GT_MOTOR_24NM_V03_PT1000CalTemp
Diff: PositionSensor/PositionSensor.h
- Revision:
- 20:bf9ea5125d52
- Parent:
- 14:80ce59119d93
- Child:
- 22:60276ba87ac6
--- a/PositionSensor/PositionSensor.h Tue Feb 14 03:28:16 2017 +0000
+++ b/PositionSensor/PositionSensor.h Thu Mar 02 15:31:23 2017 +0000
@@ -58,4 +58,19 @@
int readAngleCmd;
};
+
+class PositionSensorSineGen: public PositionSensor{
+public:
+ PositionSensorSineGen(int CPR, float offset, int ppairs);
+ virtual float GetMechPosition();
+ virtual float GetElecPosition();
+ virtual float GetMechVelocity();
+ virtual int GetRawPosition();
+ virtual void ZeroPosition();
+private:
+ float _offset, MechPosition, MechOffset;
+ int _CPR, rotations, old_counts, _ppairs;
+ int readAngleCmd;
+
+};
#endif
\ No newline at end of file