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.
Dependents: DUMP_TRUCK_TEST_V1 DUMP_TRUCK_SPR2017
Revision 6:50f337affc44, committed 2017-02-14
- Comitter:
- simplyellow
- Date:
- Tue Feb 14 21:18:43 2017 +0000
- Parent:
- 5:757a984ac553
- Commit message:
- added doxygen tags for some variables
Changed in this revision
| Tracker.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/Tracker.h Tue Feb 14 21:04:20 2017 +0000
+++ b/Tracker.h Tue Feb 14 21:18:43 2017 +0000
@@ -61,27 +61,75 @@
*/
void calcDisplacement();
private:
+ /**
+ * The QEI object created with the QEI library to interpret encoder
+ * measurements.
+ */
QEI *wheel;
+ /**
+ * The interrupt pin used for channel A.
+ */
PinName chA;
+ /**
+ * The interrupt pin used for channel B.
+ */
PinName chB;
+ /**
+ * The AnalogIn pin used for the potentiometer.
+ */
AnalogIn pot;
+ /**
+ * The number of pulses recorded by the encoder.
+ */
float pulseCount;
+ /**
+ * The type of encoding (X2 or X4) used for the encoder.
+ */
float encoding;
+ /**
+ * The circumference of the front dump truck wheel.
+ */
float circumference;
+ /**
+ * Equal to 1360. This constant is used to convert pulses counted to
+ * inches traveled.
+ */
float constant;
-
+ /**
+ * The distance traveled by the dump truck.
+ */
float distance;
-
+ /**
+ * The horizontal position of the dump truck.
+ */
float x;
+ /**
+ * The vertical position of the dump truck.
+ */
float y;
-
+ /**
+ * The raw analog value of the potentiometer
+ */
float value;
+ /**
+ * The angle at which the dump truck is turning.
+ */
float turnAngle;
+ /**
+ * The angle at which the dump truck is driving straight forward.
+ */
float zeroAngle;
-
+ /**
+ * The direction at which the dump truck is turning.
+ */
int dir;
-
+ /**
+ * The distance from the front wheel to the turning axle.
+ */
float df;
+ /**
+ * The distance from the rear wheel to the turning axle.
+ */
float db;
float W;
float R;