Open parallaxengineering opened 2 years ago
Hello, I am trying to achieve command automation, where I have a list of commands and I would like one command "AUTO_TEST" to execute the rest of the commands. So I am trying to call the command functions inside my AUTO_TEST function.
I cant get it to work with command arguments.
HEre is relevant code:
void auto_test(SerialCommands* sender) { sender->GetSerial()->print("Auto Test: ");
SerialCommands serial_commandsnew(&Serial, "PV_RELAY 1\r\n", sizeof("PV_RELAY 1\r\n"), "\r\n", " ");
// Outputs: pv_relay_ctrl(&serial_commandsnew);
}
When I run it, it correctly runs the "PV_RELAY_CTRL" command, but does not pass in the argument "1"
Hello, I am trying to achieve command automation, where I have a list of commands and I would like one command "AUTO_TEST" to execute the rest of the commands. So I am trying to call the command functions inside my AUTO_TEST function.
I cant get it to work with command arguments.
HEre is relevant code:
void auto_test(SerialCommands* sender) { sender->GetSerial()->print("Auto Test: ");
SerialCommands serial_commandsnew(&Serial, "PV_RELAY 1\r\n", sizeof("PV_RELAY 1\r\n"), "\r\n", " ");
// Outputs: pv_relay_ctrl(&serial_commandsnew);
}
When I run it, it correctly runs the "PV_RELAY_CTRL" command, but does not pass in the argument "1"