rusefi
rusefi copied to clipboard
`Launch Control` activation/deactivation from Lua script
We need to have a possibility of activation/deactivation Launch Control from Lua script. To implement this functionality we need to:
- register new Lua function
setLaunchControlActivated
that accepts a single boolean parameter - add a new option
Lua
to the [Activation Mode
] drop-down list onLaunch Control
dialog in TunerStudio:
When Activation Mode
is Lua
, ALL the following conditions should be satisfied to make an engine working in PreLaunch/Launch modes:
-
switch condition:
true
was passed as parameter to the latestsetLaunchControlActivated
fuction call -
speed condition: Vechicle Speed is less than [
Speed Threshold (kph)
] setting -
TPS condition: TPS is greater than [
TPS Threshold
] setting -
RPM condition: RPM is between [
Launch RPM(rpm)
] - [Launch Control Window(RPM)
)] and [Launch RPM(rpm)
] (for PreLaunch mode) OR RPM is greater than [Launch RPM(rpm)
] setting (for Launch Mode)