Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automation of tests/cmds? #17

Open
parallaxengineering opened this issue Jun 20, 2022 · 0 comments
Open

Automation of tests/cmds? #17

parallaxengineering opened this issue Jun 20, 2022 · 0 comments

Comments

@parallaxengineering
Copy link

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_commands_new_(&Serial, "PV_RELAY 1\r\n", sizeof("PV_RELAY 1\r\n"), "\r\n", " ");

// Outputs:
pv_relay_ctrl(&serial_commands_new_);

}

When I run it, it correctly runs the "PV_RELAY_CTRL" command, but does not pass in the argument "1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant