mbuscomm changes

This commit is contained in:
2020-10-29 21:02:04 +01:00
parent e476930526
commit 6ccf85abdb
3 changed files with 8 additions and 10 deletions

View File

@ -66,10 +66,12 @@ int logMsg(const char *format, ...) {
va_list vl;
va_start(vl, format);
int vcnt = vsnprintf(msgBuffer, MSGBUFFER_SIZE, format, vl);
int vcnt = vsnprintf(msgBuffer-2, MSGBUFFER_SIZE, format, vl);
va_end(vl);
if (vcnt < MSGBUFFER_SIZE) {
strcat(msgBuffer, "\n\r");
if (-1 == (res = ringbufferPut(&logBuffer, (uint8_t*) msgBuffer, strlen(msgBuffer)))) {
#ifndef TEST
// blink the green light or so