mirror of https://github.com/rusefi/speeduino.git
Testing commit of the ignition bypass system
This commit is contained in:
parent
52876b7751
commit
97570a294e
|
@ -273,7 +273,10 @@ struct config2 {
|
|||
byte dfcoRPM; //RPM at which DFCO turns off/on at
|
||||
byte dfcoHyster; //Hysteris RPM for DFCO
|
||||
byte dfcoTPSThresh; //TPS must be below this figure for DFCO to engage
|
||||
byte unused63;
|
||||
|
||||
byte ignBypassEnabled : 1; //Whether or not the ignition bypass is enabled
|
||||
byte ignBypassPin : 6; //Pin the ignition bypass is activated on
|
||||
byte ignBypassHiLo : 1; //Whether this should be active high or low.
|
||||
|
||||
|
||||
};
|
||||
|
@ -417,6 +420,7 @@ byte pinFan; // Cooling fan output
|
|||
byte pinStepperDir; //Direction pin for the stepper motor driver
|
||||
byte pinStepperStep; //Step pin for the stepper motor driver
|
||||
byte pinLaunch;
|
||||
byte pinIgnBypass; //The pin used for an ignition bypass (Optional)
|
||||
|
||||
// global variables // from speeduino.ino
|
||||
extern struct statuses currentStatus; // from speeduino.ino
|
||||
|
|
|
@ -262,7 +262,10 @@ page = 4
|
|||
dfcoRPM = scalar, U08, 60, "RPM", 10.0, 0.0, 100, 2550, 0
|
||||
dfcoHyster = scalar, U08, 61, "RPM", 1.0, 0.0, 100, 255.0, 0
|
||||
dfcoTPSThresh= scalar, U08, 62, "%", 1.0, 0.0, 0, 100.0, 0
|
||||
unused4-63 = scalar, U08, 63, "RPM", 100.0, 0.0, 100, 25500, 0
|
||||
;ranking ignition bypass
|
||||
ignBypassEnable = bits, U08, 63, [0:0], "Off", "On"
|
||||
ignBypassPin = bits , U08, 63, [1:6], "INVALID", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
|
||||
ignBypassHiLo = bits, U08, 63, [7:7], "LOW", "HIGH"
|
||||
|
||||
|
||||
;--------------------------------------------------
|
||||
|
@ -508,9 +511,9 @@ page = 8
|
|||
subMenu = std_warmup, "&Warmup Enrichment"
|
||||
subMenu = std_separator
|
||||
subMenu = idleSettings, "Idle Control"
|
||||
subMenu = iacClosedLoop_curve, "Idle - Closed loop targets", 7, { iacAlgorithm == 2 || iacAlgorithm == 3 }
|
||||
subMenu = iacPwm_curve, "Idle - PWM Duty Cycle", 7, { iacAlgorithm == 2 || iacAlgorithm == 3 }
|
||||
subMenu = iacPwmCrank_curve, "Idle - PWM Cranking Duty Cycle", 7, { iacAlgorithm == 2 || iacAlgorithm == 3 }
|
||||
subMenu = iacClosedLoop_curve, "Idle - Closed loop targets", 7, { iacAlgorithm == 3 }
|
||||
subMenu = iacPwm_curve, "Idle - PWM Duty Cycle", 7, { iacAlgorithm == 2 }
|
||||
subMenu = iacPwmCrank_curve, "Idle - PWM Cranking Duty Cycle", 7, { iacAlgorithm == 2 }
|
||||
subMenu = iacStep_curve, "Idle - Stepper Motor", 7, { iacAlgorithm == 4 || iacAlgorithm == 5 }
|
||||
subMenu = iacStepCrank_curve, "Idle - Stepper Motor Cranking", 7, { iacAlgorithm == 4 || iacAlgorithm == 5 }
|
||||
|
||||
|
@ -566,7 +569,7 @@ page = 8
|
|||
TrigAng = "The Angle ATDC when tooth No:1 on the primary wheel passes the primary sensor."
|
||||
StgCycles = "The number of revolutions that will be skipped during cranking before the injectors and coils are fired."
|
||||
TrigEdge = "The Trigger edge of the primary sensor.\nLeading.\nTrailing."
|
||||
TrigFilter = "Tuning of the trigger filter algorithm. The more aggressive the setting, the more noise will be removed, however this increases the chance of some true readings being filtered out (False positive). Medium is safe for most setups. Only select 'Aggressive' if not other options are working"
|
||||
TrigFilter = "Tuning of the trigger filter algorithm. The more aggressive the setting, the more noise will be removed, however this increases the chance of some true readings being filtered out (False positive). Medium is safe for most setups. Only select 'Aggressive' if no other options are working"
|
||||
|
||||
sparkMode = "Wasted Spark: Ignition outputs are on the channels <= half the number of cylinders. Eg 4 cylinder outputs on IGN1 and IGN2.\nSingle Channel: All ignition pulses are output on IGN1.\nWasted COP: Ignition pulses are output on all ignition channels up to the number of cylinders. Eg 4 cylinder outputs on all ignition channels. No valid for >4 cylinders"
|
||||
IgInv = "Whether the spark fires when the ignition sign goes high or goes low. Most ignition systems 'Going Low' but please verify this as damage to coils can result from the incorrect selection"
|
||||
|
@ -583,6 +586,8 @@ page = 8
|
|||
dfcoTPSThresh= "The TPS value below which DFCO will be active. Typical value is 5%-10%, but higher may be needed if TPS signal is noisy"
|
||||
|
||||
launchPin = "The ARDUINO pin that the clutch switch is connected to. This is NOT the pin on the connector, but the pin it relates to on the arduino"
|
||||
ignBypassPin = "The ARDUINO pin that the ignition bypass is connected to. This is NOT the pin on the connector, but the pin it relates to on the arduino"
|
||||
ignBypassEnable = "If turned on, a ground signal will be output during cranking on the specified pin. This is used to bypass the Speeduino ignition control during cranking."
|
||||
|
||||
|
||||
[UserDefinedTS]
|
||||
|
@ -705,6 +710,9 @@ page = 8
|
|||
field = "Priming Pulsewidth", primePulse
|
||||
field = ""
|
||||
field = "Cranking Enrichment %", crankingPct
|
||||
field = ""
|
||||
field = "Cranking bypass", ignBypassEnable
|
||||
field = "Bypass output pin", ignBypassPin { ignBypassEnable }
|
||||
|
||||
dialog = aseSettings, "Afterstart Enrichment"
|
||||
field = "Enrichment %", asePct
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
Speeduino - Simple engine management for the Arduino Mega 2560 platform
|
||||
Copyright (C) Josh Stewart
|
||||
|
@ -731,10 +730,15 @@ void loop()
|
|||
{
|
||||
//If it is, check is we're running or cranking
|
||||
if(currentStatus.RPM > ((unsigned int)configPage2.crankRPM * 100)) //Crank RPM stored in byte as RPM / 100
|
||||
{ //Sets the engine running bit, clears the engine cranking bit
|
||||
BIT_SET(currentStatus.engine, BIT_ENGINE_RUN);
|
||||
BIT_CLEAR(currentStatus.engine, BIT_ENGINE_CRANK);
|
||||
if(startRevolutions >= configPage2.StgCycles) { ignitionOn = true; fuelOn = true;}
|
||||
{
|
||||
//Only need to do anything if we're transitioning from cranking to running
|
||||
if( BIT_CHECK(currentStatus.engine, BIT_ENGINE_CRANK) )
|
||||
{
|
||||
BIT_SET(currentStatus.engine, BIT_ENGINE_RUN); //Sets the engine running bit
|
||||
BIT_CLEAR(currentStatus.engine, BIT_ENGINE_CRANK); //clears the engine cranking bit
|
||||
if(startRevolutions >= configPage2.StgCycles) { ignitionOn = true; fuelOn = true;}
|
||||
if(configPage2.ignBypassEnabled) { digitalWrite(pinIgnBypass, LOW); }
|
||||
}
|
||||
}
|
||||
else
|
||||
{ //Sets the engine cranking bit, clears the engine running bit
|
||||
|
@ -743,6 +747,7 @@ void loop()
|
|||
currentStatus.runSecs = 0; //We're cranking (hopefully), so reset the engine run time to prompt ASE.
|
||||
//Check whether enough cranking revolutions have been performed to turn the ignition on
|
||||
if(startRevolutions >= configPage2.StgCycles) { ignitionOn = true; fuelOn = true;}
|
||||
if(configPage2.ignBypassEnabled) { digitalWrite(pinIgnBypass, LOW); }
|
||||
}
|
||||
|
||||
//END SETTING STATUSES
|
||||
|
|
|
@ -256,7 +256,7 @@ void setPinMapping(byte boardID)
|
|||
|
||||
//Setup any devices that are using selectable pins
|
||||
if(configPage3.launchPin != 0) { pinLaunch = configPage3.launchPin; }
|
||||
|
||||
if(configPage2.ignBypassPin != 0) { pinIgnBypass = configPage2.ignBypassPin; }
|
||||
|
||||
|
||||
//Finally, set the relevant pin modes for outputs
|
||||
|
@ -272,6 +272,7 @@ void setPinMapping(byte boardID)
|
|||
pinMode(pinIdle1, OUTPUT);
|
||||
pinMode(pinIdle2, OUTPUT);
|
||||
pinMode(pinFuelPump, OUTPUT);
|
||||
pinMode(pinIgnBypass, OUTPUT);
|
||||
if (configPage3.launchHiLo) { pinMode(pinLaunch, INPUT); }
|
||||
else { pinMode(pinLaunch, INPUT_PULLUP); } //If launch triggers on LOW signal, then set a pull up as the default
|
||||
|
||||
|
|
Loading…
Reference in New Issue