diff --git a/firmware/controllers/algo/advance_map.cpp b/firmware/controllers/algo/advance_map.cpp index 2add034807..9d25e85000 100644 --- a/firmware/controllers/algo/advance_map.cpp +++ b/firmware/controllers/algo/advance_map.cpp @@ -143,7 +143,7 @@ angle_t getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_SUFFIX) { angle_t angle; if (ENGINE(rpmCalculator).isCranking(PASS_ENGINE_PARAMETER_SIGNATURE)) { angle = getCrankingAdvance(rpm, engineLoad PASS_ENGINE_PARAMETER_SUFFIX); - assertAngleRange(angle, "crAngle", CUSTOM_ERR_6541); + assertAngleRange(angle, "crAngle", CUSTOM_ERR_6680); efiAssert(CUSTOM_ERR_ASSERT, !cisnan(angle), "crAngleN", 0); if (CONFIG(useAdvanceCorrectionsForCranking)) angle += getAdvanceCorrections(rpm PASS_ENGINE_PARAMETER_SUFFIX); diff --git a/firmware/controllers/algo/obd_error_codes.h b/firmware/controllers/algo/obd_error_codes.h index 9ff48a7fdd..3f1e6008b4 100644 --- a/firmware/controllers/algo/obd_error_codes.h +++ b/firmware/controllers/algo/obd_error_codes.h @@ -1849,8 +1849,8 @@ typedef enum { CUSTOM_ERR_UNEXPECTED_SHAFT_EVENT = 6144, CUSTOM_ERR_SD_MOUNT_FAILED = 6145, CUSTOM_ERR_SD_SEEK_FAILED = 6146, - CUSTOM_ERR_6147 = 6147, - CUSTOM_ERR_6148 = 6148, + CUSTOM_ERR_OUT_OF_ORDER = 6147, + CUSTOM_ERR_T2_CHARGE = 6148, /** * This indicates an issue with coil control */ @@ -1861,7 +1861,7 @@ typedef enum { ERROR_FL_STACK_OVERFLOW = 6502, CUSTOM_ERR_FSIO_POOL = 6503, CUSTOM_FLSTACK = 6504, - ERROR_ANGLE_RANGE = 6505, + CUSTOM_ERR_START_STACK = 6505, CUSTOM_EGO_TYPE = 6506, CUSTOM_LIST_LOOP = 6507, CUSTOM_ERR_LOCK_ISSUE = 6508, @@ -1898,9 +1898,9 @@ typedef enum { CUSTOM_ERR_INJECTOR_LAG = 6539, CUSTOM_ERR_AXIS_ORDER = 6540, - CUSTOM_ERR_6541 = 6541, - CUSTOM_ERR_6542 = 6542, - CUSTOM_ERR_6543 = 6543, + CUSTOM_HW_TIMER = 6541, + CUSTOM_INJ_DURATION = 6542, + CUSTOM_ADD_BASE = 6543, CUSTOM_ERR_6544 = 6544, CUSTOM_ERR_6545 = 6545, CUSTOM_ERR_6546 = 6546, @@ -2047,8 +2047,8 @@ typedef enum { CUSTOM_ERR_6674 = 6674, CUSTOM_ERR_6675 = 6675, CUSTOM_ERR_6676 = 6676, - CUSTOM_ERR_6677 = 6677, - CUSTOM_ERR_6678 = 6678, + CUSTOM_IH_STACK = 6677, + CUSTOM_EC_NULL = 6678, CUSTOM_ERR_6679 = 6679, CUSTOM_ERR_6680 = 6680, diff --git a/firmware/controllers/core/interpolation.cpp b/firmware/controllers/core/interpolation.cpp index e0d17bb94c..76c1156485 100644 --- a/firmware/controllers/core/interpolation.cpp +++ b/firmware/controllers/core/interpolation.cpp @@ -219,7 +219,7 @@ int findIndexMsg(const char *msg, const float array[], int size, float value) { #if EFI_UNIT_TEST || defined(__DOXYGEN__) firmwareError(CUSTOM_ERR_6147, "%s: out of order %.2f %.2f", msg, array[middle - 1], array[middle]); #else - warning(CUSTOM_ERR_6147, "%s: out of order %.2f %.2f", msg, array[middle - 1], array[middle]); + warning(CUSTOM_ERR_OUT_OF_ORDER, "%s: out of order %.2f %.2f", msg, array[middle - 1], array[middle]); #endif /* EFI_UNIT_TEST */ } diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index cac9060f33..d87a53168d 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -135,7 +135,7 @@ bool FuelSchedule::addFuelEventsForCylinder(int i DECLARE_ENGINE_PARAMETER_SUFF efiAssert(CUSTOM_ERR_ASSERT, !cisnan(fuelMs), "NaN fuelMs", false); angle_t injectionDuration = MS2US(fuelMs) / oneDegreeUs; efiAssert(CUSTOM_ERR_ASSERT, !cisnan(injectionDuration), "NaN injectionDuration", false); - assertAngleRange(injectionDuration, "injectionDuration_r", CUSTOM_ERR_6542); + assertAngleRange(injectionDuration, "injectionDuration_r", CUSTOM_INJ_DURATION); floatus_t injectionOffset = ENGINE(engineState.injectionOffset); if (cisnan(injectionOffset)) { // injection offset map not ready - we are not ready to schedule fuel events @@ -163,7 +163,7 @@ bool FuelSchedule::addFuelEventsForCylinder(int i DECLARE_ENGINE_PARAMETER_SUFF bool isSimultanious = mode == IM_SIMULTANEOUS; - assertAngleRange(baseAngle, "addFbaseAngle", CUSTOM_ERR_6543); + assertAngleRange(baseAngle, "addFbaseAngle", CUSTOM_ADD_BASE); int cylindersCount = CONFIG(specs.cylindersCount); if (cylindersCount < 1) { diff --git a/firmware/controllers/math/speed_density.cpp b/firmware/controllers/math/speed_density.cpp index c8bdf5d759..706302b67b 100644 --- a/firmware/controllers/math/speed_density.cpp +++ b/firmware/controllers/math/speed_density.cpp @@ -29,7 +29,7 @@ baroCorr_Map3D_t baroCorrMap("baro"); // http://rusefi.com/math/t_charge.html float getTCharge(int rpm, float tps, float coolantTemp, float airTemp DECLARE_ENGINE_PARAMETER_SUFFIX) { if (cisnan(coolantTemp) || cisnan(airTemp)) { - warning(CUSTOM_ERR_6147, "t-getTCharge NaN"); + warning(CUSTOM_ERR_START_STACK, "t-getTCharge NaN"); return coolantTemp; } float minRpmKcurrentTPS = interpolateMsg("minRpm", tpMin, engineConfiguration->tChargeMinRpmMinTps, tpMax, @@ -39,7 +39,7 @@ float getTCharge(int rpm, float tps, float coolantTemp, float airTemp DECLARE_EN float Tcharge_coff = interpolateMsg("Kcurr", rpmMin, minRpmKcurrentTPS, rpmMax, maxRpmKcurrentTPS, rpm); if (cisnan(Tcharge_coff)) { - warning(CUSTOM_ERR_6148, "t2-getTCharge NaN"); + warning(CUSTOM_ERR_T2_CHARGE, "t2-getTCharge NaN"); return coolantTemp; } diff --git a/firmware/hw_layer/hardware.cpp b/firmware/hw_layer/hardware.cpp index 8686051be4..71a49b56e0 100644 --- a/firmware/hw_layer/hardware.cpp +++ b/firmware/hw_layer/hardware.cpp @@ -299,10 +299,10 @@ void showBor(void) { } void initHardware(Logging *l) { - efiAssertVoid(CUSTOM_ERR_6677, getRemainingStack(chThdGetSelfX()) > 256, "init h"); + efiAssertVoid(CUSTOM_IH_STACK, getRemainingStack(chThdGetSelfX()) > 256, "init h"); sharedLogger = l; engine_configuration_s *engineConfiguration = engine->engineConfiguration; - efiAssertVoid(CUSTOM_ERR_6678, engineConfiguration!=NULL, "engineConfiguration"); + efiAssertVoid(CUSTOM_EC_NULL, engineConfiguration!=NULL, "engineConfiguration"); board_configuration_s *boardConfiguration = &engineConfiguration->bc; printMsg(sharedLogger, "initHardware()"); diff --git a/firmware/hw_layer/microsecond_timer.cpp b/firmware/hw_layer/microsecond_timer.cpp index 515d2bb75d..d53c945d15 100644 --- a/firmware/hw_layer/microsecond_timer.cpp +++ b/firmware/hw_layer/microsecond_timer.cpp @@ -74,7 +74,7 @@ void setHardwareUsTimer(int32_t timeUs) { gptStopTimerI(&GPTDEVICE); } if (GPTDEVICE.state != GPT_READY) { - firmwareError(CUSTOM_ERR_6541, "HW timer state %d", GPTDEVICE.state); + firmwareError(CUSTOM_HW_TIMER, "HW timer state %d", GPTDEVICE.state); return; } if (hasFirmwareError())