Skip to content

Commit d137a6b

Browse files
committed
DEBUG flag bugfix and baud rate setting
1 parent a19225d commit d137a6b

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

platformio.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ lib_deps =
1717
bblanchon/ArduinoJson@^6.21.2
1818
adafruit/Adafruit HTU21DF Library@^1.0.5
1919
board_build.f_cpu = 160000000L
20+
monitor_speed = 115200

src/main.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,8 @@
77

88
#include "config.h"
99

10-
#if DEBUG
11-
#define D_SerialBegin(...) Serial.begin(__VA_ARGS__)
12-
#define D_print(...) Serial.print(__VA_ARGS__)
13-
#define D_write(...) Serial.write(__VA_ARGS__)
14-
#define D_println(...) Serial.println(__VA_ARGS__)
15-
#define D_printf(...) Serial.printf(__VA_ARGS__)
16-
#define D_timestamp() Serial.printf("[%lu] ", millis())
17-
#else
18-
#define D_SerialBegin(bauds)
19-
#define D_print(...)
20-
#define D_write(...)
21-
#define D_println(...)
22-
#define D_printf(...)
23-
#define D_timestamp()
24-
#endif
25-
2610
#ifndef ESPTEMP_VERSION
27-
#define ESPTEMP_VERSION "v1.1" /**< The current version of the ESPtemp firmware*/
11+
#define ESPTEMP_VERSION "v1.2" /**< The current version of the ESPtemp firmware*/
2812
#endif
2913

3014
#ifndef OTA_ENABLE_GPIO
@@ -51,6 +35,22 @@
5135
#define OTA 1 /**< Set to 1 to enable OTA waiting loop */
5236
#endif
5337

38+
#if DEBUG
39+
#define D_SerialBegin(...) Serial.begin(__VA_ARGS__)
40+
#define D_print(...) Serial.print(__VA_ARGS__)
41+
#define D_write(...) Serial.write(__VA_ARGS__)
42+
#define D_println(...) Serial.println(__VA_ARGS__)
43+
#define D_printf(...) Serial.printf(__VA_ARGS__)
44+
#define D_timestamp() Serial.printf("[%lu] ", millis())
45+
#else
46+
#define D_SerialBegin(bauds)
47+
#define D_print(...)
48+
#define D_write(...)
49+
#define D_println(...)
50+
#define D_printf(...)
51+
#define D_timestamp()
52+
#endif
53+
5454
unsigned long startMillis;
5555

5656
float humidity;

0 commit comments

Comments
 (0)