Skip to content

Commit 34d1fca

Browse files
committed
Fix Velocity and MotionMagic control-mode bugs
1 parent d0ab47c commit 34d1fca

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

src/main/java/org/strykeforce/thirdcoast/telemetry/tct/talon/config/SelectOperatingModeCommand.java

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,7 @@ public class SelectOperatingModeCommand extends AbstractTalonConfigCommand {
2020

2121
@Override
2222
public void perform() {
23-
String[] types = {
24-
"Voltage",
25-
"Speed",
26-
"Position",
27-
"Current",
28-
"Motion Magic",
29-
"Motion Profile",
30-
"Follower",
31-
"Disabled"
32-
};
23+
String[] types = {"Percent Output", "Velocity", "Motion Magic", "Position"};
3324
terminal.writer().println();
3425
for (int i = 0; i < types.length; i++) {
3526
terminal.writer().printf("%2d - %s%n", i + 1, types[i]);
@@ -65,22 +56,10 @@ public void perform() {
6556
mode = ControlMode.Velocity;
6657
break;
6758
case 3:
68-
mode = ControlMode.Position;
69-
break;
70-
case 4:
71-
mode = ControlMode.Current;
72-
break;
73-
case 6:
7459
mode = ControlMode.MotionMagic;
7560
break;
76-
case 7:
77-
mode = ControlMode.MotionProfile;
78-
break;
79-
case 8:
80-
mode = ControlMode.Follower;
81-
break;
82-
case 9:
83-
mode = ControlMode.Disabled;
61+
case 4:
62+
mode = ControlMode.Position;
8463
break;
8564
default:
8665
continue;

0 commit comments

Comments
 (0)