angledfa

Dependents:   kinematics_controlv4 kinematics_control_copyfds Robot_control ShowIt

Fork of AnglePosition by Peter Knoben

Revision:
1:5c789825341d
Parent:
0:d7e19af20f93
Child:
2:20afba507e9e
diff -r d7e19af20f93 -r 5c789825341d AnglePosition.cpp
--- a/AnglePosition.cpp	Thu Oct 26 10:53:29 2017 +0000
+++ b/AnglePosition.cpp	Tue Oct 31 14:34:23 2017 +0000
@@ -8,11 +8,22 @@
     
 }
 
-float AnglePosition::gettargetposition(double input, int max_range){
+float AnglePosition::gettargetpositionpot(double input, int max_range){
     float target = input * max_range;
     return target;
 }
 
+float AnglePosition::gettargetposition(float input, int max_range){
+    float target;
+    if(input<=max_range && input>=0){
+        target = input;
+    }
+    else{
+        target = target;
+    }
+    return target;
+}
+
 
 float AnglePosition::getreferenceposition(float target, float offset) {
     float  referenceposition = target + offset;