Skip to content

Commit cfa2dc6

Browse files
committed
renamed varible to scalar because it has to be a number
1 parent d804971 commit cfa2dc6

File tree

22 files changed

+30
-24
lines changed

22 files changed

+30
-24
lines changed

examples/hardware_specific_examples/Bluepill_examples/encoder/bluepill_position_control/bluepill_position_control.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void doI(){encoder.handleIndex();}
2828
float target_angle = 0;
2929
// instantiate the commander
3030
Commander command = Commander(Serial);
31-
void doTarget(char* cmd) { command.variable(&target_angle, cmd); }
31+
void doTarget(char* cmd) { command.scalar(&target_angle, cmd); }
3232

3333

3434
void setup() {

examples/hardware_specific_examples/Bluepill_examples/magnetic_sensor/bluepill_position_control/bluepill_position_control.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ BLDCDriver3PWM driver = BLDCDriver3PWM(PB6, PB7, PB8, PB5);
3131
float target_angle = 0;
3232
// instantiate the commander
3333
Commander command = Commander(Serial);
34-
void doTarget(char* cmd) { command.variable(&target_angle, cmd); }
34+
void doTarget(char* cmd) { command.scalar(&target_angle, cmd); }
3535

3636

3737
void setup() {

examples/hardware_specific_examples/ESP32/encoder/esp32_position_control/esp32_position_control.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void doB(){encoder.handleB();}
2020
float target_angle = 0;
2121
// instantiate the commander
2222
Commander command = Commander(Serial);
23-
void doTarget(char* cmd) { command.variable(&target_angle, cmd); }
23+
void doTarget(char* cmd) { command.scalar(&target_angle, cmd); }
2424

2525
void setup() {
2626

examples/hardware_specific_examples/ESP32/magnetic_sensor/esp32_position_control/esp32_position_control.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ BLDCDriver3PWM driver = BLDCDriver3PWM(25, 26, 27, 7);
2929
float target_angle = 0;
3030
// instantiate the commander
3131
Commander command = Commander(Serial);
32-
void doTarget(char* cmd) { command.variable(&target_angle, cmd); }
32+
void doTarget(char* cmd) { command.scalar(&target_angle, cmd); }
3333

3434
void setup() {
3535

examples/hardware_specific_examples/HMBGC_example/position_control/position_control.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PciListenerImp listenerB(encoder.pinB, doB);
3838
float target_angle = 0;
3939
// instantiate the commander
4040
Commander command = Commander(Serial);
41-
void doTarget(char* cmd) { command.variable(&target_angle, cmd); }
41+
void doTarget(char* cmd) { command.scalar(&target_angle, cmd); }
4242

4343
void setup() {
4444

examples/hardware_specific_examples/HMBGC_example/voltage_control/voltage_control.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ PciListenerImp listenerB(encoder.pinB, doB);
4444
float target_voltage = 2;
4545
// instantiate the commander
4646
Commander command = Commander(Serial);
47-
void doTarget(char* cmd) { command.variable(&target_voltage, cmd); }
47+
void doTarget(char* cmd) { command.scalar(&target_voltage, cmd); }
4848

4949
void setup() {
5050

examples/motion_control/open_loop_motor_control/open_loop_position_example/open_loop_position_example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ float target_position = 0;
1717

1818
// instantiate the commander
1919
Commander command = Commander(Serial);
20-
void doTarget(char* cmd) { command.variable(&target_position, cmd); }
20+
void doTarget(char* cmd) { command.scalar(&target_position, cmd); }
2121

2222
void setup() {
2323

examples/motion_control/open_loop_motor_control/open_loop_velocity_example/open_loop_velocity_example.ino

Lines changed: 1 addition & 1 deletion
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.variable(&target_velocity, cmd); }
21+
void doTarget(char* cmd) { command.scalar(&target_velocity, cmd); }
2222

2323
void setup() {
2424

examples/motion_control/position_motion_control/encoder/angle_control/angle_control.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ PciListenerImp listenerIndex(encoder.index_pin, doIndex);
5050
float target_angle = 0;
5151
// instantiate the commander
5252
Commander command = Commander(Serial);
53-
void doTarget(char* cmd) { command.variable(&target_angle, cmd); }
53+
void doTarget(char* cmd) { command.scalar(&target_angle, cmd); }
5454

5555
void setup() {
5656

examples/motion_control/position_motion_control/hall_sensor/angle_control/angle_control.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ PciListenerImp listenC(sensor.pinC, doC);
4343
float target_angle = 0;
4444
// instantiate the commander
4545
Commander command = Commander(Serial);
46-
void doTarget(char* cmd) { command.variable(&target_angle, cmd); }
46+
void doTarget(char* cmd) { command.scalar(&target_angle, cmd); }
4747

4848
void setup() {
4949

0 commit comments

Comments
 (0)