Skip to content

Commit 35ae169

Browse files
committed
bug in naming
1 parent a1f19c9 commit 35ae169

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/motion_control/open_loop_motor_control/open_loop_position_example/open_loop_position_example.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ float target_position = 0;
1919
Commander command = Commander(Serial);
2020
void doTarget(char* cmd) { command.scalar(&target_position, cmd); }
2121
void doLimit(char* cmd) { command.scalar(&motor.voltage_limit, cmd); }
22+
void doVelocity(char* cmd) { command.scalar(&motor.velocity_limit, cmd); }
2223

2324
void setup() {
2425

@@ -50,6 +51,7 @@ void setup() {
5051
// add target command T
5152
command.add('T', doTarget, "target angle");
5253
command.add('L', doLimit, "voltage limit");
54+
command.add('V', doLimit, "movement velocity");
5355

5456
Serial.begin(115200);
5557
Serial.println("Motor ready!");

examples/motion_control/open_loop_motor_control/open_loop_velocity_example/open_loop_velocity_example.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ float target_velocity = 0;
1818

1919
// instantiate the commander
2020
Commander command = Commander(Serial);
21-
void doTarget(char* cmd) { command.scalar(&target_position, cmd); }
21+
void doTarget(char* cmd) { command.scalar(&target_velocity, cmd); }
2222
void doLimit(char* cmd) { command.scalar(&motor.voltage_limit, cmd); }
2323

2424
void setup() {
@@ -47,7 +47,7 @@ void setup() {
4747
motor.init();
4848

4949
// add target command T
50-
command.add('T', doTarget, "target angle");
50+
command.add('T', doTarget, "target velocity");
5151
command.add('L', doLimit, "voltage limit");
5252

5353
Serial.begin(115200);

0 commit comments

Comments
 (0)