From 6d4924e85ae270d6917560403d667cb42a829543 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Fri, 15 May 2020 21:11:52 -0700 Subject: [PATCH] dead datalog code (#1439) Co-authored-by: Matthew Kennedy --- firmware/console/status_loop.cpp | 34 +++++++++--------------- firmware/controllers/system/efi_gpio.cpp | 6 ----- firmware/util/datalogging.cpp | 14 ---------- firmware/util/datalogging.h | 3 --- 4 files changed, 13 insertions(+), 44 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 668fb311e0..8a889593af 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -129,30 +129,22 @@ static int logFileLineIndex = 0; static void reportSensorF(Logging *log, const char *caption, const char *units, float value, int precision) { - bool isLogFileFormatting = true; - - if (!isLogFileFormatting) { -#if EFI_PROD_CODE || EFI_SIMULATOR - debugFloat(log, caption, value, precision); -#endif /* EFI_PROD_CODE || EFI_SIMULATOR */ - } else { #if EFI_FILE_LOGGING - if (logFileLineIndex == 0) { - append(log, caption); - append(log, TAB); - } else if (logFileLineIndex == 1) { - append(log, units); - append(log, TAB); - } else { - appendFloat(log, value, precision); - append(log, TAB); - } -#else - UNUSED(log);UNUSED(caption);UNUSED(units);UNUSED(value); - UNUSED(precision); -#endif /* EFI_FILE_LOGGING */ + if (logFileLineIndex == 0) { + append(log, caption); + append(log, TAB); + } else if (logFileLineIndex == 1) { + append(log, units); + append(log, TAB); + } else { + appendFloat(log, value, precision); + append(log, TAB); } +#else + UNUSED(log);UNUSED(caption);UNUSED(units);UNUSED(value); + UNUSED(precision); +#endif /* EFI_FILE_LOGGING */ } static void reportSensorI(Logging *log, const char *caption, const char *units, int value) { diff --git a/firmware/controllers/system/efi_gpio.cpp b/firmware/controllers/system/efi_gpio.cpp index bbae5409c0..0a9a459f3c 100644 --- a/firmware/controllers/system/efi_gpio.cpp +++ b/firmware/controllers/system/efi_gpio.cpp @@ -255,12 +255,6 @@ void NamedOutputPin::setLow() { // turn off the output setValue(false); -#if EFI_DEFAILED_LOGGING -// systime_t after = getTimeNowUs(); -// debugInt(&signal->logging, "a_time", after - signal->hi_time); -// scheduleLogging(&signal->logging); -#endif /* EFI_DEFAILED_LOGGING */ - #if EFI_ENGINE_SNIFFER addEngineSnifferEvent(getShortName(), PROTOCOL_ES_DOWN); #endif /* EFI_ENGINE_SNIFFER */ diff --git a/firmware/util/datalogging.cpp b/firmware/util/datalogging.cpp index 8e942bfff8..e7fdf7333c 100644 --- a/firmware/util/datalogging.cpp +++ b/firmware/util/datalogging.cpp @@ -153,12 +153,6 @@ int isInitialized(Logging *logging) { return logging->isInitialized; } -void debugInt(Logging *logging, const char *caption, int value) { - append(logging, caption); - append(logging, DELIMETER); - appendPrintf(logging, "%d%s", value, DELIMETER); -} - void appendFloat(Logging *logging, float value, int precision) { /** * todo: #1 this implementation is less than perfect @@ -190,14 +184,6 @@ void appendFloat(Logging *logging, float value, int precision) { } } -void debugFloat(Logging *logging, const char *caption, float value, int precision) { - append(logging, caption); - append(logging, DELIMETER); - - appendFloat(logging, value, precision); - append(logging, DELIMETER); -} - static char header[16]; /** diff --git a/firmware/util/datalogging.h b/firmware/util/datalogging.h index ac200fe449..8765c93c19 100644 --- a/firmware/util/datalogging.h +++ b/firmware/util/datalogging.h @@ -51,9 +51,6 @@ int isInitialized(Logging *logging); void initLoggingExt(Logging *logging, const char *name, char *buffer, int bufferSize); -void debugInt(Logging *logging, const char *caption, int value); - -void debugFloat(Logging *logging, const char *text, float value, int precision); void appendFloat(Logging *logging, float value, int precision); void resetLogging(Logging *logging);