Skip to content
This repository was archived by the owner on Mar 22, 2024. It is now read-only.

Commit 61dd316

Browse files
committed
Added SERIALCOMMAND_ECHO macro to enable serial echo
1 parent 9e173eb commit 61dd316

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

SerialCommand.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
/**
22
* SerialCommand - A Wiring/Arduino library to tokenize and parse commands
33
* received over a serial port.
4-
*
4+
*
55
* Copyright (C) 2012 Stefan Rado
66
* Copyright (C) 2011 Steven Cogswell <[email protected]>
77
* http://husks.wordpress.com
8-
*
8+
*
99
* Version 20120522
10-
*
10+
*
1111
* This library is free software: you can redistribute it and/or modify
1212
* it under the terms of the GNU Lesser General Public License as published by
1313
* the Free Software Foundation, either version 3 of the License, or
1414
* (at your option) any later version.
15-
*
15+
*
1616
* This library is distributed in the hope that it will be useful,
1717
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1818
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1919
* GNU Lesser General Public License for more details.
20-
*
20+
*
2121
* You should have received a copy of the GNU General Public License
2222
* along with this library. If not, see <http://www.gnu.org/licenses/>.
2323
*/
@@ -73,7 +73,7 @@ void SerialCommand::setDefaultHandler(void (*function)(const char *)) {
7373
void SerialCommand::readSerial() {
7474
while (Serial.available() > 0) {
7575
char inChar = Serial.read(); // Read single available character, there may be more waiting
76-
#ifdef SERIALCOMMAND_DEBUG
76+
#if defined SERIALCOMMAND_DEBUG || defined SERIALCOMMAND_ECHO
7777
Serial.print(inChar); // Echo back to serial stream
7878
#endif
7979

0 commit comments

Comments
 (0)