-
Notifications
You must be signed in to change notification settings - Fork 3
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
Try to add startup commands #30
Conversation
The general idea is to use the EEPROM. We check for exactness in the version and if the version matches we then run the startup commands as if they are coming from the serial port.
https://github.com/PaulStoffregen/LittleFS it is somewhat ideal since it gets wiped out?? |
hmm, this is somewhat of limited use since there is little feedback that can be created without an overseeing script.... |
I guess its kinda OK since we can use this to test EXTERNAL hardware. |
int read_demo_command(CommandRouter *cmd, int argc, const char **argv); | ||
int disable_demo_commands(CommandRouter *cmd, int argc, const char **argv); | ||
int enable_demo_commands(CommandRouter *cmd, int argc, const char **argv); | ||
int demo_commands_available(CommandRouter *cmd, int argc, const char **argv); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hmaarrfk is this a duplicate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It seems so
break; | ||
} | ||
} | ||
parseInputBuffer(input_buffer, bytes_read, argv, argc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this right? argv is not declared anywhere in CommandRouter::processSerialStream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should be part of the class. I think
We check for exactness in the version and if the version matches we then run the startup commands as if they are coming from the serial port.
I'm not so much of a fan of using the EEPROM, i wish i could use the program memory.
New idea:
__attribute__((weak))
)Let users use this as a library.The main purpose of this is to enable the setup of "safe" pins and "startup routines" that might not need error checking. If branching is required then this cannot be used as is.