From 5291f0ec54ee20410439addc3b09f91f577b2035 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 9 Apr 2017 22:26:11 -0400 Subject: [PATCH] refactoring - removing unused parameter --- firmware/console/status_loop.cpp | 8 ++++---- firmware/console/status_loop.h | 6 +++--- firmware/rusefi.cpp | 8 ++++---- win32_functional_tests/simulator/rusEfiFunctionalTest.cpp | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index b3931037b9..25d8f38745 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -436,7 +436,7 @@ extern fatal_msg_t errorMessageBuffer; /** * @brief Sends all pending data to dev console */ -void updateDevConsoleState(Engine *engine) { +void updateDevConsoleState(void) { if (!isCommandLineConsoleReady()) { return; } @@ -862,7 +862,7 @@ static void unsubscribe(int outputOrdinal) { subscription[outputOrdinal] = false; } -void initStatusLoop(Engine *engine) { +void initStatusLoop(void) { setFullLog(INITIAL_FULL_LOG); addConsoleActionI(FULL_LOGGING_KEY, setFullLog); addConsoleActionI("warn", setWarningEnabled); @@ -888,9 +888,9 @@ void initStatusLoop(Engine *engine) { #endif /* EFI_PROD_CODE */ } -void startStatusThreads(Engine *engine) { +void startStatusThreads(void) { // todo: refactoring needed, this file should probably be split into pieces - chThdCreateStatic(lcdThreadStack, sizeof(lcdThreadStack), NORMALPRIO, (tfunc_t) lcdThread, engine); + chThdCreateStatic(lcdThreadStack, sizeof(lcdThreadStack), NORMALPRIO, (tfunc_t) lcdThread, NULL); #if EFI_PROD_CODE || defined(__DOXYGEN__) initStatusLeds(); chThdCreateStatic(blinkingStack, sizeof(blinkingStack), NORMALPRIO, (tfunc_t) blinkingThread, NULL); diff --git a/firmware/console/status_loop.h b/firmware/console/status_loop.h index 0dc4f21196..b74ed85f77 100644 --- a/firmware/console/status_loop.h +++ b/firmware/console/status_loop.h @@ -10,10 +10,10 @@ #include "engine.h" -void updateDevConsoleState(Engine *engine); +void updateDevConsoleState(void); void prepareTunerStudioOutputs(void); -void startStatusThreads(Engine *engine); -void initStatusLoop(Engine *engine); +void startStatusThreads(void); +void initStatusLoop(void); void writeLogLine(void); bool getFullLog(void); void setFullLog(int value); diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 0111142bda..d97b38ff74 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -195,7 +195,7 @@ void runRusEfi(void) { */ initHardware(&sharedLogger); - initStatusLoop(engine); + initStatusLoop(); /** * Now let's initialize actual engine control logic * todo: should we initialize some? most? controllers before hardware? @@ -209,7 +209,7 @@ void runRusEfi(void) { #if EFI_ENGINE_EMULATOR || defined(__DOXYGEN__) initEngineEmulator(&sharedLogger, engine); #endif - startStatusThreads(engine); + startStatusThreads(); rememberCurrentConfiguration(); @@ -224,7 +224,7 @@ void runRusEfi(void) { #if (EFI_CLI_SUPPORT && !EFI_UART_ECHO_TEST_MODE) || defined(__DOXYGEN__) // sensor state + all pending messages for our own dev console - updateDevConsoleState(engine); + updateDevConsoleState(); #endif /* EFI_CLI_SUPPORT */ chThdSleepMilliseconds(boardConfiguration->consoleLoopPeriod); @@ -250,5 +250,5 @@ int getRusEfiVersion(void) { return 123; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE[0] * 0 != 0) return 3211; // this is here to make the compiler happy about the unused array - return 20170408; + return 20170409; } diff --git a/win32_functional_tests/simulator/rusEfiFunctionalTest.cpp b/win32_functional_tests/simulator/rusEfiFunctionalTest.cpp index 779aebd102..f9651ec08f 100644 --- a/win32_functional_tests/simulator/rusEfiFunctionalTest.cpp +++ b/win32_functional_tests/simulator/rusEfiFunctionalTest.cpp @@ -96,7 +96,7 @@ void rusEfiFunctionalTest(void) { initializeConsole(&sharedLogger); - initStatusLoop(engine); + initStatusLoop(); initDataStructures(PASS_ENGINE_PARAMETER_F); @@ -124,7 +124,7 @@ void rusEfiFunctionalTest(void) { initMainEventListener(&sharedLogger, engine); - startStatusThreads(engine); + startStatusThreads(); runChprintfTest(); @@ -135,7 +135,7 @@ void rusEfiFunctionalTest(void) { } void printPendingMessages(void) { - updateDevConsoleState(engine); + updateDevConsoleState(); waveChart.publishIfFull(); }