Skip to content

Commit

Permalink
added deprecated onMoveX methods
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick committed Oct 12, 2023
1 parent 7759ff5 commit 70eae53
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/org/myrobotlab/service/InMoov2Arm.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ public static DHRobotArm getDHRobotArm(String name, String side) {
return arm;
}

@Deprecated /* use onMove */
public void onMoveArm(HashMap<String, Double> map) {
onMove(map);
}

public void onMove(Map<String, Double> map) {
moveTo(map.get("bicep"), map.get("rotate"), map.get("shoulder"), map.get("omoplate"));
}
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/myrobotlab/service/InMoov2Hand.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -489,6 +490,11 @@ public LeapData onLeapData(LeapData data) {
return data;
}

@Deprecated /* use onMove */
public void onMoveHand(HashMap<String, Double> map) {
onMove(map);
}

public void onMove(Map<String, Double> map) {
moveTo(map.get("thumb"), map.get("index"), map.get("majeure"), map.get("majeure"), map.get("pinky"), map.get("wrist"));
}
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/myrobotlab/service/InMoov2Head.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ThreadLocalRandom;

Expand Down Expand Up @@ -218,6 +219,11 @@ public void lookAt(Double x, Double y, Double z) {
log.info("object distance is {},rothead servo {},neck servo {} ", distance, rotation, colatitude);
}

@Deprecated /* use onMoov */
public void onMoveHead(HashMap<String, Double> map) {
onMove(map);
}

public void onMove(Map<String, Double> map) {
moveTo(map.get("neck"), map.get("rothead"), map.get("eyeX"), map.get("eyeY"), map.get("jaw"), map.get("rollNeck"));
}
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/myrobotlab/service/InMoov2Torso.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import org.myrobotlab.framework.Service;
Expand Down Expand Up @@ -93,6 +94,11 @@ public void disable() {
lowStom.disable();
}

@Deprecated /* use onMove */
public void onMoveTorso(HashMap<String, Double> map) {
onMove(map);
}

public void onMove(Map<String, Double> map) {
moveTo(map.get("topStom"), map.get("midStom"), map.get("lowStom"));
}
Expand Down

0 comments on commit 70eae53

Please sign in to comment.