Skip to content
Snippets Groups Projects
Commit f2a52ac5 authored by Florian Pose's avatar Florian Pose
Browse files

Output AL status code zero.

parent dec1fb3a
No related branches found
No related tags found
No related merge requests found
...@@ -389,18 +389,16 @@ void ec_fsm_change_state_code(ec_fsm_change_t *fsm ...@@ -389,18 +389,16 @@ void ec_fsm_change_state_code(ec_fsm_change_t *fsm
if (datagram->working_counter != 1) { if (datagram->working_counter != 1) {
EC_WARN("Reception of AL status code datagram failed: "); EC_WARN("Reception of AL status code datagram failed: ");
ec_datagram_print_wc_error(datagram); ec_datagram_print_wc_error(datagram);
} } else {
else { code = EC_READ_U16(datagram->data);
if ((code = EC_READ_U16(datagram->data))) { for (al_msg = al_status_messages; al_msg->code; al_msg++) {
for (al_msg = al_status_messages; al_msg->code; al_msg++) { if (al_msg->code != code) continue;
if (al_msg->code != code) continue; EC_ERR("AL status message 0x%04X: \"%s\".\n",
EC_ERR("AL status message 0x%04X: \"%s\".\n", al_msg->code, al_msg->message);
al_msg->code, al_msg->message); break;
break;
}
if (!al_msg->code)
EC_ERR("Unknown AL status code 0x%04X.\n", code);
} }
if (!al_msg->code)
EC_ERR("Unknown AL status code 0x%04X.\n", code);
} }
// acknowledge "old" slave state // acknowledge "old" slave state
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment