From d4104ea9f24d845250c34f59b264f76adf68a4d0 Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Tue, 21 Jan 2020 16:57:26 +1100 Subject: [PATCH] Minor tweaks for better operation of higher sequential fuel counts --- reference/speeduino.ini | 2 +- speeduino/board_avr2560.h | 2 +- speeduino/init.ino | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/reference/speeduino.ini b/reference/speeduino.ini index f9baa0d9..53f02cc6 100644 --- a/reference/speeduino.ini +++ b/reference/speeduino.ini @@ -1604,7 +1604,7 @@ menuDialog = main dialog = engine_constants_southwest, "Speeduino Board" field = "Stoichiometric ratio", stoich - field = "Injector Layout", injLayout, { nCylinders <= 4 } + field = "Injector Layout", injLayout, { nCylinders <= nFuelChannels } field = "Board Layout", pinLayout field = "MAP Sample method", mapSample diff --git a/speeduino/board_avr2560.h b/speeduino/board_avr2560.h index 3d0511d9..910235bf 100644 --- a/speeduino/board_avr2560.h +++ b/speeduino/board_avr2560.h @@ -57,7 +57,7 @@ #define FUEL2_COMPARE OCR3B #define FUEL3_COMPARE OCR3C #define FUEL4_COMPARE OCR4B - #define FUEL5_COMPARE OCR4C //Shared with FUEL1 + #define FUEL5_COMPARE OCR4C //Shared with IGN5 #define FUEL6_COMPARE OCR4A //Replaces ignition4 #define FUEL7_COMPARE OCR5C //Replaces ignition3 #define FUEL8_COMPARE OCR5B //Replaces ignition2 diff --git a/speeduino/init.ino b/speeduino/init.ino index 90c8c7c0..e0e4c8a1 100644 --- a/speeduino/init.ino +++ b/speeduino/init.ino @@ -612,6 +612,8 @@ void initialiseAll() currentStatus.nSquirts = 1; req_fuel_uS = req_fuel_uS * 2; } + #else + configPage2.injLayout = 0; //This is a failsafe. We can never run semi-sequential with more than 4 cylinders #endif if (!configPage2.injTiming) @@ -622,8 +624,6 @@ void initialiseAll() channel3InjDegrees = 0; } - configPage2.injLayout = 0; //This is a failsafe. We can never run semi-sequential with more than 4 cylinders - channel1InjEnabled = true; channel2InjEnabled = true; channel3InjEnabled = true; @@ -663,6 +663,8 @@ void initialiseAll() currentStatus.nSquirts = 1; req_fuel_uS = req_fuel_uS * 2; } + #else + configPage2.injLayout = 0; //This is a failsafe. We can never run semi-sequential with more than 4 cylinders #endif maxIgnOutputs = 4; @@ -676,8 +678,6 @@ void initialiseAll() channel4InjDegrees = 0; } - configPage2.injLayout = 0; //This is a failsafe. We can never run semi-sequential with more than 4 cylinders - channel1InjEnabled = true; channel2InjEnabled = true; channel3InjEnabled = true;