Fix bug in weight handling of error flags.

This commit is contained in:
Mario Hüttel 2021-01-25 21:07:09 +01:00
parent 55f35a5009
commit 86a0b2087e

View File

@ -907,6 +907,12 @@ static void safety_controller_handle_weighted_flags()
for (flag_index = 0u; flag_index < COUNT_OF(flags); flag_index++) { for (flag_index = 0u; flag_index < COUNT_OF(flags); flag_index++) {
current_flag = &flags[flag_index]; current_flag = &flags[flag_index];
/* Continue if this flag is not set */
if (!error_flag_get_status(current_flag)) {
continue;
}
flag_weigth = get_flag_weight(current_flag); flag_weigth = get_flag_weight(current_flag);
switch (flag_weigth) { switch (flag_weigth) {
case SAFETY_FLAG_CONFIG_WEIGHT_NONE: case SAFETY_FLAG_CONFIG_WEIGHT_NONE: