Skip to content

Commit

Permalink
Launch control bug? "range" thing is confusing #4348
Browse files Browse the repository at this point in the history
a typo and configurable behaviour without UI
  • Loading branch information
rusefillc committed Jul 20, 2022
1 parent 9e4187d commit 4987a0b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion firmware/controllers/algo/launch_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion firmware/integration/rusefi_config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions firmware/tunerstudio/rusefi.input
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
6 changes: 3 additions & 3 deletions unit_tests/tests/test_launch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4987a0b

Please sign in to comment.