-
|
Hi I tried SimpleSerialShell, but the shell doesn't care about the case of the command(input string). Please share your comments with me. Sincerely LC |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
What you would need to change: See SimpleSerialShell.cpp, the The I use How to make the change: My requirements may not make sense for your application. There are several ways to customize this library for your particular needs.
I hope this helps. |
Beta Was this translation helpful? Give feedback.
What you would need to change:
See SimpleSerialShell.cpp, the
compareName()method at about line 59.The
strncasecmp(...)ignores case while comparing the entered text against the list of commands. If you replace it withstrncmp(...)commands will not ignore case -- "run", "Run" and "RUN" will each be unique commands.I use
strncasecmp()in the library because I feel it is important that an emergency command such asstopshould execute, even if I get excited and I bump the caps lock key. Any ofstop,STOPand evenstOPshould make the machine stop!How to make the change:
My requirements may not make sense for your application. There are several ways to customize this library for your par…