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.
include/dynamics.hpp@29:33c5c61f1068, 2013-11-24 (annotated)
- Committer:
- calamaridudeman
- Date:
- Sun Nov 24 19:21:47 2013 +0000
- Revision:
- 29:33c5c61f1068
- Parent:
- 28:21773a6fb6df
- Child:
- 30:18724a8fb2bf
Added & everywhere (including fields!) to ensure no copying of encoders (which breaks the interrupts). All motor encoders reporting properly now
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
calamaridudeman | 22:4d85d989af08 | 1 | #include "mbed.h" |
calamaridudeman | 22:4d85d989af08 | 2 | |
calamaridudeman | 26:53b793b7a82f | 3 | #include "QEI.h" |
calamaridudeman | 26:53b793b7a82f | 4 | #include "include/motor.hpp" |
calamaridudeman | 26:53b793b7a82f | 5 | |
calamaridudeman | 22:4d85d989af08 | 6 | #ifndef DYNAMICS_HPP |
calamaridudeman | 22:4d85d989af08 | 7 | #define DYNAMICS_HPP |
calamaridudeman | 22:4d85d989af08 | 8 | |
calamaridudeman | 22:4d85d989af08 | 9 | #define l1 1 //gantry point to hip joint |
calamaridudeman | 22:4d85d989af08 | 10 | #define l2 1 //hip length |
calamaridudeman | 22:4d85d989af08 | 11 | #define l3 1 //leg length |
calamaridudeman | 22:4d85d989af08 | 12 | #define l4 1 //foot length |
calamaridudeman | 16:c21df8c0c458 | 13 | |
calamaridudeman | 22:4d85d989af08 | 14 | class Kangaroo { |
calamaridudeman | 22:4d85d989af08 | 15 | |
calamaridudeman | 22:4d85d989af08 | 16 | public: |
calamaridudeman | 28:21773a6fb6df | 17 | Kangaroo(Motor &M1, Motor &M2, QEI &e1, QEI &e2); |
calamaridudeman | 22:4d85d989af08 | 18 | void zero(); |
calamaridudeman | 22:4d85d989af08 | 19 | void start(); |
calamaridudeman | 22:4d85d989af08 | 20 | void run(); |
calamaridudeman | 22:4d85d989af08 | 21 | void stop(); |
calamaridudeman | 22:4d85d989af08 | 22 | void updatePose(); |
calamaridudeman | 28:21773a6fb6df | 23 | void testEncoders(Serial &pc); |
calamaridudeman | 25:8a34b8d6cc6e | 24 | |
calamaridudeman | 25:8a34b8d6cc6e | 25 | private: |
calamaridudeman | 29:33c5c61f1068 | 26 | QEI& enc1; |
calamaridudeman | 29:33c5c61f1068 | 27 | QEI& enc2; |
calamaridudeman | 29:33c5c61f1068 | 28 | Motor& m1; |
calamaridudeman | 29:33c5c61f1068 | 29 | Motor& m2; |
calamaridudeman | 22:4d85d989af08 | 30 | }; |
calamaridudeman | 22:4d85d989af08 | 31 | |
calamaridudeman | 22:4d85d989af08 | 32 | #endif |