diff --git a/firmware/config/engines/GY6_139QMB.cpp b/firmware/config/engines/GY6_139QMB.cpp index 06db98146d..13901a3fe3 100644 --- a/firmware/config/engines/GY6_139QMB.cpp +++ b/firmware/config/engines/GY6_139QMB.cpp @@ -31,7 +31,6 @@ void setGy6139qmbDefaultEngineConfiguration() { setTargetRpmCurve(2000); engineConfiguration->analogInputDividerCoefficient = 1; engineConfiguration->globalTriggerAngleOffset = 45; - engineConfiguration->sensorChartMode = SC_MAP; engineConfiguration->specs.displacement = 0.072; // 72cc engineConfiguration->specs.cylindersCount = 1; setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); diff --git a/firmware/config/engines/dodge_neon.cpp b/firmware/config/engines/dodge_neon.cpp index b3320dbca5..8efadd76ee 100644 --- a/firmware/config/engines/dodge_neon.cpp +++ b/firmware/config/engines/dodge_neon.cpp @@ -326,7 +326,6 @@ void setDodgeNeonNGCEngineConfiguration() { */ engineConfiguration->clt.adcChannel = EFI_ADC_12; - engineConfiguration->sensorChartMode = SC_MAP; engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003; engineConfiguration->hip9011Gain = 0.3; diff --git a/firmware/controllers/algo/auto_generated_commonenum.cpp b/firmware/controllers/algo/auto_generated_commonenum.cpp index 3279187f9a..b68481b3e6 100644 --- a/firmware/controllers/algo/auto_generated_commonenum.cpp +++ b/firmware/controllers/algo/auto_generated_commonenum.cpp @@ -529,8 +529,6 @@ case SC_AUX_FAST1: return "SC_AUX_FAST1"; case SC_DETAILED_RPM: return "SC_DETAILED_RPM"; -case SC_MAP: - return "SC_MAP"; case SC_OFF: return "SC_OFF"; case SC_RPM_ACCEL: diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 585dd2e398..b3f50fe31f 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -452,7 +452,7 @@ typedef enum { * You would use this value if you want to see a detailed graph of your trigger events */ SC_TRIGGER = 1, - SC_MAP = 2, + // unused 2 SC_RPM_ACCEL = 3, SC_DETAILED_RPM = 4, SC_AUX_FAST1 = 5, diff --git a/firmware/controllers/engine_cycle/map_averaging.cpp b/firmware/controllers/engine_cycle/map_averaging.cpp index 846423b2a6..8ce2222d7b 100644 --- a/firmware/controllers/engine_cycle/map_averaging.cpp +++ b/firmware/controllers/engine_cycle/map_averaging.cpp @@ -34,22 +34,11 @@ #include "sensor_chart.h" #endif /* EFI_SENSOR_CHART */ -#define FAST_MAP_CHART_SKIP_FACTOR 16 - /** * this instance does not have a real physical pin - it's only used for engine sniffer */ static NamedOutputPin mapAveragingPin("map"); -/** - * Running counter of measurements per revolution - */ -static volatile int measurementsPerRevolutionCounter = 0; -/** - * Number of measurements in previous shaft revolution - */ -static volatile int measurementsPerRevolution = 0; - /** * Running MAP accumulator - sum of all measurements within averaging window */ @@ -111,19 +100,6 @@ static void startAveraging(scheduling_s *endAveragingScheduling) { void mapAveragingAdcCallback(adcsample_t adcValue) { efiAssertVoid(CUSTOM_ERR_6650, getCurrentRemainingStack() > 128, "lowstck#9a"); -#if EFI_SENSOR_CHART && EFI_ANALOG_SENSORS - if (engine->sensorChartMode == SC_MAP) { - measurementsPerRevolutionCounter++; - if (measurementsPerRevolutionCounter % FAST_MAP_CHART_SKIP_FACTOR == 0) { - float voltage = adcToVoltsDivided(adcValue); - float currentPressure = convertMap(voltage).value_or(0); - scAddData( - engine->triggerCentral.getCurrentEnginePhase(getTimeNowNt()).value_or(0), - currentPressure); - } - } -#endif /* EFI_SENSOR_CHART */ - #if EFI_TUNER_STUDIO if (engineConfiguration->debugMode == DBG_MAP) { float voltage = adcToVoltsDivided(adcValue); @@ -245,9 +221,6 @@ void mapAveragingTriggerCallback( applyMapMinBufferLength(); } - measurementsPerRevolution = measurementsPerRevolutionCounter; - measurementsPerRevolutionCounter = 0; - // todo: this could be pre-calculated int samplingCount = engineConfiguration->measureMapOnlyInOneCylinder ? 1 : engineConfiguration->specs.cylindersCount; @@ -287,15 +260,7 @@ void mapAveragingTriggerCallback( #endif } -static void showMapStats() { - efiPrintf("per revolution %d", measurementsPerRevolution); -} - void initMapAveraging() { -#if !EFI_UNIT_TEST - addConsoleAction("faststat", showMapStats); -#endif /* EFI_UNIT_TEST */ - applyMapMinBufferLength(); } diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 4091a1524d..9ecb9a4bb0 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -844,7 +844,7 @@ custom script_setting_t 4 scalar, F32, @OFFSET@, "", 1, 0, 0, 18000, 2 uart_device_e consoleUartDevice; -#define sensor_chart_e_enum "none", "trigger", "MAP", "RPM ACCEL", "DETAILED RPM", "Fast Aux1" +#define sensor_chart_e_enum "none", "trigger", "INVALID", "RPM ACCEL", "DETAILED RPM", "Fast Aux1" custom sensor_chart_e 4 bits, S32, @OFFSET@, [0:2], @@sensor_chart_e_enum@@ sensor_chart_e sensorChartMode;+rusEfi console Sensor Sniffer mode;