better error code names

This commit is contained in:
rusefi 2017-07-24 19:38:22 -04:00
parent f908c06e5f
commit 95a22ed40e
5 changed files with 10 additions and 10 deletions

View File

@ -1685,11 +1685,11 @@ typedef enum {
CUSTOM_FSIO_UNEXPECTED = 6009, CUSTOM_FSIO_UNEXPECTED = 6009,
CUSTOM_FSIO_PARSING = 6010, CUSTOM_FSIO_PARSING = 6010,
CUSTOM_OBD_11 = 6011, CUSTOM_FSIO_INVALID_EXPRESSION = 6011,
CUSTOM_OBD_12 = 6012, CUSTOM_INTEPOLATE_ERROR = 6012,
CUSTOM_OBD_13 = 6013, CUSTOM_INTEPOLATE_ERROR_2 = 6013,
CUSTOM_OBD_14 = 6014, CUSTOM_INTEPOLATE_ERROR_3 = 6014,
CUSTOM_OBD_15 = 6015, CUSTOM_INTEPOLATE_ERROR_4 = 6015,
CUSTOM_PARAM_RANGE = 6016, CUSTOM_PARAM_RANGE = 6016,
CUSTOM_MAF_NEEDED = 6017, CUSTOM_MAF_NEEDED = 6017,
CUSTOM_UNKNOWN_ALGORITHM = 6018, CUSTOM_UNKNOWN_ALGORITHM = 6018,

View File

@ -327,7 +327,7 @@ static const char * action2String(le_action_e action) {
static void setPinState(const char * msg, OutputPin *pin, LEElement *element) { static void setPinState(const char * msg, OutputPin *pin, LEElement *element) {
if (element == NULL) { if (element == NULL) {
warning(CUSTOM_OBD_11, "invalid expression for %s", msg); warning(CUSTOM_FSIO_INVALID_EXPRESSION, "invalid expression for %s", msg);
} else { } else {
int value = (int)calc.getValue2(pin->getLogicValue(), element PASS_ENGINE_PARAMETER_SUFFIX); int value = (int)calc.getValue2(pin->getLogicValue(), element PASS_ENGINE_PARAMETER_SUFFIX);
if (pin->isInitialized() && value != pin->getLogicValue()) { if (pin->isInitialized() && value != pin->getLogicValue()) {

View File

@ -108,7 +108,7 @@ float interpolateMsg(const char *msg, float x1, float y1, float x2, float y2, fl
/** /**
* we could end up here for example while resetting bins while changing engine type * we could end up here for example while resetting bins while changing engine type
*/ */
warning(CUSTOM_OBD_12, "interpolate%s: Same x1 and x2 in interpolate: %f/%f", msg, x1, x2); warning(CUSTOM_INTEPOLATE_ERROR, "interpolate%s: Same x1 and x2 in interpolate: %f/%f", msg, x1, x2);
return NAN; return NAN;
} }

View File

@ -36,11 +36,11 @@ int needInterpolationLogging(void);
template<typename vType> template<typename vType>
float interpolate3d(float x, float xBin[], int xBinSize, float y, float yBin[], int yBinSize, vType* map[]) { float interpolate3d(float x, float xBin[], int xBinSize, float y, float yBin[], int yBinSize, vType* map[]) {
if (cisnan(x)) { if (cisnan(x)) {
warning(CUSTOM_OBD_14, "%f: x is NaN in interpolate3d", x); warning(CUSTOM_INTEPOLATE_ERROR_3, "%f: x is NaN in interpolate3d", x);
return NAN; return NAN;
} }
if (cisnan(y)) { if (cisnan(y)) {
warning(CUSTOM_OBD_13, "%f: y is NaN in interpolate3d", y); warning(CUSTOM_INTEPOLATE_ERROR_2, "%f: y is NaN in interpolate3d", y);
return NAN; return NAN;
} }

View File

@ -56,7 +56,7 @@ void Table2D<SIZE>::preCalc(float *bin, float *values) {
float x1 = bin[i]; float x1 = bin[i];
float x2 = bin[i + 1]; float x2 = bin[i + 1];
if (x1 == x2) { if (x1 == x2) {
warning(CUSTOM_OBD_15, "preCalc: Same x1 and x2 in interpolate: %f/%f", x1, x2); warning(CUSTOM_INTEPOLATE_ERROR_4, "preCalc: Same x1 and x2 in interpolate: %f/%f", x1, x2);
return; return;
} }