Skip to content
Discussion options

You must be logged in to vote

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 with strncmp(...) 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 as stop should execute, even if I get excited and I bump the caps lock key. Any of stop, STOP and even stOP should 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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lc2047
Comment options

Answer selected by lc2047
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants