Launch control bug? "range" thing is confusing #4348

a typo and configurable behaviour without UI
This commit is contained in:
rusefillc 2022-07-20 18:48:55 -04:00
parent a8e86b9b81
commit 2bc4fd909d
4 changed files with 7 additions and 5 deletions

View File

@ -67,7 +67,8 @@ bool LaunchControlBase::isInsideTpsCondition() const {
return false;
}
return engineConfiguration->launchTpsTreshold < tps.Value;
// todo: should this be 'launchTpsThreshold <= tps.Value' so that nicely calibrated TPS of zero does not prevent launch?
return engineConfiguration->launchTpsThreshold < tps.Value;
}
/**

View File

@ -960,7 +960,7 @@ bit verboseCan2,"Print all","Do not print";Print incoming and outgoing second bu
int launchBoostDuty;+Duty Cycle for the Boost Solenoid;"%", 1, 0, 0, 100, 0
int hardCutRpmRange;Range from Launch RPM to activate Hard Cut;"RPM", 1, 0, 0, 3000, 0
int unused962
int launchTpsTreshold;;"", 1, 0, 0, 20000, 0
int launchTpsThreshold;;"", 1, 0, 0, 20000, 0
float launchActivateDelay;;"", 1, 0, 0, 20000, 0
stft_s stft

View File

@ -3835,6 +3835,7 @@ dialog = tcuControls, "Transmission Settings"
field = "Launch RPM", launchRpm, {launchControlEnabled == 1}
;field = "Extra Fuel", launchFuelAdded, {launchControlEnabled == 1}
;field = "Boost Solenoid Duty", launchBoostDuty, {launchControlEnabled == 1}
field = "TPS Threshold", launchTpsThreshold
field = "Ignition Retard enable", enableLaunchRetard, {launchControlEnabled == 1}
field = "Ignition Retard", launchTimingRetard, {launchControlEnabled == 1}
field = "Ignition Retard RPM Range", launchTimingRpmRange, {launchControlEnabled == 1}

View File

@ -7,7 +7,7 @@ TEST(LaunchControl, TpsCondition) {
LaunchControlBase dut;
engineConfiguration->launchTpsTreshold = 10;
engineConfiguration->launchTpsThreshold = 10;
// Should return false with failed sensor
Sensor::resetMockValue(SensorType::DriverThrottleIntent);
@ -103,7 +103,7 @@ TEST(LaunchControl, CombinedCondition) {
engineConfiguration->launchActivationMode = ALWAYS_ACTIVE_LAUNCH;
engineConfiguration->launchRpm = 3000;
engineConfiguration->launchTpsTreshold = 10;
engineConfiguration->launchTpsThreshold = 10;
//valid TPS
Sensor::setMockValue(SensorType::DriverThrottleIntent, 20.0f);
@ -150,7 +150,7 @@ TEST(LaunchControl, CompleteRun) {
engineConfiguration->launchSpeedThreshold = 30;
engineConfiguration->launchRpm = 3000;
engineConfiguration->launchTpsTreshold = 10;
engineConfiguration->launchTpsThreshold = 10;
engineConfiguration->launchControlEnabled = true;
//valid TPS
Sensor::setMockValue(SensorType::DriverThrottleIntent, 20.0f);