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 biquadFilter
robot.h@7:a80cb6b06320, 2016-11-02 (annotated)
- Committer:
- ronvbree
- Date:
- Wed Nov 02 16:29:13 2016 +0000
- Revision:
- 7:a80cb6b06320
- Parent:
- 3:1f47375270c5
- Child:
- 12:8295c02d740f
zyxvw
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ronvbree | 2:fc869e45e672 | 1 | #include "arm.h" |
ronvbree | 7:a80cb6b06320 | 2 | #include "PID_controller.h" |
ronvbree | 7:a80cb6b06320 | 3 | #include "geometry.h" |
ronvbree | 2:fc869e45e672 | 4 | |
ronvbree | 2:fc869e45e672 | 5 | class Robot { |
ronvbree | 2:fc869e45e672 | 6 | private: |
ronvbree | 2:fc869e45e672 | 7 | // Arms |
ronvbree | 2:fc869e45e672 | 8 | Arm upperArm; |
ronvbree | 2:fc869e45e672 | 9 | Arm lowerArm; |
ronvbree | 7:a80cb6b06320 | 10 | |
ronvbree | 7:a80cb6b06320 | 11 | // Safety first! |
ronvbree | 7:a80cb6b06320 | 12 | volatile bool killed; |
ronvbree | 2:fc869e45e672 | 13 | |
ronvbree | 2:fc869e45e672 | 14 | public: |
ronvbree | 7:a80cb6b06320 | 15 | // Constructor |
ronvbree | 2:fc869e45e672 | 16 | Robot(); |
ronvbree | 7:a80cb6b06320 | 17 | // Update arms |
ronvbree | 7:a80cb6b06320 | 18 | void update(); |
ronvbree | 3:1f47375270c5 | 19 | // Get upper arm length |
ronvbree | 3:1f47375270c5 | 20 | float getUpperArmLength(); |
ronvbree | 3:1f47375270c5 | 21 | // Get lower arm length |
ronvbree | 3:1f47375270c5 | 22 | float getLowerArmLength(); |
ronvbree | 2:fc869e45e672 | 23 | // Set upper arm velocity |
ronvbree | 2:fc869e45e672 | 24 | void setUpperArmVelocity(float referenceVelocity); |
ronvbree | 2:fc869e45e672 | 25 | // Set lower arm velocity |
ronvbree | 2:fc869e45e672 | 26 | void setLowerArmVelocity(float referenceVelocity); |
ronvbree | 2:fc869e45e672 | 27 | // Safety shutdown |
ronvbree | 2:fc869e45e672 | 28 | void kill(); |
ronvbree | 7:a80cb6b06320 | 29 | bool isKilled(); |
ronvbree | 2:fc869e45e672 | 30 | |
ronvbree | 2:fc869e45e672 | 31 | }; |
ronvbree | 2:fc869e45e672 | 32 | |
ronvbree | 2:fc869e45e672 | 33 | |
ronvbree | 2:fc869e45e672 | 34 |