ppedro74/Arduino-SerialCommands

4xUART (DUE Board) 7 Commands --> unrecognized Command

Opened this issue · 2 comments

Different number of commands in the URAT instances --> unrecognized Command
Every single UART instance runs error-free.

I've already invested a lot of hours to pinpoint the problem

I suspect it has something to do with the pointers. (cmd / SerialCommand)
I think the cmds mix up in the different instances

The group is defined similarly for all 4 UARTs (serial_commands_1_ serial_commands_2_ serial_commands_3_)
with partially identical, additional or missing commands.

void setup() {
Serial.begin(115200); // USB
serial_commands_0_.AddCommand(&cmd_motors_); // M = Motoren
serial_commands_0_.AddCommand(&cmd_Stopp_); // S = Stopp
serial_commands_0_.AddCommand(&cmd_heben_); // H = Heben
serial_commands_0_.AddCommand(&cmd_licht_); // L = Licht
serial_commands_0_.AddCommand(&cmd_abstand_); // A = Abstand !!!
serial_commands_0_.AddCommand(&cmd_danger_); // G = Gefahrenstufe !!!
serial_commands_0_.AddCommand(&cmd_watchdog_boards_); // W = Watchdog Empfang
serial_commands_0_.SetDefaultHandler(cmd_unrecognized); // Unbekannte Befehle von UART 0 USB

Many thanks to the programmer for a job well done. `:-)```

main.zip
Here is a sample code simplified to the essentials.

M --> work
S --> work
H --> work
L --> work
Unrecognized command [A]
Unrecognized command [G]
W --> work

Freue mich über eine Reaktion des Entwicklers

It is a pity that this library is no longer maintained.