diff --git a/firmware/controllers/algo/obd_error_codes.h b/firmware/controllers/algo/obd_error_codes.h index 580a41f82e..115e658df5 100644 --- a/firmware/controllers/algo/obd_error_codes.h +++ b/firmware/controllers/algo/obd_error_codes.h @@ -1818,8 +1818,8 @@ typedef enum { CUSTOM_ERR_6138 = 6138, CUSTOM_ERR_6139 = 6139, - CUSTOM_ERR_6140 = 6140, - CUSTOM_ERR_6141 = 6141, + CUSTOM_ERR_TOO_FEW_EVENTS = 6140, + CUSTOM_ERR_FLASH_CRC_FAILED = 6141, CUSTOM_ERR_6142 = 6142, CUSTOM_ERR_6143 = 6143, CUSTOM_ERR_6144 = 6144, diff --git a/firmware/controllers/flash_main.cpp b/firmware/controllers/flash_main.cpp index c26f4277e9..71f9dc4590 100644 --- a/firmware/controllers/flash_main.cpp +++ b/firmware/controllers/flash_main.cpp @@ -110,6 +110,7 @@ persisted_configuration_state_e readConfiguration(Logging * logger) { persisted_configuration_state_e result; if (!isValidCrc(&persistentState)) { result = CRC_FAILED; + warning(CUSTOM_ERR_FLASH_CRC_FAILED, "flash CRC failed"); resetConfigurationExt(logger, DEFAULT_ENGINE_TYPE PASS_ENGINE_PARAMETER); } else if (persistentState.version != FLASH_DATA_VERSION || persistentState.size != PERSISTENT_SIZE) { result = INCOMPATIBLE_VERSION; diff --git a/firmware/controllers/trigger/trigger_structure.cpp b/firmware/controllers/trigger/trigger_structure.cpp index d3433dc37d..4be09f2aad 100644 --- a/firmware/controllers/trigger/trigger_structure.cpp +++ b/firmware/controllers/trigger/trigger_structure.cpp @@ -82,11 +82,11 @@ void TriggerShape::calculateTriggerSynchPoint(TriggerState *state DECLARE_ENGINE } int totalExpected = 0; - for (int i = 0;i