Commit d89ddc55 authored by Ivan Dages's avatar Ivan Dages
Browse files

controller : handle virtual axes specific property names

parent 1e4c60b9
......@@ -146,7 +146,14 @@ public class Nomad3DController {
* @return The actual position
*/
public double getActualPosition() {
return Double.parseDouble(getPropertyServerValue("actual_position"));
switch (this.getName()) {
case "DAN":
return Double.parseDouble(getPropertyServerValue("actual_angle"));
case "DH":
return Double.parseDouble(getPropertyServerValue("actual_height"));
default:
return Double.parseDouble(getPropertyServerValue("actual_position"));
}
}
/**
......@@ -154,7 +161,14 @@ public class Nomad3DController {
* @return The wanted position
*/
public double getWantedPosition() {
return Double.parseDouble(getPropertyServerValue("wanted_position"));
switch (this.getName()) {
case "DAN":
return Double.parseDouble(getPropertyServerValue("wanted_angle"));
case "DH":
return Double.parseDouble(getPropertyServerValue("wanted_height"));
default:
return Double.parseDouble(getPropertyServerValue("wanted_position"));
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment