Experimental change to the PW calc

This commit is contained in:
Josh Stewart 2014-12-30 16:23:18 +11:00
parent cddbdbac7b
commit c0e0e73639
2 changed files with 5 additions and 3 deletions

View File

@ -145,7 +145,7 @@ void setup()
} }
pinMode(pinTrigger, INPUT); pinMode(pinTrigger, INPUT);
digitalWrite(pinTrigger, HIGH); //digitalWrite(pinTrigger, HIGH);
attachInterrupt(triggerInterrupt, trigger, FALLING); // Attach the crank trigger wheel interrupt (Hall sensor drags to ground when triggering) attachInterrupt(triggerInterrupt, trigger, FALLING); // Attach the crank trigger wheel interrupt (Hall sensor drags to ground when triggering)
//End crank triger interrupt attachment //End crank triger interrupt attachment

View File

@ -59,12 +59,14 @@ unsigned int PW(int REQ_FUEL, byte VE, byte MAP, int corrections, int injOpen, b
//Convenience functions for Speed Density and Alpha-N //Convenience functions for Speed Density and Alpha-N
unsigned int PW_SD(int REQ_FUEL, byte VE, byte MAP, int corrections, int injOpen) unsigned int PW_SD(int REQ_FUEL, byte VE, byte MAP, int corrections, int injOpen)
{ {
return PW(REQ_FUEL, VE, MAP, corrections, injOpen, 100); //Just use 1 in place of the TPS //return PW(REQ_FUEL, VE, MAP, corrections, injOpen, 100); //Just use 1 in place of the TPS
return PW(REQ_FUEL, VE, 100, corrections, injOpen, 100); //Just use 1 in place of the TPS
} }
unsigned int PW_AN(int REQ_FUEL, byte VE, byte TPS, int corrections, int injOpen) unsigned int PW_AN(int REQ_FUEL, byte VE, byte TPS, int corrections, int injOpen)
{ {
//Sanity check //Sanity check
if(TPS > 100) { TPS = 100; } if(TPS > 100) { TPS = 100; }
return PW(REQ_FUEL, VE, 100, corrections, injOpen, TPS); //Just use 1 in place of the MAP //return PW(REQ_FUEL, VE, 100, corrections, injOpen, TPS); //Just use 1 in place of the MAP
return PW(REQ_FUEL, VE, 100, corrections, injOpen, 100); //Just use 1 in place of the MAP
} }