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
Diff: robot.cpp
- Revision:
- 3:1f47375270c5
- Parent:
- 2:fc869e45e672
- Child:
- 7:a80cb6b06320
--- a/robot.cpp Wed Nov 02 08:51:12 2016 +0000
+++ b/robot.cpp Wed Nov 02 09:10:43 2016 +0000
@@ -42,7 +42,6 @@
void Robot::doTick() {
upperArm.update();
lowerArm.update();
-
}
void Robot::moveY(float dy) {
@@ -60,6 +59,14 @@
upperArm.setVelocity(referenceVelocity);
}
+float Robot::getUpperArmLength(){
+ return upperArm.getLength();
+}
+
+float Robot::getLowerArmLength(){
+ return lowerArm.getLength();
+}
+
// Set lower arm velocity (rad/s) (multiplied with -1 because for some reason the directions are different for the two arms)
void Robot::setLowerArmVelocity(float referenceVelocity) {
lowerArm.setVelocity(-1 * referenceVelocity);