Allow launch to be triggered on high or low signal
This commit is contained in:
parent
69ed610d76
commit
e85de746b0
|
@ -18,7 +18,7 @@ const int map_page_size = 288;
|
||||||
#define BIT_ENGINE_CRANK 1 // Engine cranking
|
#define BIT_ENGINE_CRANK 1 // Engine cranking
|
||||||
#define BIT_ENGINE_ASE 2 // after start enrichment (ASE)
|
#define BIT_ENGINE_ASE 2 // after start enrichment (ASE)
|
||||||
#define BIT_ENGINE_WARMUP 3 // Engine in warmup
|
#define BIT_ENGINE_WARMUP 3 // Engine in warmup
|
||||||
#define BIT_ENGINE_ACC 4 // in TPS acceleration mode
|
#define BIT_ENGINE_ACC 4 // in TPS acceleration model
|
||||||
#define BIT_ENGINE_DCC 5 // in deceleration mode
|
#define BIT_ENGINE_DCC 5 // in deceleration mode
|
||||||
#define BIT_ENGINE_MAP 6 // in MAP acceleration mode
|
#define BIT_ENGINE_MAP 6 // in MAP acceleration mode
|
||||||
#define BIT_ENGINE_IDLE 7 // idle on
|
#define BIT_ENGINE_IDLE 7 // idle on
|
||||||
|
@ -300,7 +300,7 @@ struct config3 {
|
||||||
|
|
||||||
byte launchPin : 6;
|
byte launchPin : 6;
|
||||||
byte launchEnabled : 1;
|
byte launchEnabled : 1;
|
||||||
byte unused48h : 1;
|
byte launchHiLo : 1;
|
||||||
|
|
||||||
byte lnchSoftLim;
|
byte lnchSoftLim;
|
||||||
byte lnchRetard;
|
byte lnchRetard;
|
||||||
|
|
|
@ -317,7 +317,7 @@ page = 6
|
||||||
; Launch Control
|
; Launch Control
|
||||||
launchPin = bits , U08, 48, [0:5], "Board Default", "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"
|
launchPin = bits , U08, 48, [0:5], "Board Default", "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"
|
||||||
launchEnable= bits, U08, 48, [6:6], "No", "Yes"
|
launchEnable= bits, U08, 48, [6:6], "No", "Yes"
|
||||||
unused48h = bits, U08, 48, [7:7], "No", "Yes"
|
launchHiLo = bits, U08, 48, [7:7], "LOW", "HIGH"
|
||||||
|
|
||||||
lnchSoftLim = scalar, U08, 49, "rpm", 100, 0.0, 100, 25500, 0
|
lnchSoftLim = scalar, U08, 49, "rpm", 100, 0.0, 100, 25500, 0
|
||||||
lnchRetard = scalar, U08, 50, "deg", 1.0, 0.0, 0.0, 80, 0
|
lnchRetard = scalar, U08, 50, "deg", 1.0, 0.0, 0.0, 80, 0
|
||||||
|
@ -736,6 +736,7 @@ page = 8
|
||||||
field = "Launch Control"
|
field = "Launch Control"
|
||||||
field = "Enable Launch", launchEnable
|
field = "Enable Launch", launchEnable
|
||||||
field = "Launch Input Pin", launchPin, { launchEnable }
|
field = "Launch Input Pin", launchPin, { launchEnable }
|
||||||
|
field = "Launch enabled when signal is",launchHiLo, { launchEnable }
|
||||||
field = "Soft rev limit", lnchSoftLim, { launchEnable }
|
field = "Soft rev limit", lnchSoftLim, { launchEnable }
|
||||||
field = "Soft limit absolute timing", lnchRetard, { launchEnable }
|
field = "Soft limit absolute timing", lnchRetard, { launchEnable }
|
||||||
field = "Hard rev limit", lnchHardLim, { launchEnable }
|
field = "Hard rev limit", lnchHardLim, { launchEnable }
|
||||||
|
|
|
@ -673,7 +673,8 @@ void loop()
|
||||||
readTPS();
|
readTPS();
|
||||||
|
|
||||||
//Check for launching (clutch) can be done around here too
|
//Check for launching (clutch) can be done around here too
|
||||||
currentStatus.launching = !digitalRead(pinLaunch);
|
if(configPage3.launchHiLo) { currentStatus.launching = digitalRead(pinLaunch); }
|
||||||
|
else { currentStatus.launching = !digitalRead(pinLaunch); }
|
||||||
//And check whether the tooth log buffer is ready
|
//And check whether the tooth log buffer is ready
|
||||||
if(toothHistoryIndex > TOOTH_LOG_SIZE) { BIT_SET(currentStatus.squirt, BIT_SQUIRT_TOOTHLOG1READY); }
|
if(toothHistoryIndex > TOOTH_LOG_SIZE) { BIT_SET(currentStatus.squirt, BIT_SQUIRT_TOOTHLOG1READY); }
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,7 +270,8 @@ void setPinMapping(byte boardID)
|
||||||
pinMode(pinIdle1, OUTPUT);
|
pinMode(pinIdle1, OUTPUT);
|
||||||
pinMode(pinIdle2, OUTPUT);
|
pinMode(pinIdle2, OUTPUT);
|
||||||
pinMode(pinFuelPump, OUTPUT);
|
pinMode(pinFuelPump, OUTPUT);
|
||||||
pinMode(pinLaunch, INPUT_PULLUP);
|
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
|
||||||
|
|
||||||
inj1_pin_port = portOutputRegister(digitalPinToPort(pinInjector1));
|
inj1_pin_port = portOutputRegister(digitalPinToPort(pinInjector1));
|
||||||
inj1_pin_mask = digitalPinToBitMask(pinInjector1);
|
inj1_pin_mask = digitalPinToBitMask(pinInjector1);
|
||||||
|
|
Loading…
Reference in New Issue