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

Try to add startup commands #30

Merged
merged 10 commits into from
Nov 10, 2024
Merged

Try to add startup commands #30

merged 10 commits into from
Nov 10, 2024

Conversation

hmaarrfk
Copy link
Member

@hmaarrfk hmaarrfk commented Sep 30, 2024

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.

I'm not so much of a fan of using the EEPROM, i wish i could use the program memory.

New idea:

  1. Just define a list at compile time of what you want.
  2. Try to make it easy for users to override it (trying to use __attribute__((weak)))
  3. 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.

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.
@hmaarrfk
Copy link
Member Author

https://github.com/PaulStoffregen/LittleFS

it is somewhat ideal since it gets wiped out??

@hmaarrfk
Copy link
Member Author

hmm, this is somewhat of limited use since there is little feedback that can be created without an overseeing script....

@hmaarrfk
Copy link
Member Author

I guess its kinda OK since we can use this to test EXTERNAL hardware.

@hmaarrfk hmaarrfk merged commit 2747289 into main Nov 10, 2024
5 checks passed
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);
Copy link
Contributor

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?

Copy link
Member Author

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);
Copy link
Contributor

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

Copy link
Member Author

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

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

Successfully merging this pull request may close these issues.

2 participants