Not all launch control options are used #3554
This commit is contained in:
parent
3b0825181c
commit
0cc88ec6e2
|
@ -572,11 +572,11 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
// todo: this value is way off! I am pretty sure temp coeffs are off also
|
||||
engineConfiguration->iat.config = {32, 75, 120, 9500, 2100, 1000, 2700};
|
||||
|
||||
// wow unit tests have much cooler setDefaultLaunchParameters method
|
||||
engineConfiguration->launchRpm = 3000;
|
||||
engineConfiguration->launchTimingRetard = 10;
|
||||
// engineConfiguration->launchTimingRetard = 10;
|
||||
engineConfiguration->launchTimingRpmRange = 500;
|
||||
engineConfiguration->launchSparkCutEnable = false;
|
||||
engineConfiguration->launchFuelCutEnable = false;
|
||||
engineConfiguration->launchSpeedThreshold = 30;
|
||||
engineConfiguration->hardCutRpmRange = 500;
|
||||
|
||||
engineConfiguration->slowAdcAlpha = 0.33333;
|
||||
|
|
|
@ -50,7 +50,7 @@ bool LaunchControlBase::isInsideSwitchCondition() {
|
|||
bool LaunchControlBase::isInsideSpeedCondition() const {
|
||||
int speed = Sensor::getOrZero(SensorType::VehicleSpeed);
|
||||
|
||||
return (CONFIG(launchSpeedTreshold) > speed) || (!(CONFIG(launchActivationMode) == ALWAYS_ACTIVE_LAUNCH));
|
||||
return (CONFIG(launchSpeedThreshold) > speed) || (!(CONFIG(launchActivationMode) == ALWAYS_ACTIVE_LAUNCH));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -125,24 +125,6 @@ void LaunchControlBase::update() {
|
|||
#endif /* EFI_TUNER_STUDIO */
|
||||
}
|
||||
|
||||
void setDefaultLaunchParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
engineConfiguration->launchRpm = 4000; // Rpm to trigger Launch condition
|
||||
engineConfiguration->launchTimingRetard = 10; // retard in absolute degrees ATDC
|
||||
engineConfiguration->launchTimingRpmRange = 500; // Rpm above Launch triggered for full retard
|
||||
engineConfiguration->launchSparkCutEnable = true;
|
||||
engineConfiguration->launchFuelCutEnable = false;
|
||||
engineConfiguration->hardCutRpmRange = 500; //Rpm above Launch triggered +(if retard enabled) launchTimingRpmRange to hard cut
|
||||
engineConfiguration->launchSpeedTreshold = 10; //maximum speed allowed before disable launch
|
||||
engineConfiguration->launchFuelAdded = 10; // Extra fuel in % when launch are triggered
|
||||
engineConfiguration->launchBoostDuty = 70; // boost valve duty cycle at launch
|
||||
engineConfiguration->launchActivateDelay = 3; // Delay in seconds for launch to kick in
|
||||
engineConfiguration->enableLaunchRetard = true;
|
||||
engineConfiguration->enableLaunchBoost = true;
|
||||
engineConfiguration->launchSmoothRetard = true; //interpolates the advance linear from launchrpm to fully retarded at launchtimingrpmrange
|
||||
engineConfiguration->antiLagRpmTreshold = 3000;
|
||||
|
||||
}
|
||||
|
||||
bool LaunchControlBase::isLaunchRpmRetardCondition() const {
|
||||
return isLaunchCondition && (retardThresholdRpm < GET_RPM());
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "timer.h"
|
||||
|
||||
void initLaunchControl(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void setDefaultLaunchParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
class LaunchControlBase : public EnginePtr {
|
||||
public:
|
||||
|
|
|
@ -878,8 +878,8 @@ custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@
|
|||
bit useHbridgesToDriveIdleStepper;+If enabled we use two H-bridges to drive stepper idle air valve
|
||||
bit multisparkEnable
|
||||
bit enableLaunchRetard
|
||||
bit enableLaunchBoost
|
||||
bit launchDisableBySpeed
|
||||
bit unfinishedenableLaunchBoost
|
||||
bit unfinishedlaunchDisableBySpeed
|
||||
bit enableCanVss;+Read VSS from OEM CAN bus according to selected CAN vehicle configuration.
|
||||
bit enableInnovateLC2
|
||||
bit showHumanReadableWarning
|
||||
|
@ -925,8 +925,8 @@ custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@
|
|||
custom antiLagActivationMode_e 4 bits, S32, @OFFSET@, [0:0], @@antiLagActivationMode_e_enum@@
|
||||
antiLagActivationMode_e antiLagActivationMode;
|
||||
|
||||
int launchSpeedTreshold;+Disabled above this speed;"Kph", 1, 0, 0, 300, 0
|
||||
int launchRpmTreshold;+Disabled below this rpm;"RPM", 1, 0, 0, 8000, 0
|
||||
int launchSpeedThreshold;+Disabled above this speed;"Kph", 1, 0, 0, 300, 0
|
||||
int unusedLaunchRpmThreshold;+Disabled below this rpm;"RPM", 1, 0, 0, 8000, 0
|
||||
int launchTimingRpmRange;+Range from Launch Rpm for Timing Retard to activate;"RPM", 1, 0, 0, 8000, 0
|
||||
int launchFuelAdded;+Extra Fuel Added;"%", 1, 0, 0, 100, 0
|
||||
int launchBoostDuty;+Duty Cycle for the Boost Solenoid;"%", 1, 0, 0, 100, 0
|
||||
|
|
|
@ -3726,8 +3726,8 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
|
|||
field = "Clutch Input", clutchDownPin, {launchActivationMode == 1 && launchControlEnabled == 1}
|
||||
field = "Clutch Input inverted", clutchDownPinMode, {launchActivationMode == 1 && launchControlEnabled == 1}
|
||||
field = ""
|
||||
field = "Rpm Treshold", launchRpmTreshold, {launchControlEnabled == 1}
|
||||
field = "Speed Treshold", launchSpeedTreshold, {launchControlEnabled == 1}
|
||||
; dead code field = "Rpm Threshold", launchRpmThreshold, {launchControlEnabled == 1}
|
||||
field = "Speed Threshold", launchSpeedThreshold, {launchControlEnabled == 1}
|
||||
field = ""
|
||||
field = "Launch RPM", launchRpm, {launchControlEnabled == 1}
|
||||
;field = "Extra Fuel", launchFuelAdded, {launchControlEnabled == 1}
|
||||
|
|
|
@ -32,8 +32,8 @@ TEST(LaunchControl, VSSCondition) {
|
|||
|
||||
// Test Speed trashold
|
||||
engineConfiguration->launchActivationMode = ALWAYS_ACTIVE_LAUNCH;
|
||||
engineConfiguration->launchSpeedTreshold = 30;
|
||||
engineConfiguration->launchDisableBySpeed = 1;
|
||||
engineConfiguration->launchSpeedThreshold = 30;
|
||||
|
||||
Sensor::setMockValue(SensorType::VehicleSpeed, 10.0);
|
||||
EXPECT_TRUE(dut.isInsideSpeedCondition());
|
||||
|
||||
|
@ -105,9 +105,8 @@ TEST(LaunchControl, CombinedCondition) {
|
|||
dut.inject(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
//check VSS normal usage
|
||||
engineConfiguration->launchActivationMode=ALWAYS_ACTIVE_LAUNCH;
|
||||
engineConfiguration->launchSpeedTreshold = 30;
|
||||
engineConfiguration->launchDisableBySpeed = 1;
|
||||
engineConfiguration->launchActivationMode = ALWAYS_ACTIVE_LAUNCH;
|
||||
|
||||
engineConfiguration->launchRpm = 3000;
|
||||
engineConfiguration->launchTpsTreshold = 10;
|
||||
//valid TPS
|
||||
|
@ -126,6 +125,23 @@ TEST(LaunchControl, CombinedCondition) {
|
|||
|
||||
}
|
||||
|
||||
static void setDefaultLaunchParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
engineConfiguration->launchRpm = 4000; // Rpm to trigger Launch condition
|
||||
// engineConfiguration->launchTimingRetard = 10; // retard in absolute degrees ATDC
|
||||
engineConfiguration->launchTimingRpmRange = 500; // Rpm above Launch triggered for full retard
|
||||
engineConfiguration->launchSparkCutEnable = true;
|
||||
engineConfiguration->launchFuelCutEnable = false;
|
||||
engineConfiguration->hardCutRpmRange = 500; //Rpm above Launch triggered +(if retard enabled) launchTimingRpmRange to hard cut
|
||||
engineConfiguration->launchSpeedThreshold = 10; //maximum speed allowed before disable launch
|
||||
engineConfiguration->launchFuelAdded = 10; // Extra fuel in % when launch are triggered
|
||||
engineConfiguration->launchBoostDuty = 70; // boost valve duty cycle at launch
|
||||
engineConfiguration->launchActivateDelay = 3; // Delay in seconds for launch to kick in
|
||||
// engineConfiguration->enableLaunchRetard = true;
|
||||
// dead code todo engineConfiguration->enableLaunchBoost = true;
|
||||
engineConfiguration->launchSmoothRetard = true; //interpolates the advance linear from launchrpm to fully retarded at launchtimingrpmrange
|
||||
// dead code todo engineConfiguration->antiLagRpmTreshold = 3000;
|
||||
}
|
||||
|
||||
TEST(LaunchControl, CompleteRun) {
|
||||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||
|
||||
|
@ -136,11 +152,11 @@ TEST(LaunchControl, CompleteRun) {
|
|||
|
||||
//check VSS normal usage
|
||||
engineConfiguration->launchActivationMode = ALWAYS_ACTIVE_LAUNCH;
|
||||
engineConfiguration->launchSpeedTreshold = 30;
|
||||
engineConfiguration->launchDisableBySpeed = 1;
|
||||
engineConfiguration->launchSpeedThreshold = 30;
|
||||
|
||||
engineConfiguration->launchRpm = 3000;
|
||||
engineConfiguration->launchTpsTreshold = 10;
|
||||
engineConfiguration->launchControlEnabled = 1;
|
||||
engineConfiguration->launchControlEnabled = true;
|
||||
//valid TPS
|
||||
Sensor::setMockValue(SensorType::DriverThrottleIntent, 20.0f);
|
||||
|
||||
|
|
Loading…
Reference in New Issue