Corrected alignment of some indicator bits

This commit is contained in:
Josh Stewart 2016-08-16 21:47:33 +10:00
parent 3c21771604
commit e283a4e1dc
3 changed files with 8 additions and 7 deletions

View File

@ -14,7 +14,7 @@ byte setError(byte errorID)
{
errorCodes[errorCount] = errorID;
errorCount++;
if(errorCount == 1) { BIT_SET(currentStatus.engine, BIT_ENGINE_ERROR); } //Enable the error indicator
if(errorCount == 1) { BIT_SET(currentStatus.engine, BIT_SPARK_ERROR); } //Enable the error indicator
return errorCount;
}
return 0;
@ -39,7 +39,7 @@ void clearError(byte errorID)
}
errorCount--;
if(errorCount == 0) { BIT_CLEAR(currentStatus.engine, BIT_ENGINE_ERROR); } //Enable the error indicator
if(errorCount == 0) { BIT_CLEAR(currentStatus.engine, BIT_SPARK_ERROR); } //Enable the error indicator
}

View File

@ -44,9 +44,9 @@ const int map_page_size = 288;
#define BIT_SPARK_HRDLIM 2 //Hard limiter indicator
#define BIT_SPARK_SFTLIM 3 //Soft limiter indicator
#define BIT_SPARK_BOOSTCUT 4 //Spark component of MAP based boost cut out
#define BIT_SPARK_ERROR 5 // Error is detected
#define BIT_SPARK_IDLE 6 // idle on
#define BIT_SPARK_UNUSED5 7 //
#define BIT_SPARK_ERROR 5 // Error is detected
#define BIT_SPARK_IDLE 6 // idle on
#define BIT_SPARK_SYNC 7 // Whether engine has sync or not
#define VALID_MAP_MAX 1022 //The largest ADC value that is valid for the MAP sensor
#define VALID_MAP_MIN 2 //The smallest ADC value that is valid for the MAP sensor

View File

@ -1324,8 +1324,9 @@ page = 8
hardLimitOn = bits, U08, 29, [2:2]
softlimitOn = bits, U08, 29, [3:3]
boostCutSpark = bits, U08, 29, [4:4]
error = bits, U08, 29, [6:6]
idle = bits, U08, 29, [7:7]
error = bits, U08, 29, [5:5]
idle = bits, U08, 29, [6:6]
sync = bits, U08, 29, [7:7]
afr2 = scalar, U08, 30, "O2", 0.100, 0.000
rpmDOT = scalar, S16, 31, "rpm/s", 1.000, 0.000
flex = scalar, U08, 33, "%", 1.000, 0.000