From 9a0cff1f6351d566f56261d9c58297fcc4721344 Mon Sep 17 00:00:00 2001 From: Andrey Klimov Date: Sun, 15 Sep 2019 08:01:50 +0300 Subject: [PATCH] cleanup --- lighthub/monitor.bat | 1 + lighthub/utils.cpp | 2 +- lighthub/utils.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 lighthub/monitor.bat diff --git a/lighthub/monitor.bat b/lighthub/monitor.bat new file mode 100644 index 0000000..895fb94 --- /dev/null +++ b/lighthub/monitor.bat @@ -0,0 +1 @@ +pio device monitor -b 115200 diff --git a/lighthub/utils.cpp b/lighthub/utils.cpp index 55f5f5e..0a63f56 100644 --- a/lighthub/utils.cpp +++ b/lighthub/utils.cpp @@ -377,7 +377,7 @@ void printIPAddress(IPAddress ipAddress) { } -char* setTopic(char* buf, int8_t buflen, topicType tt, char* suffix) +char* setTopic(char* buf, int8_t buflen, topicType tt, const char* suffix) { aJsonObject *_root = NULL; aJsonObject *_l2 = NULL; diff --git a/lighthub/utils.h b/lighthub/utils.h index 83171ef..712fd2a 100644 --- a/lighthub/utils.h +++ b/lighthub/utils.h @@ -55,7 +55,7 @@ void ReadUniqueID( uint32_t * pdwUniqueID ); int inet_aton(const char* aIPAddrString, IPAddress& aResult); char *inet_ntoa_r(IPAddress addr, char *buf, int buflen); void printIPAddress(IPAddress ipAddress); -char* setTopic(char* buf, int8_t buflen, topicType tt, char* suffix = NULL); +char* setTopic(char* buf, int8_t buflen, topicType tt, const char* suffix = NULL); void printUlongValueToStr(char *valstr, unsigned long value); void scan_i2c_bus(); void softRebootFunc();