Sanity check in the PW calc incase TPS value is stupid

This commit is contained in:
Josh Stewart 2014-10-10 16:39:21 +11:00
parent 766c84fa1a
commit 3fff2caac8
1 changed files with 2 additions and 0 deletions

View File

@ -64,5 +64,7 @@ unsigned int PW_SD(int REQ_FUEL, byte VE, byte MAP, int corrections, int injOpen
unsigned int PW_AN(int REQ_FUEL, byte VE, byte TPS, int corrections, int injOpen)
{
//Sanity check
if(TPS > 100) { TPS = 100; }
return PW(REQ_FUEL, VE, 100, corrections, injOpen, TPS); //Just use 1 in place of the MAP
}