enhance configuration of torque reduction trigger PIN #5608

This commit is contained in:
kifir 2024-09-27 23:39:51 +03:00 committed by rusefillc
parent 9111c3427c
commit a11559f801
3 changed files with 25 additions and 9 deletions

View File

@ -584,6 +584,11 @@ typedef enum __attribute__ ((__packed__)) {
STOP_INPUT_LAUNCH = 3,
} launchActivationMode_e;
typedef enum __attribute__ ((__packed__)) {
TORQUE_REDUCTION_BUTTON = 0,
LAUNCH_BUTTON = 1,
} torqueReductionActivationMode_e;
typedef enum __attribute__ ((__packed__)) {
SWITCH_INPUT_ANTILAG = 0,
ALWAYS_ON_ANTILAG = 1,

View File

@ -1067,8 +1067,8 @@ bit cutFuelOnHardLimit,"yes","no"
bit cutSparkOnHardLimit,"yes","no";Be careful enabling this: some engines are known to self-disassemble their valvetrain with a spark cut. Fuel cut is much safer.
bit launchFuelCutEnable
bit launchSparkCutEnable;This is the Cut Mode normally used
bit unusedFancy1
bit unusedFancy2
bit torqueReductionEnabled
bit torqueReductionTriggerPinInverted
bit unusedFancy14
bit unusedFancy7
bit unusedFancy8
@ -1438,7 +1438,11 @@ float tChargeAirDecrLimit;Maximum allowed rate of decrease allowed for the estim
pid_s idleTimingPid;See useIdleTimingPidControl
float idleTimingSoftEntryTime;When entering idle, and the PID settings are aggressive, it's good to make a soft entry upon entering closed loop;"", 1, 0, 0, 100, 1
int16_t unusedEtbRocExpAverageLength
pin_input_mode_e torqueReductionTriggerPinMode;
#define torqueReductionActivationMode_e_enum "Torque Reduction Button", "Launch Button"
custom torqueReductionActivationMode_e 1 bits, S08, @OFFSET@, [0:0], @@torqueReductionActivationMode_e_enum@@
torqueReductionActivationMode_e torqueReductionActivationMode;
int16_t tpsAccelFractionPeriod;A delay in cycles between fuel-enrich. portions;"cycles", 1, 0, 0, 500, 0
float tpsAccelFractionDivisor;A fraction divisor: 1 or less = entire portion at once, or split into diminishing fractions;"coef", 1, 0, 1, 100, 2

View File

@ -4983,15 +4983,22 @@ dialog = tcuControls, "Transmission Settings"
field = "Fuel Cut", launchFuelCutEnable, {launchControlEnabled == 1}
dialog = TorqueReductionSettings, "Torque Reduction"
field = "Trigger Pin", torqueReductionTriggerPin
field = "Time", torqueReductionTime, {torqueReductionTriggerPin != 0}
field = "Arming RPM", torqueReductionArmingRpm, {torqueReductionTriggerPin != 0}
field = "Arming APP", torqueReductionArmingApp, {torqueReductionTriggerPin != 0}
field = "Ignition Retard", torqueReductionIgnitionRetard, {torqueReductionTriggerPin != 0}
field = "Ignition Cut", torqueReductionIgnitionCut, {torqueReductionTriggerPin != 0}
field = "Enable", torqueReductionEnabled
field = "Activation Mode", torqueReductionActivationMode, {torqueReductionEnabled == 1}
field = "Button" torqueReductionTriggerPin, {torqueReductionEnabled == 1 && torqueReductionActivationMode == @@torqueReductionActivationMode_e_TORQUE_REDUCTION_BUTTON@@}
field = "Button inverted", torqueReductionTriggerPinInverted, {torqueReductionEnabled == 1 && torqueReductionActivationMode == @@torqueReductionActivationMode_e_TORQUE_REDUCTION_BUTTON@@ && torqueReductionTriggerPin != 0}
field = "Button mode", torqueReductionTriggerPinMode, {torqueReductionEnabled == 1 && torqueReductionActivationMode == @@torqueReductionActivationMode_e_TORQUE_REDUCTION_BUTTON@@ && torqueReductionTriggerPin != 0}
field = "Time", torqueReductionTime, {torqueReductionEnabled == 1}
field = "Arming RPM", torqueReductionArmingRpm, {torqueReductionEnabled == 1}
field = "Arming APP", torqueReductionArmingApp, {torqueReductionEnabled == 1}
field = "Ignition Retard", torqueReductionIgnitionRetard, {torqueReductionEnabled == 1}
field = "Ignition Cut", torqueReductionIgnitionCut, {torqueReductionEnabled == 1}
dialog = FlatShiftSettingsDialog, "", border
panel = TorqueReductionSettings, West
field = "Launch Button", launchActivatePin, {torqueReductionEnabled == 1 && torqueReductionActivationMode == @@torqueReductionActivationMode_e_LAUNCH_BUTTON@@}
field = "Launch Button inverted", launchActivateInverted, {torqueReductionEnabled == 1 && torqueReductionActivationMode == @@torqueReductionActivationMode_e_LAUNCH_BUTTON@@ && launchActivatePin != 0}
field = "Launch Button mode", launchActivatePinMode, {torqueReductionEnabled == 1 && torqueReductionActivationMode == @@torqueReductionActivationMode_e_LAUNCH_BUTTON@@ && launchActivatePin != 0}
dialog = smLaunchControl, "", border
panel = smLaunchControlWest, West