diff --git a/errors.ino b/errors.ino index 50cd6945..b06a7664 100644 --- a/errors.ino +++ b/errors.ino @@ -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 } diff --git a/globals.h b/globals.h index b6735d30..df60fccf 100644 --- a/globals.h +++ b/globals.h @@ -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 diff --git a/reference/speeduino.ini b/reference/speeduino.ini index 2d6cb629..d6055f8a 100644 --- a/reference/speeduino.ini +++ b/reference/speeduino.ini @@ -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