Merge pull request #118 from ConnerMcLaughlin/master

Launch Control TPS II
This commit is contained in:
Josh Stewart 2018-01-21 07:18:51 +11:00 committed by GitHub
commit 264090863d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 5 deletions

View File

@ -716,8 +716,9 @@ page = 10
boostIntv = scalar, U08, 27, "ms", 1, 0, 0, 250, 0
stagedInjSizePri = scalar, U16, 28, "cc/min", 1, 0, 0, 1500, 0
stagedInjSizeSec = scalar, U16, 30, "cc/min", 1, 0, 0, 1500, 0
unused11_32_192 = array, U08, 32, [159], "RPM", 100.0, 0.0, 100, 25500, 0
lnchCtrlTPS = scalar, U08, 32, "%TPS", 1, 0, 0, 100, 0
unused11_32_192 = array, U08, 33, [158], "RPM", 100.0, 0.0, 100, 25500, 0
;-------------------------------------------------------------------------------
@ -803,6 +804,7 @@ page = 10
defaultValue = realtime_base_address, 336
defaultValue = VVTasOnOff, 0
defaultValue = stagingEnabled, 0
defaultValue = lnchCtrlTPS, 0
; defaultValue = obd_address, 0
;Default pins
@ -1389,6 +1391,7 @@ menuDialog = main
; Launch control
field = "Launch Control"
field = "Enable Launch", launchEnable
field = "TPS threshold", lnchCtrlTPS, { launchEnable }
field = "Soft rev limit", lnchSoftLim, { launchEnable }
field = "Soft limit absolute timing", lnchRetard, { launchEnable }
field = "Hard rev limit", lnchHardLim, { launchEnable }

View File

@ -441,7 +441,7 @@ static inline int8_t correctionSoftLaunch(int8_t advance)
{
byte ignSoftLaunchValue = advance;
//SoftCut rev limit for 2-step launch control.
if (configPage3.launchEnabled && clutchTrigger && (currentStatus.clutchEngagedRPM < ((unsigned int)(configPage3.flatSArm) * 100)) && (currentStatus.RPM > ((unsigned int)(configPage3.lnchSoftLim) * 100)) )
if (configPage3.launchEnabled && clutchTrigger && (currentStatus.clutchEngagedRPM < ((unsigned int)(configPage3.flatSArm) * 100)) && (currentStatus.RPM > ((unsigned int)(configPage3.lnchSoftLim) * 100)) && (currentStatus.TPS >= configPage11.lnchCtrlTPS) )
{
currentStatus.launchingSoft = true;
BIT_SET(currentStatus.spark, BIT_SPARK_SLAUNCH);

View File

@ -638,7 +638,8 @@ struct config11 {
byte boostIntv;
uint16_t stagedInjSizePri;
uint16_t stagedInjSizeSec;
byte unused11_28_192[160];
byte lnchCtrlTPS;
byte unused11_28_192[159];
#if defined(CORE_AVR)
};

View File

@ -797,7 +797,7 @@ void loop()
if(previousClutchTrigger != clutchTrigger) { currentStatus.clutchEngagedRPM = currentStatus.RPM; }
if (configPage3.launchEnabled && clutchTrigger && (currentStatus.clutchEngagedRPM < ((unsigned int)(configPage3.flatSArm) * 100)) && (currentStatus.RPM > ((unsigned int)(configPage3.lnchHardLim) * 100)) ) { currentStatus.launchingHard = true; BIT_SET(currentStatus.spark, BIT_SPARK_HLAUNCH); } //HardCut rev limit for 2-step launch control.
if (configPage3.launchEnabled && clutchTrigger && (currentStatus.clutchEngagedRPM < ((unsigned int)(configPage3.flatSArm) * 100)) && (currentStatus.RPM > ((unsigned int)(configPage3.lnchHardLim) * 100)) && (currentStatus.TPS >= configPage11.lnchCtrlTPS) ) { currentStatus.launchingHard = true; BIT_SET(currentStatus.spark, BIT_SPARK_HLAUNCH); } //HardCut rev limit for 2-step launch control.
else { currentStatus.launchingHard = false; BIT_CLEAR(currentStatus.spark, BIT_SPARK_HLAUNCH); }
if(configPage3.flatSEnable && clutchTrigger && (currentStatus.RPM > ((unsigned int)(configPage3.flatSArm) * 100)) && (currentStatus.RPM > currentStatus.clutchEngagedRPM) ) { currentStatus.flatShiftingHard = true; }