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

New feature: Added static parser: argument into quotes. #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

hpsaturn
Copy link

@hpsaturn hpsaturn commented Jun 29, 2022

Summary

  • Basic argument parser into quotes
  • increased buffer for large inputs
  • added basic example for setup WiFi
  • tested over PlatformIO device monitor
  • tested over HomeAssistant web installer console
  • tested over Arduino IDE console

WiFi Setup example features

  • WiFi setup over M5Atom (Or any ESP32 device or similar)
  • support the spaces in Password and SSID
  • max buffer for argumentes: 256

@@ -183,6 +183,26 @@ namespace maschinendeck {

return Pair<String, String>(keyword, message);
}

static String ParseArgument(String message) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you really think, this is neccesary? the cli gets split on the first space, what is the need for the quotes?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, for example for password user-case. Is working like a charm here:
https://github.com/hpsaturn/esp32-wifi-cli/

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i looked at your example, of course, but what exactly is the benefit from the quotation marks? you could to the exact same thing without them, couldnt you?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that not, because is possible have passwords with spaces in the end. For example the next password: " xxx xxxx ". How you could handle it?

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