From c71ba44d6177deb237ee45c30ca92b67a0e434a0 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Tue, 21 Feb 2023 02:07:25 -0800 Subject: [PATCH] clean up pretty useless console commands --- firmware/config/engines/dodge_neon.cpp | 3 - firmware/config/engines/mazda_miata.cpp | 1 - .../actuators/alternator_controller.cpp | 18 -- .../actuators/alternator_controller.h | 5 - .../actuators/electronic_throttle.cpp | 67 ---- .../actuators/electronic_throttle.h | 4 - firmware/controllers/actuators/idle_thread.h | 3 - .../controllers/actuators/idle_thread_io.cpp | 18 -- .../controllers/algo/accel_enrichment.cpp | 13 - firmware/controllers/sensors/tps.cpp | 4 - firmware/controllers/settings.cpp | 301 +----------------- firmware/controllers/settings.h | 2 - firmware/hw_layer/hardware.cpp | 7 - firmware/hw_layer/hardware.h | 2 - firmware/hw_layer/sensors/max31855.cpp | 2 - firmware/integration/rusefi_config.txt | 4 +- .../java/com/rusefi/ui/RecentCommands.java | 12 - .../main/resources/com/rusefi/alternator.jpg | Bin 14632 -> 0 bytes 18 files changed, 3 insertions(+), 463 deletions(-) delete mode 100644 java_console/ui/src/main/resources/com/rusefi/alternator.jpg diff --git a/firmware/config/engines/dodge_neon.cpp b/firmware/config/engines/dodge_neon.cpp index 27f09afa2b..d9a2def9ec 100644 --- a/firmware/config/engines/dodge_neon.cpp +++ b/firmware/config/engines/dodge_neon.cpp @@ -42,7 +42,6 @@ void setDodgeNeon1995EngineConfiguration() { setWholeTimingTable_d(12); - // set cranking_injection_mode 0 engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS; // set injection_mode 1 engineConfiguration->injectionMode = IM_SEQUENTIAL; @@ -89,7 +88,6 @@ void setDodgeNeon1995EngineConfiguration() { engineConfiguration->mapErrorDetectionTooHigh = 120; - // set injection_pin_mode 0 engineConfiguration->injectionPinMode = OM_DEFAULT; // Frankenstein: high side #1: PE8 @@ -99,7 +97,6 @@ void setDodgeNeon1995EngineConfiguration() { engineConfiguration->ignitionPins[1] = Gpio::Unassigned; engineConfiguration->ignitionPins[2] = Gpio::E10; // // Frankenstein: high side #2 - // set ignition_pin_mode 0 engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->clt.config = {0, 30, 100, 32500, 7550, 700, 2700}; diff --git a/firmware/config/engines/mazda_miata.cpp b/firmware/config/engines/mazda_miata.cpp index 08cfda8fdd..cce81c5a74 100644 --- a/firmware/config/engines/mazda_miata.cpp +++ b/firmware/config/engines/mazda_miata.cpp @@ -114,7 +114,6 @@ void common079721_2351() { engineConfiguration->fuelPumpPin = Gpio::Unassigned; // fuel pump is not controlled by ECU on this engine - // set cranking_injection_mode 0 engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS; // set injection_mode 2 engineConfiguration->injectionMode = IM_BATCH; diff --git a/firmware/controllers/actuators/alternator_controller.cpp b/firmware/controllers/actuators/alternator_controller.cpp index f3d26b4fc4..fc46580ad5 100644 --- a/firmware/controllers/actuators/alternator_controller.cpp +++ b/firmware/controllers/actuators/alternator_controller.cpp @@ -81,29 +81,11 @@ void AlternatorController::onFastCallback() { } } -void showAltInfo(void) { - efiPrintf("alt=%s @%s t=%dms", boolToString(engineConfiguration->isAlternatorControlEnabled), - hwPortname(engineConfiguration->alternatorControlPin), - engineConfiguration->alternatorControl.periodMs); - efiPrintf("p=%.2f/i=%.2f/d=%.2f offset=%.2f", engineConfiguration->alternatorControl.pFactor, - 0, 0, engineConfiguration->alternatorControl.offset); // todo: i & d - efiPrintf("vbatt=%.2f/duty=%.2f/target=%.2f", Sensor::getOrZero(SensorType::BatteryVoltage), currentAltDuty, - engineConfiguration->targetVBatt); -} - -void setAltPFactor(float p) { - engineConfiguration->alternatorControl.pFactor = p; - efiPrintf("setAltPid: %.2f", p); - pidReset(); - showAltInfo(); -} - void onConfigurationChangeAlternatorCallback(engine_configuration_s *previousConfiguration) { shouldResetPid = !alternatorPid.isSame(&previousConfiguration->alternatorControl); } void initAlternatorCtrl() { - addConsoleAction("altinfo", showAltInfo); if (!isBrainPinValid(engineConfiguration->alternatorControlPin)) return; diff --git a/firmware/controllers/actuators/alternator_controller.h b/firmware/controllers/actuators/alternator_controller.h index 8bc8c7f027..8e3163ea2e 100644 --- a/firmware/controllers/actuators/alternator_controller.h +++ b/firmware/controllers/actuators/alternator_controller.h @@ -12,11 +12,6 @@ void initAlternatorCtrl(); -void setAltPFactor(float p); -void setAltIFactor(float p); -void setAltDFactor(float p); -void showAltInfo(void); - class AlternatorController : public EngineModule { public: void onFastCallback() override; diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index cc99c8acd2..69b8ad1e91 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -30,11 +30,6 @@ * set debug_mode 17 * for PID outputs * - * set etb_p X - * set etb_i X - * set etb_d X - * set etb_o X - * * set_etb_duty X * * http://rusefi.com/forum/viewtopic.php?f=5&t=592 @@ -783,31 +778,6 @@ static DcThread dcThread CCM_OPTIONAL; #endif // EFI_UNIT_TEST -static void showEtbInfo() { -#if EFI_PROD_CODE - efiPrintf("etbAutoTune=%d", engine->etbAutoTune); - - efiPrintf("TPS=%.2f", Sensor::getOrZero(SensorType::Tps1)); - - efiPrintf("ETB1 duty=%.2f freq=%d", - engine->outputChannels.etb1DutyCycle, - engineConfiguration->etbFreq); - - efiPrintf("ETB freq=%d", - engineConfiguration->etbFreq); - - for (int i = 0; i < ETB_COUNT; i++) { - efiPrintf("ETB%d", i); - efiPrintf(" dir1=%s", hwPortname(engineConfiguration->etbIo[i].directionPin1)); - efiPrintf(" dir2=%s", hwPortname(engineConfiguration->etbIo[i].directionPin2)); - efiPrintf(" control=%s", hwPortname(engineConfiguration->etbIo[i].controlPin)); - efiPrintf(" disable=%s", hwPortname(engineConfiguration->etbIo[i].disablePin)); - showDcMotorInfo(i); - } - -#endif /* EFI_PROD_CODE */ -} - void etbPidReset() { for (int i = 0 ; i < ETB_COUNT; i++) { if (auto controller = engine->etbControllers[i]) { @@ -858,42 +828,6 @@ static void etbReset() { } #endif /* EFI_PROD_CODE */ -/** - * set etb_p X - */ -void setEtbPFactor(float value) { - engineConfiguration->etb.pFactor = value; - etbPidReset(); - showEtbInfo(); -} - -/** - * set etb_i X - */ -void setEtbIFactor(float value) { - engineConfiguration->etb.iFactor = value; - etbPidReset(); - showEtbInfo(); -} - -/** - * set etb_d X - */ -void setEtbDFactor(float value) { - engineConfiguration->etb.dFactor = value; - etbPidReset(); - showEtbInfo(); -} - -/** - * set etb_o X - */ -void setEtbOffset(int value) { - engineConfiguration->etb.offset = value; - etbPidReset(); - showEtbInfo(); -} - void etbAutocal(size_t throttleIndex) { if (throttleIndex >= ETB_COUNT) { return; @@ -1076,7 +1010,6 @@ void initElectronicThrottle() { } #if EFI_PROD_CODE - addConsoleAction("etbinfo", showEtbInfo); addConsoleAction("etbreset", etbReset); addConsoleActionI("etb_freq", setEtbFrequency); diff --git a/firmware/controllers/actuators/electronic_throttle.h b/firmware/controllers/actuators/electronic_throttle.h index 5c5708e707..bd28cc75c9 100644 --- a/firmware/controllers/actuators/electronic_throttle.h +++ b/firmware/controllers/actuators/electronic_throttle.h @@ -28,10 +28,6 @@ void setBoschVAGETB(); void setDefaultEtbBiasCurve(); void setDefaultEtbParameters(); void setBoschVNH2SP30Curve(); -void setEtbPFactor(float value); -void setEtbIFactor(float value); -void setEtbDFactor(float value); -void setEtbOffset(int value); void setThrottleDutyCycle(percent_t level); void onConfigurationChangeElectronicThrottleCallback(engine_configuration_s *previousConfiguration); void unregisterEtbPins(); diff --git a/firmware/controllers/actuators/idle_thread.h b/firmware/controllers/actuators/idle_thread.h index 44fbbd9749..c42dde1d64 100644 --- a/firmware/controllers/actuators/idle_thread.h +++ b/firmware/controllers/actuators/idle_thread.h @@ -97,9 +97,6 @@ void setManualIdleValvePosition(int positionPercent); void startIdleThread(); void setDefaultIdleParameters(); void startIdleBench(void); -void setIdlePFactor(float value); -void setIdleIFactor(float value); -void setIdleDFactor(float value); void setIdleMode(idle_mode_e value); void setTargetIdleRpm(int value); void startPedalPins(); diff --git a/firmware/controllers/actuators/idle_thread_io.cpp b/firmware/controllers/actuators/idle_thread_io.cpp index f0c5731ae6..a5c29cbef9 100644 --- a/firmware/controllers/actuators/idle_thread_io.cpp +++ b/firmware/controllers/actuators/idle_thread_io.cpp @@ -146,24 +146,6 @@ void setTargetIdleRpm(int value) { showIdleInfo(); } -void setIdlePFactor(float value) { - engineConfiguration->idleRpmPid.pFactor = value; - applyPidSettings(); - showIdleInfo(); -} - -void setIdleIFactor(float value) { - engineConfiguration->idleRpmPid.iFactor = value; - applyPidSettings(); - showIdleInfo(); -} - -void setIdleDFactor(float value) { - engineConfiguration->idleRpmPid.dFactor = value; - applyPidSettings(); - showIdleInfo(); -} - /** * Idle test would activate the solenoid for three seconds */ diff --git a/firmware/controllers/algo/accel_enrichment.cpp b/firmware/controllers/algo/accel_enrichment.cpp index 03c3d7f76b..aaa357d506 100644 --- a/firmware/controllers/algo/accel_enrichment.cpp +++ b/firmware/controllers/algo/accel_enrichment.cpp @@ -199,26 +199,16 @@ TpsAccelEnrichment::TpsAccelEnrichment() { #if ! EFI_UNIT_TEST -static void accelInfo() { -// efiPrintf("TPS accel length=%d", tpsInstance.cb.getSize()); - efiPrintf("TPS accel th=%.2f/mult=%.2f", engineConfiguration->tpsAccelEnrichmentThreshold, -1); - - efiPrintf("beta=%.2f/tau=%.2f", engineConfiguration->wwaeBeta, engineConfiguration->wwaeTau); -} - void setTpsAccelThr(float value) { engineConfiguration->tpsAccelEnrichmentThreshold = value; - accelInfo(); } void setTpsDecelThr(float value) { engineConfiguration->tpsDecelEnleanmentThreshold = value; - accelInfo(); } void setTpsDecelMult(float value) { engineConfiguration->tpsDecelEnleanmentMultiplier = value; - accelInfo(); } void setTpsAccelLen(int length) { @@ -227,7 +217,6 @@ void setTpsAccelLen(int length) { return; } engine->tpsAccelEnrichment.setLength(length); - accelInfo(); } void updateAccelParameters() { @@ -243,8 +232,6 @@ void initAccelEnrichment() { #if ! EFI_UNIT_TEST - addConsoleAction("accelinfo", accelInfo); - updateAccelParameters(); #endif /* ! EFI_UNIT_TEST */ } diff --git a/firmware/controllers/sensors/tps.cpp b/firmware/controllers/sensors/tps.cpp index 4764ff2c84..cbd324541b 100644 --- a/firmware/controllers/sensors/tps.cpp +++ b/firmware/controllers/sensors/tps.cpp @@ -5,17 +5,13 @@ void grabTPSIsClosed() { #if EFI_PROD_CODE - printTPSInfo(); engineConfiguration->tpsMin = convertVoltageTo10bitADC(Sensor::getRaw(SensorType::Tps1)); - printTPSInfo(); #endif /* EFI_PROD_CODE */ } void grabTPSIsWideOpen() { #if EFI_PROD_CODE - printTPSInfo(); engineConfiguration->tpsMax = convertVoltageTo10bitADC(Sensor::getRaw(SensorType::Tps1)); - printTPSInfo(); #endif /* EFI_PROD_CODE */ } diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 9187d9fcab..3358c52b9e 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -13,8 +13,6 @@ #include "eficonsole.h" #include "trigger_decoder.h" #include "console_io.h" -#include "idle_thread.h" -#include "alternator_controller.h" #include "trigger_emulator_algo.h" #include "value_lookup.h" #if EFI_RTC @@ -41,118 +39,8 @@ extern int waveChartUsedSize; extern WaveChart waveChart; #endif // EFI_ENGINE_SNIFFER -void printSpiState(const engine_configuration_s *engineConfiguration) { - efiPrintf("spi 1=%s/2=%s/3=%s/4=%s", - boolToString(engineConfiguration->is_enabled_spi_1), - boolToString(engineConfiguration->is_enabled_spi_2), - boolToString(engineConfiguration->is_enabled_spi_3), - boolToString(engineConfiguration->is_enabled_spi_4)); -} - -static void printOutputs(const engine_configuration_s *engineConfiguration) { - efiPrintf("injectionPins: mode %s", getPin_output_mode_e(engineConfiguration->injectionPinMode)); - for (size_t i = 0; i < engineConfiguration->specs.cylindersCount; i++) { - brain_pin_e brainPin = engineConfiguration->injectionPins[i]; - efiPrintf("injection #%d @ %s", (1 + i), hwPortname(brainPin)); - } - - efiPrintf("ignitionPins: mode %s", getPin_output_mode_e(engineConfiguration->ignitionPinMode)); - for (size_t i = 0; i < engineConfiguration->specs.cylindersCount; i++) { - brain_pin_e brainPin = engineConfiguration->ignitionPins[i]; - efiPrintf("ignition #%d @ %s", (1 + i), hwPortname(brainPin)); - } - - efiPrintf("idlePin: mode %s @ %s freq=%d", getPin_output_mode_e(engineConfiguration->idle.solenoidPinMode), - hwPortname(engineConfiguration->idle.solenoidPin), engineConfiguration->idle.solenoidFrequency); - efiPrintf("malfunctionIndicator: %s mode=%s", hwPortname(engineConfiguration->malfunctionIndicatorPin), - getPin_output_mode_e(engineConfiguration->malfunctionIndicatorPinMode)); - - efiPrintf("fuelPumpPin: mode %s @ %s", getPin_output_mode_e(engineConfiguration->fuelPumpPinMode), - hwPortname(engineConfiguration->fuelPumpPin)); - - efiPrintf("fanPin: mode %s @ %s", getPin_output_mode_e(engineConfiguration->fanPinMode), - hwPortname(engineConfiguration->fanPin)); - - efiPrintf("mainRelay: mode %s @ %s", getPin_output_mode_e(engineConfiguration->mainRelayPinMode), - hwPortname(engineConfiguration->mainRelayPin)); - - efiPrintf("starterRelay: mode %s @ %s", getPin_output_mode_e(engineConfiguration->starterRelayDisablePinMode), - hwPortname(engineConfiguration->starterRelayDisablePin)); - - efiPrintf("alternator field: mode %s @ %s", - getPin_output_mode_e(engineConfiguration->alternatorControlPinMode), - hwPortname(engineConfiguration->alternatorControlPin)); -} - -/** - * @brief Prints current engine configuration to human-readable console. - */ -void printConfiguration(const engine_configuration_s *engineConfiguration) { - - efiPrintf("Template %s/%d trigger %s/%s/%d", getEngine_type_e(engineConfiguration->engineType), - engineConfiguration->engineType, getTrigger_type_e(engineConfiguration->trigger.type), - getEngine_load_mode_e(engineConfiguration->fuelAlgorithm), engineConfiguration->fuelAlgorithm); - - - efiPrintf("configurationVersion=%d", engine->getGlobalConfigurationVersion()); - - efiPrintf("rpmHardLimit: %d/operationMode=%d", engineConfiguration->rpmHardLimit, - getEngineRotationState()->getOperationMode()); - - efiPrintf("globalTriggerAngleOffset=%.2f", engineConfiguration->globalTriggerAngleOffset); - - efiPrintf("=== cranking ==="); - efiPrintf("crankingRpm: %d", engineConfiguration->cranking.rpm); - efiPrintf("cranking injection %s", getInjection_mode_e(engineConfiguration->crankingInjectionMode)); - - efiPrintf("cranking timing %.2f", engineConfiguration->crankingTimingAngle); - - efiPrintf("=== ignition ==="); - - efiPrintf("ignitionMode: %s/enabled=%s", getIgnition_mode_e(engineConfiguration->ignitionMode), - boolToString(engineConfiguration->isIgnitionEnabled)); - efiPrintf("timingMode: %s", getTiming_mode_e(engineConfiguration->timingMode)); - if (engineConfiguration->timingMode == TM_FIXED) { - efiPrintf("fixedModeTiming: %d", (int) engineConfiguration->fixedModeTiming); - } - - efiPrintf("=== injection ==="); - efiPrintf("injection %s enabled=%s", getInjection_mode_e(engineConfiguration->injectionMode), - boolToString(engineConfiguration->isInjectionEnabled)); - - printOutputs(engineConfiguration); - - efiPrintf("map_avg=%s/wa=%s", - boolToString(engineConfiguration->isMapAveragingEnabled), - boolToString(engineConfiguration->isWaveAnalyzerEnabled)); - - efiPrintf("isManualSpinningMode=%s/isCylinderCleanupEnabled=%s", - boolToString(engineConfiguration->isManualSpinningMode), - boolToString(engineConfiguration->isCylinderCleanupEnabled)); - - efiPrintf("clutchUp@%s: %s", hwPortname(engineConfiguration->clutchUpPin), - boolToString(engine->engineState.clutchUpState)); - efiPrintf("clutchDown@%s: %s", hwPortname(engineConfiguration->clutchDownPin), - boolToString(engine->engineState.clutchDownState)); - -#if EFI_PROD_CODE - printSpiState(engineConfiguration); -#endif // EFI_PROD_CODE -} - -static void doPrintConfiguration() { - printConfiguration(engineConfiguration); -} - -static void setFixedModeTiming(int value) { - engineConfiguration->fixedModeTiming = value; - doPrintConfiguration(); - incrementGlobalConfigurationVersion(); -} - static void setTimingMode(int value) { engineConfiguration->timingMode = (timing_mode_e) value; - doPrintConfiguration(); incrementGlobalConfigurationVersion(); } @@ -161,71 +49,12 @@ static void setIdleSolenoidFrequency(int value) { incrementGlobalConfigurationVersion(); } -static void setInjectionPinMode(int value) { - engineConfiguration->injectionPinMode = (pin_output_mode_e) value; - doPrintConfiguration(); -} - -static void setIgnitionPinMode(int value) { - engineConfiguration->ignitionPinMode = (pin_output_mode_e) value; - doPrintConfiguration(); -} - -static void setIdlePinMode(int value) { - engineConfiguration->idle.solenoidPinMode = (pin_output_mode_e) value; - doPrintConfiguration(); -} - -static void setFuelPumpPinMode(int value) { - engineConfiguration->fuelPumpPinMode = (pin_output_mode_e) value; - doPrintConfiguration(); -} - -static void setMalfunctionIndicatorPinMode(int value) { - engineConfiguration->malfunctionIndicatorPinMode = (pin_output_mode_e) value; - doPrintConfiguration(); -} - static void setSensorChartMode(int value) { engineConfiguration->sensorChartMode = (sensor_chart_e) value; - doPrintConfiguration(); -} - -static void printTpsSenser(const char *msg, SensorType sensor, int16_t min, int16_t max, adc_channel_e channel) { - auto tps = Sensor::get(sensor); - auto raw = Sensor::getRaw(sensor); - - if (!tps.Valid) { - efiPrintf("TPS not valid"); - } - - char pinNameBuffer[16]; - - efiPrintf("tps min (closed) %d/max (full) %d v=%.2f @%s", min, max, - raw, getPinNameByAdcChannel(msg, channel, pinNameBuffer)); - - - efiPrintf("current 10bit=%d value=%.2f", convertVoltageTo10bitADC(raw), tps.value_or(0)); -} - -void printTPSInfo(void) { - efiPrintf("pedal up %f / down %f", - engineConfiguration->throttlePedalUpVoltage, - engineConfiguration->throttlePedalWOTVoltage); - - auto pps = Sensor::get(SensorType::AcceleratorPedal); - - if (!pps.Valid) { - efiPrintf("PPS not valid"); - } - - printTpsSenser("TPS", SensorType::Tps1, engineConfiguration->tpsMin, engineConfiguration->tpsMax, engineConfiguration->tps1_1AdcChannel); - printTpsSenser("TPS2", SensorType::Tps2, engineConfiguration->tps2Min, engineConfiguration->tps2Max, engineConfiguration->tps2_1AdcChannel); } static void setCrankingRpm(int value) { engineConfiguration->cranking.rpm = value; - doPrintConfiguration(); } /** @@ -233,17 +62,14 @@ static void setCrankingRpm(int value) { */ static void setAlgorithmInt(int value) { setAlgorithm((engine_load_mode_e) value); - doPrintConfiguration(); } static void setFiringOrder(int value) { engineConfiguration->specs.firingOrder = (firing_order_e) value; - doPrintConfiguration(); } static void setRpmHardLimit(int value) { engineConfiguration->rpmHardLimit = value; - doPrintConfiguration(); } static void setCrankingIACExtra(float percent) { @@ -263,32 +89,22 @@ static void setGlobalTriggerAngleOffset(float value) { } engineConfiguration->globalTriggerAngleOffset = value; incrementGlobalConfigurationVersion(); - doPrintConfiguration(); } static void setCrankingTimingAngle(float value) { engineConfiguration->crankingTimingAngle = value; incrementGlobalConfigurationVersion(); - doPrintConfiguration(); -} - -static void setCrankingInjectionMode(int value) { - engineConfiguration->crankingInjectionMode = (injection_mode_e) value; - incrementGlobalConfigurationVersion(); - doPrintConfiguration(); } static void setInjectionMode(int value) { engineConfiguration->injectionMode = (injection_mode_e) value; incrementGlobalConfigurationVersion(); - doPrintConfiguration(); } static void setIgnitionMode(int value) { engineConfiguration->ignitionMode = (ignition_mode_e) value; incrementGlobalConfigurationVersion(); prepareOutputSignals(); - doPrintConfiguration(); } static void setOneCoilIgnition() { @@ -306,7 +122,6 @@ static void setIndividualCoilsIgnition() { static void setTriggerType(int value) { engineConfiguration->trigger.type = (trigger_type_e) value; incrementGlobalConfigurationVersion(); - doPrintConfiguration(); efiPrintf("Do you need to also invoke set operation_mode X?"); engine->resetEngineSnifferIfInTestMode(); } @@ -315,17 +130,6 @@ static void setDebugMode(int value) { engineConfiguration->debugMode = (debug_mode_e) value; } -static void setInjectorLag(float voltage, float value) { - setCurveValue(INJECTOR_LAG_CURVE, voltage, value); -} - -static void setGlobalFuelCorrection(float value) { - if (value < 0.01 || value > 50) - return; - efiPrintf("setting fuel mult=%.2f", value); - engineConfiguration->globalFuelCorrection = value; -} - static void setFanSetting(float onTempC, float offTempC) { if (onTempC <= offTempC) { efiPrintf("ON temp [%.2f] should be above OFF temp [%.2f]", onTempC, offTempC); @@ -615,24 +419,6 @@ static void showPinFunction(const char *pinName) { #endif // EFI_PROD_CODE -static void setSpiMode(int index, bool mode) { - switch (index) { - case 1: - engineConfiguration->is_enabled_spi_1 = mode; - break; - case 2: - engineConfiguration->is_enabled_spi_2 = mode; - break; - case 3: - engineConfiguration->is_enabled_spi_3 = mode; - break; - default: - efiPrintf("invalid spi index %d", index); - return; - } - printSpiState(engineConfiguration); -} - static void enableOrDisable(const char *param, bool isEnabled) { if (strEqualCaseInsensitive(param, "useTLE8888_cranking_hack")) { engineConfiguration->useTLE8888_cranking_hack = isEnabled; @@ -743,14 +529,6 @@ static void disable(const char *param) { enableOrDisable(param, false); } -static void enableSpi(int index) { - setSpiMode(index, true); -} - -static void disableSpi(int index) { - setSpiMode(index, false); -} - /** * See 'LimpManager::isEngineStop' for code which actually stops engine */ @@ -759,7 +537,6 @@ void scheduleStopEngine(void) { } static void getValue(const char *paramStr) { - { float value = getConfigValueByName(paramStr); if (value != EFI_ERROR_CODE) { @@ -768,25 +545,7 @@ static void getValue(const char *paramStr) { } } - if (strEqualCaseInsensitive(paramStr, "tps_min")) { - efiPrintf("tps_min=%d", engineConfiguration->tpsMin); - } else if (strEqualCaseInsensitive(paramStr, "tps_max")) { - efiPrintf("tps_max=%d", engineConfiguration->tpsMax); - } else if (strEqualCaseInsensitive(paramStr, "global_trigger_offset_angle")) { - efiPrintf("global_trigger_offset=%.2f", engineConfiguration->globalTriggerAngleOffset); -#if EFI_SHAFT_POSITION_INPUT - } else if (strEqualCaseInsensitive(paramStr, "trigger_hw_input")) { - efiPrintf("trigger_hw_input=%s", boolToString(getTriggerCentral()->hwTriggerInputEnabled)); -#endif // EFI_SHAFT_POSITION_INPUT - } else if (strEqualCaseInsensitive(paramStr, "is_enabled_spi_1")) { - efiPrintf("is_enabled_spi_1=%s", boolToString(engineConfiguration->is_enabled_spi_1)); - } else if (strEqualCaseInsensitive(paramStr, "is_enabled_spi_2")) { - efiPrintf("is_enabled_spi_2=%s", boolToString(engineConfiguration->is_enabled_spi_2)); - } else if (strEqualCaseInsensitive(paramStr, "is_enabled_spi_3")) { - efiPrintf("is_enabled_spi_3=%s", boolToString(engineConfiguration->is_enabled_spi_3)); - } else if (strEqualCaseInsensitive(paramStr, "invertCamVVTSignal")) { - efiPrintf("invertCamVVTSignal=%s", boolToString(engineConfiguration->invertCamVVTSignal)); - } else if (strEqualCaseInsensitive(paramStr, CMD_DATE)) { + if (strEqualCaseInsensitive(paramStr, CMD_DATE)) { printDateTime(); } else { efiPrintf("Invalid Parameter: %s", paramStr); @@ -814,7 +573,6 @@ struct command_f_s { const command_f_s commandsF[] = { #if EFI_ENGINE_CONTROL {"global_trigger_offset_angle", setGlobalTriggerAngleOffset}, - {"global_fuel_correction", setGlobalFuelCorrection}, {"cranking_fuel", setCrankingFuel}, {"cranking_iac", setCrankingIACExtra}, {"cranking_timing_angle", setCrankingTimingAngle}, @@ -825,63 +583,29 @@ const command_f_s commandsF[] = { #endif // EFI_ENGINE_CONTROL {"script_curve_1_value", setScriptCurve1Value}, {"script_curve_2_value", setScriptCurve2Value}, -#if EFI_PROD_CODE -#if EFI_IDLE_CONTROL - {"idle_p", setIdlePFactor}, - {"idle_i", setIdleIFactor}, - {"idle_d", setIdleDFactor}, -#endif // EFI_IDLE_CONTROL -#endif // EFI_PROD_CODE #if EFI_ELECTRONIC_THROTTLE_BODY - {"etb_p", setEtbPFactor}, - {"etb_i", setEtbIFactor}, - {"etb_d", setEtbDFactor}, {"etb", setThrottleDutyCycle}, #endif // EFI_ELECTRONIC_THROTTLE_BODY - // {"", }, -// {"", }, -// {"", }, - // {"", }, - // {"", }, - // {"", }, }; -static void setTpsErrorDetectionTooLow(int v) { - engineConfiguration->tpsErrorDetectionTooLow = v; -} - -static void setTpsErrorDetectionTooHigh(int v) { - engineConfiguration->tpsErrorDetectionTooHigh = v; -} - const command_i_s commandsI[] = {{"ignition_mode", setIgnitionMode}, #if EFI_ENGINE_CONTROL {"cranking_rpm", setCrankingRpm}, - {"cranking_injection_mode", setCrankingInjectionMode}, {"injection_mode", setInjectionMode}, {"sensor_chart_mode", setSensorChartMode}, - {"tpsErrorDetectionTooLow", setTpsErrorDetectionTooLow}, - {"tpsErrorDetectionTooHigh", setTpsErrorDetectionTooHigh}, - {"fixed_mode_timing", setFixedModeTiming}, {"timing_mode", setTimingMode}, {CMD_ENGINE_TYPE, setEngineType}, {"rpm_hard_limit", setRpmHardLimit}, {"firing_order", setFiringOrder}, {"algorithm", setAlgorithmInt}, - {"injection_pin_mode", setInjectionPinMode}, - {"ignition_pin_mode", setIgnitionPinMode}, - {"idle_pin_mode", setIdlePinMode}, - {"fuel_pump_pin_mode", setFuelPumpPinMode}, - {"malfunction_indicator_pin_mode", setMalfunctionIndicatorPinMode}, {"debug_mode", setDebugMode}, {"trigger_type", setTriggerType}, {"idle_solenoid_freq", setIdleSolenoidFrequency}, {"tps_accel_len", setTpsAccelLen}, #endif // EFI_ENGINE_CONTROL #if EFI_PROD_CODE - {"bor", setBor}, #if EFI_CAN_SUPPORT {"can_mode", setCanType}, {"can_vss", setCanVss}, @@ -892,15 +616,6 @@ const command_i_s commandsI[] = {{"ignition_mode", setIgnitionMode}, #endif // EFI_IDLE_CONTROL #endif // EFI_PROD_CODE -#if EFI_ELECTRONIC_THROTTLE_BODY - {"etb_o", setEtbOffset}, -#endif // EFI_ELECTRONIC_THROTTLE_BODY - - // {"", }, - // {"", }, - // {"", }, - // {"", }, - // {"", }, }; static void setValue(const char *paramStr, const char *valueStr) { @@ -930,11 +645,8 @@ static void setValue(const char *paramStr, const char *valueStr) { if (valueI > 10) { engineConfiguration->alternatorControl.periodMs = valueI; } - showAltInfo(); } else if (strEqualCaseInsensitive(paramStr, "alt_offset")) { engineConfiguration->alternatorControl.offset = valueI; - } else if (strEqualCaseInsensitive(paramStr, "alt_p")) { - setAltPFactor(valueF); } else #endif // EFI_ALTERNATOR_CONTROL if (strEqualCaseInsensitive(paramStr, "warning_period")) { @@ -988,10 +700,6 @@ void initSettings(void) { printf("initSettings\n"); #endif // EFI_SIMULATOR - // todo: start saving values into flash right away? - - addConsoleAction("showconfig", doPrintConfiguration); - addConsoleAction("tpsinfo", printTPSInfo); addConsoleAction("calibrate_tps_1_closed", grabTPSIsClosed); addConsoleAction("calibrate_tps_1_wot", grabTPSIsWideOpen); @@ -1006,15 +714,9 @@ void initSettings(void) { addConsoleAction("stopengine", (Void) scheduleStopEngine); - // todo: refactor this - looks like all boolean flags should be controlled with less code duplication - addConsoleActionI("enable_spi", enableSpi); - addConsoleActionI("disable_spi", disableSpi); - addConsoleActionS(CMD_ENABLE, enable); addConsoleActionS(CMD_DISABLE, disable); - addConsoleActionFF("set_injector_lag", setInjectorLag); - addConsoleActionFF("set_fan", setFanSetting); addConsoleActionSS("set", setValue); @@ -1110,6 +812,5 @@ void setEngineType(int value) { } incrementGlobalConfigurationVersion(); #if ! EFI_UNIT_TEST - doPrintConfiguration(); #endif // ! EFI_UNIT_TEST } diff --git a/firmware/controllers/settings.h b/firmware/controllers/settings.h index 43f836995c..77eb4737ce 100644 --- a/firmware/controllers/settings.h +++ b/firmware/controllers/settings.h @@ -11,11 +11,9 @@ #include "engine_configuration_generated_structures.h" void initSettings(void); -void printSpiState(const engine_configuration_s *engineConfiguration); void printConfiguration(const engine_configuration_s *engineConfiguration); void scheduleStopEngine(void); -void printTPSInfo(void); void setEngineType(int value); void readPin(const char *pinName); diff --git a/firmware/hw_layer/hardware.cpp b/firmware/hw_layer/hardware.cpp index b44559e53d..5882e0ca4b 100644 --- a/firmware/hw_layer/hardware.cpp +++ b/firmware/hw_layer/hardware.cpp @@ -342,13 +342,6 @@ void applyNewHardwareSettings() { adcConfigListener(engine); } -#if EFI_PROD_CODE -void setBor(int borValue) { - efiPrintf("setting BOR to %d", borValue); - BOR_Set((BOR_Level_t)borValue); -} -#endif /* EFI_PROD_CODE */ - // This function initializes hardware that can do so before configuration is loaded void initHardwareNoConfig() { efiAssertVoid(CUSTOM_IH_STACK, getCurrentRemainingStack() > EXPECTED_REMAINING_STACK, "init h"); diff --git a/firmware/hw_layer/hardware.h b/firmware/hw_layer/hardware.h index d0409ec477..7f6afed2a6 100644 --- a/firmware/hw_layer/hardware.h +++ b/firmware/hw_layer/hardware.h @@ -58,8 +58,6 @@ void initHardware(); #endif /* EFI_PROD_CODE */ -void setBor(int borValue); - class ButtonDebounce; #endif /* __cplusplus */ diff --git a/firmware/hw_layer/sensors/max31855.cpp b/firmware/hw_layer/sensors/max31855.cpp index 0ee931db18..20a7049075 100644 --- a/firmware/hw_layer/sensors/max31855.cpp +++ b/firmware/hw_layer/sensors/max31855.cpp @@ -31,8 +31,6 @@ static SPIConfig spiConfig[EGT_CHANNEL_COUNT]; static void showEgtInfo() { #if EFI_PROD_CODE - printSpiState(engineConfiguration); - efiPrintf("EGT spi: %d", engineConfiguration->max31855spiDevice); for (int i = 0; i < EGT_CHANNEL_COUNT; i++) { diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 32638b4212..91bd4275f6 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -437,7 +437,7 @@ uint16_t engineSnifferRpmThreshold;Engine sniffer would be disabled above this r struct injector_s float flow;This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min;"cm3/min", 1, 0, 0, 99999, 2 - float[VBAT_INJECTOR_CURVE_SIZE] battLagCorrBins;set_flat_injector_lag LAG\nset_injector_lag VOLTAGE LAG;"volts", 1, 0, 0, 20, 2 + float[VBAT_INJECTOR_CURVE_SIZE] battLagCorrBins;;"volts", 1, 0, 0, 20, 2 float[VBAT_INJECTOR_CURVE_SIZE] battLagCorr;ms delay between injector open and close dead times;"ms", 1, 0, 0, 50, 2 end_struct @@ -588,7 +588,7 @@ custom spi_device_e 1 bits, U08, @OFFSET@, [0:2], "Off", "SPI1", "SPI2", "SPI3", uint8_t boostControlSafeDutyCycle;Duty cycle to use in case of a sensor failure. This duty cycle should produce the minimum possible amount of boost. This duty is also used in case any of the minimum RPM/TPS/MAP conditions are not met.;"%", 1, 0, 0, 100, 0 adc_channel_e mafAdcChannel -float globalFuelCorrection;set global_fuel_correction X;"coef", 1, 0, 0, 1000, 2 +float globalFuelCorrection;;"coef", 1, 0, 0, 1000, 2 float adcVcc;;"volts", 1, 0, 0, 6, 3 float mapCamDetectionAnglePosition;;"Deg", 1, 0, 0, 360, 0 diff --git a/java_console/ui/src/main/java/com/rusefi/ui/RecentCommands.java b/java_console/ui/src/main/java/com/rusefi/ui/RecentCommands.java index 649b6fc471..09c706d3e0 100644 --- a/java_console/ui/src/main/java/com/rusefi/ui/RecentCommands.java +++ b/java_console/ui/src/main/java/com/rusefi/ui/RecentCommands.java @@ -34,14 +34,10 @@ public class RecentCommands { private static final String KEY = "recent_commands"; private static final String DELIMETER = "|"; private static final String STOPENGINE = "stopengine"; - private static final String SHOWCONFIG = "showconfig"; private static final String HELP = "help"; private static final String SENSORINFO = "sensorinfo"; private static final String IDLEINFO = "idleinfo"; - private static final String ALTINFO = "altinfo"; - private static final String TPSINFO = "tpsinfo"; private static final String MAPINFO = "mapinfo"; - private static final String ACCELINFO = "accelinfo"; private static final String CANINFO = "caninfo"; private static final String TSINFO = "tsinfo"; private static final String SPEEDINFO = "speedinfo"; @@ -56,15 +52,11 @@ public class RecentCommands { static { COMMAND_ICONS.put(STOPENGINE, AutoupdateUtil.loadIcon("stop.jpg")); ImageIcon infoIcon = AutoupdateUtil.loadIcon("info.png"); - COMMAND_ICONS.put(SHOWCONFIG, infoIcon); COMMAND_ICONS.put(HELP, AutoupdateUtil.loadIcon("help.jpg")); COMMAND_ICONS.put(SENSORINFO, infoIcon); COMMAND_ICONS.put(CMD_TRIGGERINFO, AutoupdateUtil.loadIcon("trigger.jpg")); COMMAND_ICONS.put(IDLEINFO, infoIcon); - COMMAND_ICONS.put(ALTINFO, AutoupdateUtil.loadIcon("alternator.jpg")); - COMMAND_ICONS.put(ACCELINFO, infoIcon); COMMAND_ICONS.put(TSINFO, infoIcon); - COMMAND_ICONS.put(TPSINFO, infoIcon); COMMAND_ICONS.put(MAPINFO, infoIcon); COMMAND_ICONS.put(CANINFO, infoIcon); COMMAND_ICONS.put(FUELINFO, infoIcon); @@ -115,7 +107,6 @@ public class RecentCommands { private void addDefaults() { add(HELP); - add(SHOWCONFIG); add(STOPENGINE); add(SENSORINFO); add(CMD_TRIGGERINFO); @@ -139,10 +130,7 @@ public class RecentCommands { add("sparkbench 5 400 2"); add("fuelbench 5 400 2"); add(IDLEINFO); - add(ALTINFO); - add(TPSINFO); add(MAPINFO); - add(ACCELINFO); add(FUELINFO); add(HIPINFO); add(SDINFO); diff --git a/java_console/ui/src/main/resources/com/rusefi/alternator.jpg b/java_console/ui/src/main/resources/com/rusefi/alternator.jpg deleted file mode 100644 index 9ed2d475cd463a9e99781bcd88242814966abff8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14632 zcmeHOd3aPsw!gQ#v&SI`VTVZvq8+5u-S_t1lXUEK76J)`B#?xszOU1LlUztI^kNcF zMxukr6P56AVT4Bz#ciIV;HdCamIo+4c`A#zd?Mh+5 zZr!@4e&C&_VQ{tTJVV?Y8)Vcs;rT_9)4f*AUsyIV8Wk;5 z@p*_c9wbmCL@0DLO+6?VBCXWFJg5-zX&Ea?4nxZ1L=Q=%0v;l%w7edfAU{prqY&wa zo+MsA#Cbg_d_Dv6sUp6xXDO0NLfn#8x?X4lrPHk^IedRVL9CYv(Hk*(yxEcxBQFz~#6}rUM|nA)hu&;VjMASVL^(G{BgJ$SyP*rv z#AUdzLwSh(bT;^}Gb?pQo6%sSO(-55L?ePh3r=bI<1b(Fzi z$Wd8~EOenpZ=jJ7G9@J?JuQ9ob=QribI0e>zxe8ZlgLblfN7MRoJhzrNqHvOznjQ` zb|%2SE!w)}F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