Merge branch 'bugfix/mb_master_fix_unexpected_event_errors_on_timeout' into 'main'

fix the mb_master unexpected event messages(timeout) severity to debug

See merge request idf/esp-modbus!107
This commit is contained in:
Alex Lisitsyn
2025-03-01 00:04:03 +08:00
2 changed files with 4 additions and 4 deletions

View File

@@ -577,12 +577,12 @@ mb_err_enum_t mbm_poll(mb_base_t *inst)
break;
default:
ESP_LOGE(TAG, MB_OBJ_FMT", unexpected event triggered 0x%02x.", MB_OBJ_PARENT(inst), (int)event.event);
ESP_LOGD(TAG, MB_OBJ_FMT": Unexpected event 0x%02x or timeout?", MB_OBJ_PARENT(inst), (int)event.event);
break;
}
} else {
// Something went wrong and task unblocked but there are no any correct events set
ESP_LOGE(TAG, MB_OBJ_FMT", unexpected event triggered 0x%02x.", MB_OBJ_PARENT(inst), (int)event.event);
ESP_LOGD(TAG, MB_OBJ_FMT": Unexpected event 0x%02x or timeout?", MB_OBJ_PARENT(inst), (int)event.event);
status = MB_EILLSTATE;
}
return status;

View File

@@ -403,12 +403,12 @@ mb_err_enum_t mbs_poll(mb_base_t *inst)
break;
default:
ESP_LOGD(TAG, MB_OBJ_FMT": Unexpected event triggered 0x%02x.", MB_OBJ_PARENT(inst), (int)event.event);
ESP_LOGD(TAG, MB_OBJ_FMT": Unexpected event 0x%02x or timeout.", MB_OBJ_PARENT(inst), (int)event.event);
break;
}
} else {
// Something went wrong and task unblocked but there are no any correct events set
ESP_LOGD(TAG, MB_OBJ_FMT": Unexpected event triggered 0x%02x, timeout?", MB_OBJ_PARENT(inst), (int)event.event);
ESP_LOGD(TAG, MB_OBJ_FMT": Unexpected event 0x%02x or timeout?", MB_OBJ_PARENT(inst), (int)event.event);
status = MB_EILLSTATE;
}
return status;