Fixed AL state display in command-line tool.
This commit is contained in:
parent
aee116c04b
commit
5d86266163
1
TODO
1
TODO
|
|
@ -42,7 +42,6 @@ Version 1.5.0:
|
|||
* recompile tool/CommandVersion.cpp if revision changes.
|
||||
* Log SoE IDNs with real name ([SP]-x-yyyy).
|
||||
* Output SoE IDN configurations in 'ethercat config'.
|
||||
* Output AL status error flag correctly in 'ethercat slaves'.
|
||||
* Fix casting away constness during expected WC calculation.
|
||||
|
||||
Future issues:
|
||||
|
|
|
|||
|
|
@ -371,14 +371,22 @@ Command::DomainList Command::selectedDomains(MasterDevice &m)
|
|||
|
||||
string Command::alStateString(uint8_t state)
|
||||
{
|
||||
switch (state) {
|
||||
case 1: return "INIT";
|
||||
case 2: return "PREOP";
|
||||
case 3: return "BOOT";
|
||||
case 4: return "SAFEOP";
|
||||
case 8: return "OP";
|
||||
default: return "???";
|
||||
string ret;
|
||||
|
||||
switch (state & EC_SLAVE_STATE_MASK) {
|
||||
case 1: ret = "INIT"; break;
|
||||
case 2: ret = "PREOP"; break;
|
||||
case 3: ret = "BOOT"; break;
|
||||
case 4: ret = "SAFEOP"; break;
|
||||
case 8: ret = "OP"; break;
|
||||
default: ret = "???";
|
||||
}
|
||||
|
||||
if (state & EC_SLAVE_STATE_ACK_ERR) {
|
||||
ret += "+ERROR";
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -330,10 +330,7 @@ void CommandConfig::listConfigs(
|
|||
str.clear();
|
||||
str.str("");
|
||||
|
||||
str << alStateString(slave.al_state);
|
||||
info.state = str.str();
|
||||
str.clear();
|
||||
str.str("");
|
||||
info.state = alStateString(slave.al_state);
|
||||
} else {
|
||||
str << "-";
|
||||
info.slavePos = str.str();
|
||||
|
|
|
|||
Loading…
Reference in New Issue