This commit is contained in:
rusefi 2017-03-28 18:30:53 -04:00
parent 20ebc8d7b5
commit a338d6b7bc
2 changed files with 3 additions and 0 deletions

View File

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

View File

@ -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");