From e87c96b0e98a2d3c3297ee571558781e0874d074 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sat, 15 Jan 2022 17:30:08 -0500 Subject: [PATCH] Gear detection based on RPM to VSS ratio #3779 --- firmware/console/binary/output_channels.txt | 2 +- firmware/integration/rusefi_config.txt | 5 +++-- firmware/tunerstudio/rusefi.input | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/firmware/console/binary/output_channels.txt b/firmware/console/binary/output_channels.txt index 2918fac699..75194219b2 100644 --- a/firmware/console/binary/output_channels.txt +++ b/firmware/console/binary/output_channels.txt @@ -41,7 +41,7 @@ uint16_t autoscale RPMValue;@@GAUGE_NAME_RPM@@;"RPM",1, 0, 0, 0, 0 uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 0, 0 - uint16_t autoscale speedToRpmRatio;s2rpm;"value",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0 + uint16_t autoscale speedToRpmRatio;@@GAUGE_NAME_GEAR_RATIO@@;"value",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0 uint8_t autoscale vehicleSpeedKph;@@GAUGE_NAME_VVS@@;"kph",1, 0, 0, 0, 0 int8_t autoscale internalMcuTemperature;@@GAUGE_NAME_CPU_TEMP@@;"deg C",1, 0, 0, 0, 0 diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 4cd98bf209..4e8013debf 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -726,8 +726,8 @@ custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fast" pin_input_mode_e throttlePedalUpPinMode; uint8_t acIdleExtraOffset;+Additional idle % while A/C is active;"%", 1, 0, 0, 100, 0 - uint16_t autoscale finalGearRatio;;"ratio", 0.1, 0, 0, 100, 0 - uint16_t autoscale wheelDiameter;;"m", 0.001, 0, 0, 20, 0 + uint16_t autoscale finalGearRatio;;"ratio", 0.1, 0, 0, 100, 2 + uint16_t autoscale wheelDiameter;;"m", 0.001, 0, 0, 20, 2 uint16_t wastegatePositionMin;+Voltage when the wastegate is closed.\nYou probably don't have one of these!;"mv", 1, 0, 0, 5000, 0 uint16_t wastegatePositionMax;+Voltage when the wastegate is fully open.\nYou probably don't have one of these!\n1 volt = 1000 units;"mv", 1, 0, 0, 5000, 0 uint16_t idlePositionMin;+Voltage when the idle valve is closed.\nYou probably don't have one of these!;"mv", 1, 0, 0, 5000, 0 @@ -1662,6 +1662,7 @@ end_struct #define GAUGE_NAME_TIMING_ADVANCE "timing" #define GAUGE_NAME_VVS "Vehicle Speed" +#define GAUGE_NAME_GEAR_RATIO "Gearbox Ratio" #define GAUGE_NAME_TURBO_SPEED "Turbocharger Speed" #define GAUGE_NAME_VBAT "VBatt" #define GAUGE_NAME_TIME "Time" diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 2222891615..f292ed87e0 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -985,7 +985,7 @@ gaugeCategory = Sensors - Extra 2 knockLevelGauge = knockLevel,"Knock level", "V", 0, 7, 10, 10, 100, 100, 1, 2 knockCountGauge = knockCount, "Knock count", "count", 0, 10000, 0, 0, 10000, 10000, 0, 0 fuelTankLevelGauge = fuelTankLevel,"Fuel level", "%", 0, 100, 10, 20, 100, 100, 1, 1 - speedToRpmRatioGauge = speedToRpmRatio, "gearbox ratio", "", 0, 100, 0, 0, 100, 100, 4, 4 + speedToRpmRatioGauge = speedToRpmRatio, @@GAUGE_NAME_GEAR_RATIO@@, "", 0, 100, 0, 0, 100, 100, 4, 4 wastegatePosGauge = wastegatePositionSensor, @@GAUGE_NAME_WG_POSITION@@, "%", 0, 100, 0, 0, 100, 100, 1, 1 idlePosSensGauge = idlePositionSensor, @@GAUGE_NAME_IDLE_POSITION@@, "%", 0, 100, 0, 0, 100, 100, 1, 1 currentEnginePhaseGauge = currentEnginePhase, "Engine Phase", "deg", 0, 720, 0, 0, 720, 720, 0, 0