diff --git a/firmware/controllers/error_handling.cpp b/firmware/controllers/error_handling.cpp index 3fad6fcd4a..0917a31a50 100644 --- a/firmware/controllers/error_handling.cpp +++ b/firmware/controllers/error_handling.cpp @@ -95,6 +95,7 @@ void addWarningCode(obd_code_e code) { engine->engineState.lastErrorCode = code; } +// todo: look into chsnprintf // todo: move to some util file & reuse for 'firmwareError' method void printToStream(MemoryStream *stream, const char *fmt, va_list ap) { stream->eos = 0; // reset @@ -199,6 +200,7 @@ void firmwareError(obd_code_e code, const char *fmt, ...) { strncpy((char*) errorMessageBuffer, fmt, sizeof(errorMessageBuffer) - 1); errorMessageBuffer[sizeof(errorMessageBuffer) - 1] = 0; // just to be sure } else { + // todo: look into chsnprintf once on Chibios 3 firmwareErrorMessageStream.eos = 0; // reset va_list ap; va_start(ap, fmt); diff --git a/firmware/util/datalogging.cpp b/firmware/util/datalogging.cpp index 822d2b62fc..08e856daa7 100644 --- a/firmware/util/datalogging.cpp +++ b/firmware/util/datalogging.cpp @@ -102,6 +102,7 @@ void appendFast(Logging *logging, const char *text) { logging->linePointer += extraLen; } +// todo: look into chsnprintf once on Chibios 3 static void vappendPrintfI(Logging *logging, const char *fmt, va_list arg) { intermediateLoggingBuffer.eos = 0; // reset efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#1b");