From 1e9c0ae5d79a00cc5b805372c9710b209f0a8dd1 Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Sun, 7 Jun 2015 09:53:28 +1000 Subject: [PATCH] Minor ini fixes --- decoders.ino | 2 ++ globals.h | 71 ++++++++++++++++++++++++++++++++++------- reference/speeduino.ini | 2 +- 3 files changed, 62 insertions(+), 13 deletions(-) diff --git a/decoders.ino b/decoders.ino index f4f98941..29823d97 100644 --- a/decoders.ino +++ b/decoders.ino @@ -147,8 +147,10 @@ int getRPM_BasicDistributor() int getCrankAngle_BasicDistributor(int timePerDegree) { //This is the current angle ATDC the engine is at. This is the last known position based on what tooth was last 'seen'. It is only accurate to the resolution of the trigger wheel (Eg 36-1 is 10 degrees) + noInterrupts(); int crankAngle = (toothCurrentCount - 1) * triggerToothAngle + configPage2.triggerAngle; //Number of teeth that have passed since tooth 1, multiplied by the angle each tooth represents, plus the angle that tooth 1 is ATDC. This gives accuracy only to the nearest tooth. crankAngle += ldiv( (micros() - toothLastToothTime), timePerDegree).quot; //Estimate the number of degrees travelled since the last tooth + interrupts(); if (crankAngle > 360) { crankAngle -= 360; } return crankAngle; diff --git a/globals.h b/globals.h index f6f376c7..d7418703 100644 --- a/globals.h +++ b/globals.h @@ -101,7 +101,7 @@ struct config1 { byte wueValues[10]; //Warm up enrichment array (10 bytes) byte crankingPct; //Cranking enrichment byte pinMapping; // The board / ping mapping to be used - byte unused96; + byte unused16; byte tdePct; // TPS decelleration (%) byte taeColdA; byte tpsThresh; @@ -111,9 +111,11 @@ struct config1 { byte displayType : 3; byte display1 : 3; byte display2 : 2; + byte display3 : 3; byte display4 : 2; byte display5 : 3; + byte displayB1 : 4; byte displayB2 : 4; @@ -126,7 +128,6 @@ struct config1 { unsigned int inj3Ang; unsigned int inj4Ang; -//116 //config1 in ini byte mapType : 2; byte strokes : 1; @@ -147,15 +148,30 @@ struct config1 { byte injTiming : 2; byte primePulse; - byte egoRPM; - byte fastIdleT; //Fast idle temperature + byte unused40; + byte unused41; byte egoSwitch; byte taeColdM; byte tpsMin; byte tpsMax; - byte unused1; - - //48 + byte unused46; + byte unused47; + byte unused48; + byte unused49; + byte unused50; + byte unused51; + byte unused52; + byte unused53; + byte unused54; + byte unused55; + byte unused56; + byte unused57; + byte unused58; + byte unused59; + byte unused60; + byte unused61; + byte unused62; + byte unused63; }; @@ -196,7 +212,22 @@ struct config2 { byte wueBins[10]; //Warmup Enrichment bins (Values are in configTable1) byte dwellLimit; byte dwellCorrectionValues[6]; //Correction table for dwell vs battery voltage - //Full - All 128bytes of this table are used + byte unused48; + byte unused49; + byte unused50; + byte unused51; + byte unused52; + byte unused53; + byte unused54; + byte unused55; + byte unused56; + byte unused57; + byte unused58; + byte unused59; + byte unused60; + byte unused61; + byte unused62; + byte unused63; }; @@ -227,9 +258,25 @@ struct config3 { byte injVoltageCorrectionValues[6]; //Correction table for injector PW vs battery voltage byte airDenBins[9]; byte airDenRates[9]; - byte unused125; - byte unused126; - byte unused127; + byte unused45; + byte unused46; + byte unused47; + byte unused48; + byte unused49; + byte unused50; + byte unused51; + byte unused452; + byte unused53; + byte unused54; + byte unused55; + byte unused56; + byte unused57; + byte unused58; + byte unused59; + byte unused60; + byte unused61; + byte unused62; + byte unused63; }; @@ -247,7 +294,7 @@ struct config4 { byte iacAlgorithm : 3; //Valid values are: "None", "On/Off", "PWM", "PWM Closed Loop", "Stepper", "Stepper Closed Loop" byte iacStepTime : 3; //How long to pulse the stepper for to ensure the step completes (ms) - byte unused38 : 2; + byte unused52 : 2; byte iacFastTemp; //Fast idle temp when using a simple on/off valve diff --git a/reference/speeduino.ini b/reference/speeduino.ini index 512ece92..88b8d7e1 100644 --- a/reference/speeduino.ini +++ b/reference/speeduino.ini @@ -337,7 +337,7 @@ page = 7 iacAlgorithm = bits , U08, 52, [0:2], "None", "On/Off", "PWM", "PWM Closed Loop", "Stepper", "Stepper Closed Loop" iacStepTime = bits , U08, 52, [3:5], "1", "2", "3", "4", "5", "6" - unused38 = bits , U08, 52, [6:7], "INVALID", "INVALID", "INVALID", "INVALID" + unused52 = bits , U08, 52, [6:7], "One", "INVALID", "INVALID", "INVALID" #if CELSIUS iacFastTemp = scalar, U08, 53, "C", 1.0, -40, -40, 215, 0