Skip to content

Commit a553db0

Browse files
committed
fix - typo in commander
1 parent 5fef0a1 commit a553db0

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

.github/workflows/ccpp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
uses: ArminJo/arduino-test-compile@v1.0.0
1212
with:
1313
libraries: PciManager
14-
examples-exclude: bluepill_position_control, esp32_position_control, esp32_i2c_dual_bus_example, stm32_i2c_dual_bus_example, magnetic_sensor_spi_alt_example, osc_esp32_3pwm, osc_esp32_fullcontrol
14+
examples-exclude: bluepill_position_control, esp32_position_control, esp32_i2c_dual_bus_example, stm32_i2c_dual_bus_example, magnetic_sensor_spi_alt_example, osc_esp32_3pwm, osc_esp32_fullcontrol, nano33IoT_velocity_control

examples/hardware_specific_examples/SAMD_examples/magnetic_sensor/nano33IoT_velocity_control.ino renamed to examples/hardware_specific_examples/SAMD_examples/nano33IoT/nano33IoT_velocity_control/nano33IoT_velocity_control.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ BLDCDriver3PWM driver = BLDCDriver3PWM(6,5,8);
2020
float target_velocity = 2.0;
2121
// instantiate the commander
2222
Commander command = Commander(SerialUSB);
23-
void doTarget(char* cmd) { command.variable(&target_velocity, cmd); }
23+
void doTarget(char* cmd) { command.scalar(&target_velocity, cmd); }
2424

2525

2626
void setup() {

keywords.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ attach KEYWORD2
8888
enableInterrupt KEYWORD2
8989
getValue KEYWORD2
9090
handle KEYWORD2
91+
scalar KEYWORD2
92+
pid KEYWORD2
93+
lpf KEYWORD2
94+
motor KEYWORD2
9195

9296

9397

src/communication/Commander.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ void Commander::run(){
3535
}
3636
}
3737

38-
void Commander::run(HardwareSerial& serial){
39-
HardwareSerial* tmp = com_port; // save the serial instance
38+
void Commander::run(Stream& serial){
39+
Stream* tmp = com_port; // save the serial instance
4040
// use the new serial instance to output if not available the one linked in constructor
4141
if(!tmp) com_port = &serial;
4242

src/communication/Commander.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ class Commander
6161
* '#' - Number of decimal places
6262
* '?' - Scan command - displays all the labels of attached nodes
6363
*
64-
* @param reader - HardwareSerial to read user input
64+
* @param reader - Stream to read user input
6565
*/
66-
void run(HardwareSerial &reader);
66+
void run(Stream &reader);
6767
/**
6868
* Function reading the string of user input and firing callbacks that have been added to the commander
6969
* once the user has requested them - when he sends the command

0 commit comments

Comments
 (0)