This commit is contained in:
rusefi 2019-09-21 01:49:46 -04:00
parent 3646ef4406
commit 0e59029541
1 changed files with 3 additions and 3 deletions

View File

@ -299,7 +299,7 @@ void readLogFileContent(char *buffer, short fileId, short offset, short length)
* @brief Appends specified line to the current log file * @brief Appends specified line to the current log file
*/ */
void appendToLog(const char *line) { void appendToLog(const char *line) {
UINT bytesWrited; UINT bytesWritten;
if (!fs_ready) { if (!fs_ready) {
if (!errorReported) if (!errorReported)
@ -310,8 +310,8 @@ void appendToLog(const char *line) {
UINT lineLength = strlen(line); UINT lineLength = strlen(line);
engine->engineState.totalLoggedBytes += lineLength; engine->engineState.totalLoggedBytes += lineLength;
lockSpi(SPI_NONE); lockSpi(SPI_NONE);
FRESULT err = f_write(&FDLogFile, line, lineLength, &bytesWrited); FRESULT err = f_write(&FDLogFile, line, lineLength, &bytesWritten);
if (bytesWrited < lineLength) { if (bytesWritten < lineLength) {
printError("write error or disk full", err); // error or disk full printError("write error or disk full", err); // error or disk full
} }
f_sync(&FDLogFile); f_sync(&FDLogFile);