Commits

Trammell Hudson committed 2a687d1

xyz commands work

Comments (0)

Files changed (1)

 robot_test(
 	robot_t * const robot,
 	double x,
-	double y
+	double y,
+	double z
 )
 {
 #if 0
 	robot_move(robot, 1, cmd_1, 1);
 	robot_ik_test(robot, r, 0);
 #endif
-	robot_ik_test(robot, x, y, 0);
+	robot_ik_test(robot, x, y, z);
 	return 0;
 }
 
 	const double y1 =  200;
 	const double y2 =  300;
 
-	robot_line(robot, x1, y1, x1, y2, 250, 50000);
-	robot_line(robot, x1, y2, x2, y2, 500, 50000);
-	robot_line(robot, x2, y2, x2, y1, 250, 50000);
-	robot_line(robot, x2, y1, x1, y1, 500, 50000);
+	robot_line(robot, x1, y1, x1, y2, 250/5, 50000);
+	robot_line(robot, x1, y2, x2, y2, 500/5, 50000);
+	robot_line(robot, x2, y2, x2, y1, 250/5, 50000);
+	robot_line(robot, x2, y1, x1, y1, 500/5, 50000);
 
 	printf("box done!\n");
 
 
 		int x = 0;
 		int y = 0;
+		int z = 0;
 		char cmd[32];
 
-		if (sscanf(line, "%16[^ ] %d %d", cmd, &x, &y) != 3)
+		int rc = sscanf(line, "%16[^ ] %d %d %d", cmd, &x, &y, &z);
+		if (rc != 3 && rc != 4)
 		{
 			printf("?\n");
 			continue;
 
 		if (strcmp(cmd, "r") == 0)
 		{
-			robot_test(robot, x, y);
+			robot_test(robot, x, y, 0);
+			continue;
+		}
+
+		if (strcmp(cmd, "x") == 0)
+		{
+			robot_test(robot, x, y, z);
 			continue;
 		}
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.