Skip to content

Conversation

@sawtelles
Copy link

Hi, Hope I'm doing this right. I'm new to this.

I've been using cmdArduino in many projects (very useful!) and I've made some changes to my copy to support some things I needed. They might be of general use, so I'd like to submit them for consideration.

Again, hope I'm doing this right, please let me know if I'm not.

CmdArduino-master_withSWSchanges.zip

joshmarinacci and others added 9 commits July 19, 2014 11:28
New versions of the Arduino IDE throw a compiler warning
if you pass a const char * aka string literal ("hello world") to
a char * function argument. This commit changes the prototype to
take a const char *.
The examples did not compile since cmdInit was changed to
accept a Stream reference instead of a serial port speed. This
change fixes all examples. It also adds a new function
cmdGetStream(). This allows command functions to get access to
the same stream that is used by the command interpreter itself.
If you change a sketch from using the serial port to using a
different stream, you can simply change the initialisation of the
cmd module and all command functions can remain unchanged.

The commit also contains a fix to ignore \n characters as they
are usually not part of a valid command. This way, the code works
with all terminals, no matter if they send \r or \r\n line endings.
Remove compiler warning, fix examples
Fixed compilation issue for Arm-based systems (at least Arduino NANO 33 IOT)
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.

4 participants