From 9a7d3b1fdfd580716a04fdcfb09acdf8f99bdc03 Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Mon, 24 Jul 2017 14:19:39 +1000 Subject: [PATCH] Fix ini 3/4 pin mapping for MX5 PNP --- speeduino/utils.ino | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/speeduino/utils.ino b/speeduino/utils.ino index 7fb67e55..1cd90aa4 100644 --- a/speeduino/utils.ino +++ b/speeduino/utils.ino @@ -281,8 +281,8 @@ void setPinMapping(byte boardID) //Pin mappings as per the MX5 PNP shield pinInjector1 = 11; //Output pin injector 1 is on pinInjector2 = 10; //Output pin injector 2 is on - pinInjector3 = 9; //Output pin injector 3 is on - pinInjector4 = 8; //Output pin injector 4 is on + pinInjector3 = 8; //Output pin injector 3 is on + pinInjector4 = 9; //Output pin injector 4 is on pinInjector5 = 14; //Output pin injector 5 is on pinCoil1 = 39; //Pin for coil 1 pinCoil2 = 41; //Pin for coil 2 @@ -564,7 +564,9 @@ unsigned int PW(int REQ_FUEL, byte VE, byte MAP, int corrections, int injOpen) //Standard float version of the calculation //return (REQ_FUEL * (float)(VE/100.0) * (float)(MAP/100.0) * (float)(TPS/100.0) * (float)(corrections/100.0) + injOpen); //Note: The MAP and TPS portions are currently disabled, we use VE and corrections only - unsigned int iVE, iMAP, iAFR, iCorrections; + uint16_t iVE, iCorrections; + uint16_t iMAP = 100; + uint16_t iAFR = 147; //100% float free version, does sacrifice a little bit of accuracy, but not much. iVE = ((unsigned int)VE << 7) / 100;