From fc5dd7d0c367d040cfc8106d7f9fd53be447ee2d Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 13 Jun 2020 22:46:10 -0400 Subject: [PATCH] a few unneeded properties --- firmware/console/status_loop.cpp | 3 ++- firmware/controllers/algo/engine_configuration.cpp | 4 ---- firmware/controllers/engine_controller.cpp | 5 ++--- firmware/integration/rusefi_config.txt | 6 +----- firmware/rusefi.cpp | 3 ++- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index b47ff6ed0d..ea5b0fc19d 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -228,6 +228,7 @@ static systime_t timeOfPreviousReport = (systime_t) -1; * @brief Sends all pending data to rusEfi console * * This method is periodically invoked by the main loop + * todo: is this mostly dead code? */ void updateDevConsoleState(void) { // todo: make SWO work @@ -443,7 +444,7 @@ public: private: void PeriodicTask(efitick_t nowNt) override { UNUSED(nowNt); - setPeriod(NOT_TOO_OFTEN(10 /* ms */, engineConfiguration->lcdThreadPeriodMs)); + setPeriod(NOT_TOO_OFTEN(10 /* ms */, 300)); if (engineConfiguration->useLcdScreen) { #if EFI_HD44780_LCD updateHD44780lcd(); diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index e36186e99a..afcb054161 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -1062,10 +1062,6 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engineConfiguration->mapErrorDetectionTooLow = 5; engineConfiguration->mapErrorDetectionTooHigh = 250; - engineConfiguration->idleThreadPeriodMs = 100; - engineConfiguration->consoleLoopPeriodMs = 200; - engineConfiguration->lcdThreadPeriodMs = 300; - engineConfiguration->generalPeriodicThreadPeriodMs = 50; engineConfiguration->useLcdScreen = true; engineConfiguration->hip9011Gain = 1; diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 595b8929f5..905b9c496a 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -152,9 +152,8 @@ class PeriodicSlowController : public PeriodicTimerController { } int getPeriodMs() override { - // we need at least protection from zero value while resetting configuration - int periodMs = maxI(50, CONFIG(generalPeriodicThreadPeriodMs)); - return periodMs; + // no reason to have this configurable, looks like everyone is happy with 20Hz + return 50; } }; diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 2f1261254f..962712e090 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -669,11 +669,7 @@ custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:7], "Off", "Slow", "Fas pin_input_mode_e throttlePedalUpPinMode; uint8_t unused711; - int idleThreadPeriodMs; - int consoleLoopPeriodMs; - int lcdThreadPeriodMs; - - int generalPeriodicThreadPeriodMs; + int[4] unusedAt712; uint32_t tunerStudioSerialSpeed;Secondary TTL channel baud rate;"BPs", 1, 0, 0,1000000, 0 diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 84db2f1395..46efe9eb24 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -244,10 +244,11 @@ void runRusEfi(void) { #if EFI_CLI_SUPPORT && !EFI_UART_ECHO_TEST_MODE // sensor state + all pending messages for our own rusEfi console + // todo: is this mostly dead code? updateDevConsoleState(); #endif /* EFI_CLI_SUPPORT */ - chThdSleepMilliseconds(CONFIG(consoleLoopPeriodMs)); + chThdSleepMilliseconds(200); } }