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:
- 35:69b24894c11d
- Parent:
- 34:51647c6c500d
- Child:
- 37:c0f352d6e8e3
--- a/PositionSensor/PositionSensor.h Wed Nov 08 15:18:18 2017 +0000
+++ b/PositionSensor/PositionSensor.h Sat Nov 18 18:41:42 2017 +0000
@@ -36,7 +36,7 @@
virtual void ZeroEncoderCountDown(void);
int _CPR, flag, rotations, _ppairs, raw;
//int state;
- float _offset, MechPosition, MechOffset, dir, test_pos, oldVel, out_old, velVec[16];
+ float _offset, MechPosition, MechOffset, dir, test_pos, oldVel, out_old, velVec[40];
int offset_lut[128];
};
@@ -53,7 +53,7 @@
virtual int GetCPR(void);
virtual void WriteLUT(int new_lut[128]);
private:
- float position, ElecPosition, ElecOffset, MechPosition, MechOffset, modPosition, oldModPosition, oldVel, velVec[16], MechVelocity, ElecVelocity, ElecVelocityFilt;
+ float position, ElecPosition, ElecOffset, MechPosition, MechOffset, modPosition, oldModPosition, oldVel, velVec[40], MechVelocity, ElecVelocity, ElecVelocityFilt;
int raw, _CPR, rotations, old_counts, _ppairs;
SPI *spi;
DigitalOut *cs;