Harmonize definition ins core (#628)
This commit is contained in:
committed by
Embedded Innovation
parent
e77f3c06cd
commit
c6ff9122b4
+4
-4
@@ -160,7 +160,7 @@ uint16_t hwFreeMem() {
|
||||
#ifdef MY_DEBUG
|
||||
void hwDebugPrint(const char *fmt, ... ) {
|
||||
if (MY_SERIALDEVICE) {
|
||||
char fmtBuffer[MY_DEBUG_BUFFER_SIZE];
|
||||
char fmtBuffer[MY_SERIAL_OUTPUT_SIZE];
|
||||
#ifdef MY_GATEWAY_FEATURE
|
||||
// prepend debug message to be handled correctly by controller (C_INTERNAL, I_LOG_MESSAGE)
|
||||
snprintf(fmtBuffer, sizeof(fmtBuffer), PSTR("0;255;%d;0;%d;"), C_INTERNAL, I_LOG_MESSAGE);
|
||||
@@ -170,9 +170,9 @@ void hwDebugPrint(const char *fmt, ... ) {
|
||||
va_start (args, fmt );
|
||||
#ifdef MY_GATEWAY_FEATURE
|
||||
// Truncate message if this is gateway node
|
||||
vsnprintf(fmtBuffer, 60, fmt, args);
|
||||
fmtBuffer[59] = '\n';
|
||||
fmtBuffer[60] = '\0';
|
||||
vsnprintf(fmtBuffer, sizeof(fmtBuffer), fmt, args);
|
||||
fmtBuffer[sizeof(fmtBuffer) - 2] = '\n';
|
||||
fmtBuffer[sizeof(fmtBuffer) - 1] = '\0';
|
||||
#else
|
||||
vsnprintf(fmtBuffer, sizeof(fmtBuffer), fmt, args);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user