Skip to content

Commit b084c26

Browse files
committed
Renaming debug output method from 'debugPrint' to 'print'
1 parent 75d4ecc commit b084c26

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Example:
2020
```C++
2121
int i = 1;
2222
float pi = 3.1459;
23-
ArduinoDebugUtils.debugPrint(DEBUG_LVL_VERBOSE, "i = %d, pi = %f, i, pi);
23+
Debug.print(DEBUG_LVL_VERBOSE, "i = %d, pi = %f, i, pi);
2424
```
2525
2626
If desired timestamps can be prefixed to the debug message. Timestamp output can be enabled and disabled via `timestampOn` and `timestampOff`.

examples/Arduino_Debug_Basic/Arduino_Debug_Basic.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ void setup() {
88
int i = 0;
99

1010
void loop() {
11-
Debug.debugPrint(DEBUG_LVL_INFO, "i = %d", i);
11+
Debug.print(DEBUG_LVL_INFO, "i = %d", i);
1212
i++;
1313
delay(1000);
1414
}

keywords.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ setDebugLevel KEYWORD2
1616
setDebugOutputStream KEYWORD2
1717
timestampOn KEYWORD2
1818
timestampOff KEYWORD2
19-
debugPrint KEYWORD2
19+
print KEYWORD2
2020

2121
#######################################
2222
# Constants (LITERAL1)

src/Arduino_DebugUtils.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace impl {
6464
_timestamp_on = false;
6565
}
6666

67-
void Arduino_DebugUtils::debugPrint(int const debug_level, const char * fmt, ...) {
67+
void Arduino_DebugUtils::print(int const debug_level, const char * fmt, ...) {
6868
if (debug_level >= DEBUG_LVL_ERROR &&
6969
debug_level <= DEBUG_LVL_VERBOSE &&
7070
debug_level <= _debug_level) {
@@ -76,7 +76,7 @@ namespace impl {
7676

7777
va_list args;
7878
va_start(args, fmt);
79-
vDebugPrint(fmt, args);
79+
vPrint(fmt, args);
8080
va_end(args);
8181
}
8282
}
@@ -85,7 +85,7 @@ namespace impl {
8585
PRIVATE MEMBER FUNCTIONS
8686
******************************************************************************/
8787

88-
void Arduino_DebugUtils::vDebugPrint(char const * fmt, va_list args) {
88+
void Arduino_DebugUtils::vPrint(char const * fmt, va_list args) {
8989
static size_t const MSG_BUF_SIZE = 120;
9090
char msg_buf[MSG_BUF_SIZE] = {0};
9191

src/Arduino_DebugUtils.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ namespace impl {
5959
void timestampOn();
6060
void timestampOff();
6161

62-
void debugPrint(int const debug_level, const char * fmt, ...);
62+
void print(int const debug_level, const char * fmt, ...);
6363

6464

6565
private:
@@ -68,7 +68,7 @@ namespace impl {
6868
int _debug_level;
6969
Stream * _debug_output_stream;
7070

71-
void vDebugPrint(char const * fmt, va_list args);
71+
void vPrint(char const * fmt, va_list args);
7272

7373
};
7474

0 commit comments

Comments
 (0)