diff --git a/firmware/controllers/algo/obd_error_codes.h b/firmware/controllers/algo/obd_error_codes.h index 1a59e22934..c29b5890ca 100644 --- a/firmware/controllers/algo/obd_error_codes.h +++ b/firmware/controllers/algo/obd_error_codes.h @@ -2062,6 +2062,17 @@ typedef enum { CUSTOM_ERR_6688 = 6688, CUSTOM_ERR_6689 = 6689, + CUSTOM_ERR_6690 = 6660, + CUSTOM_ERR_6691 = 6661, + CUSTOM_ERR_6692 = 6662, + CUSTOM_ERR_6693 = 6663, + CUSTOM_ERR_6694 = 6664, + CUSTOM_ERR_6695 = 6665, + CUSTOM_ERR_6696 = 6666, + CUSTOM_ERR_6697 = 6667, + CUSTOM_ERR_6698 = 6668, + CUSTOM_ERR_6700 = 6669, + // this is needed for proper enum size, this matters for malfunction_central Internal_ForceMyEnumIntSize_cranking_obd_code = ENUM_32_BITS, } obd_code_e; diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index ebc7d2bb95..82408ea69b 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -736,5 +736,5 @@ int getRusEfiVersion(void) { if (initBootloader() != 0) return 123; #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ - return 20181030; + return 20181120; } diff --git a/firmware/controllers/map_averaging.cpp b/firmware/controllers/map_averaging.cpp index 7776aae295..96e7132434 100644 --- a/firmware/controllers/map_averaging.cpp +++ b/firmware/controllers/map_averaging.cpp @@ -228,11 +228,14 @@ void refreshMapAveragingPreCalc(DECLARE_ENGINE_PARAMETER_SIGNATURE) { if (isValidRpm(rpm)) { MAP_sensor_config_s * c = &engineConfiguration->map; angle_t start = interpolate2d("mapa", rpm, c->samplingAngleBins, c->samplingAngle, MAP_ANGLE_SIZE); + efiAssertVoid(CUSTOM_ERR_6690, !cisnan(start), "start"); angle_t offsetAngle = TRIGGER_SHAPE(eventAngles[CONFIG(mapAveragingSchedulingAtIndex)]); + efiAssertVoid(CUSTOM_ERR_6691, !cisnan(offsetAngle), "offsetAngle"); for (int i = 0; i < engineConfiguration->specs.cylindersCount; i++) { angle_t cylinderOffset = getEngineCycle(engineConfiguration->operationMode) * i / engineConfiguration->specs.cylindersCount; + efiAssertVoid(CUSTOM_ERR_6692, !cisnan(cylinderOffset), "cylinderOffset"); float cylinderStart = start + cylinderOffset - offsetAngle + tdcPosition(); fixAngle(cylinderStart, "cylinderStart", CUSTOM_ERR_6562); engine->engineState.mapAveragingStart[i] = cylinderStart;