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();