Fix second revolution check for MAP minimum

Second revolution is never picked up with MAP Sample Method Set to cycle minimum as  the +1 on the second check is in the wrong place
This commit is contained in:
tvoyle 2019-08-20 14:02:53 +12:00 committed by GitHub
parent db09629eec
commit b5b6ea64a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -232,7 +232,7 @@ static inline void readMAP()
//Minimum reading in a cycle
if (currentStatus.RPM > 0 ) //If the engine isn't running, fall back to instantaneous reads
{
if( (MAPcurRev == currentStatus.startRevolutions) || (MAPcurRev == (currentStatus.startRevolutions+1)) ) //2 revolutions are looked at for 4 stroke. 2 stroke not currently catered for.
if( (MAPcurRev == currentStatus.startRevolutions) || ((MAPcurRev+1) == currentStatus.startRevolutions) ) //2 revolutions are looked at for 4 stroke. 2 stroke not currently catered for.
{
#if defined(ANALOG_ISR_MAP)
tempReading = AnChannel[pinMAP-A0];