Skip to content

Commit 75d4ecc

Browse files
committed
Renaming module ArduinoDebugUtils to Arduino_DebugUtils and the external instance from ArduinoDebugUtils to Debug
1 parent cbc16a9 commit 75d4ecc

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
#include "ArduinoDebugUtils.h"
1+
#include "Arduino_DebugUtils.h"
22

33
void setup() {
44
Serial.begin(9600);
5-
6-
ArduinoDebugUtils.timestampOn();
5+
Debug.timestampOn();
76
}
87

98
int i = 0;
109

1110
void loop() {
12-
13-
ArduinoDebugUtils.debugPrint(DEBUG_LVL_INFO, "i = %d", i);
11+
Debug.debugPrint(DEBUG_LVL_INFO, "i = %d", i);
1412
i++;
1513
delay(1000);
1614
}

keywords.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#######################################
2-
# Syntax Coloring Map For ArduinoDebugUtils
2+
# Syntax Coloring Map For Arduino_DebugUtils
33
#######################################
44

55
#######################################
66
# Class (KEYWORD1)
77
#######################################
88

9-
ArduinoDebugUtils KEYWORD1
9+
Debug KEYWORD1
1010

1111
#######################################
1212
# Methods and Functions (KEYWORD2)

src/ArduinoDebugUtils.cpp renamed to src/Arduino_DebugUtils.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
INCLUDE
2020
******************************************************************************/
2121

22-
#include "ArduinoDebugUtils.h"
22+
#include "Arduino_DebugUtils.h"
2323

2424
/******************************************************************************
2525
NAMESPACE
@@ -38,7 +38,7 @@ namespace impl {
3838
CTOR/DTOR
3939
******************************************************************************/
4040

41-
ArduinoDebugUtils::ArduinoDebugUtils() {
41+
Arduino_DebugUtils::Arduino_DebugUtils() {
4242
timestampOff();
4343
setDebugLevel(DEFAULT_DEBUG_LEVEL);
4444
setDebugOutputStream(DEFAULT_OUTPUT_STREAM);
@@ -48,23 +48,23 @@ namespace impl {
4848
PUBLIC MEMBER FUNCTIONS
4949
******************************************************************************/
5050

51-
void ArduinoDebugUtils::setDebugLevel(int const debug_level) {
51+
void Arduino_DebugUtils::setDebugLevel(int const debug_level) {
5252
_debug_level = debug_level;
5353
}
5454

55-
void ArduinoDebugUtils::setDebugOutputStream(Stream * stream) {
55+
void Arduino_DebugUtils::setDebugOutputStream(Stream * stream) {
5656
_debug_output_stream = stream;
5757
}
5858

59-
void ArduinoDebugUtils::timestampOn() {
59+
void Arduino_DebugUtils::timestampOn() {
6060
_timestamp_on = true;
6161
}
6262

63-
void ArduinoDebugUtils::timestampOff() {
63+
void Arduino_DebugUtils::timestampOff() {
6464
_timestamp_on = false;
6565
}
6666

67-
void ArduinoDebugUtils::debugPrint(int const debug_level, const char * fmt, ...) {
67+
void Arduino_DebugUtils::debugPrint(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) {
@@ -85,7 +85,7 @@ namespace impl {
8585
PRIVATE MEMBER FUNCTIONS
8686
******************************************************************************/
8787

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

@@ -104,4 +104,4 @@ namespace impl {
104104
CLASS INSTANTIATION
105105
******************************************************************************/
106106

107-
impl::ArduinoDebugUtils ArduinoDebugUtils;
107+
impl::Arduino_DebugUtils Debug;

src/ArduinoDebugUtils.h renamed to src/Arduino_DebugUtils.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ namespace impl {
4747
CLASS DECLARATION
4848
******************************************************************************/
4949

50-
class ArduinoDebugUtils {
50+
class Arduino_DebugUtils {
5151

5252
public:
5353

54-
ArduinoDebugUtils();
54+
Arduino_DebugUtils();
5555

5656
void setDebugLevel(int const debug_level);
5757
void setDebugOutputStream(Stream * stream);
@@ -82,6 +82,6 @@ namespace impl {
8282
EXTERN
8383
******************************************************************************/
8484

85-
extern impl::ArduinoDebugUtils ArduinoDebugUtils;
85+
extern impl::Arduino_DebugUtils Debug;
8686

8787
#endif /* ARDUINO_DEBUG_UTILS_H_ */

0 commit comments

Comments
 (0)