From 7c3838c796463a6296786dafcb187aa1b2f515b3 Mon Sep 17 00:00:00 2001 From: Florian Pose <fp@igh-essen.com> Date: Fri, 27 Jun 2008 09:37:53 +0000 Subject: [PATCH] Removed TODOx:y-Output. --- TODO | 1 - tools/Master.cpp | 23 +++++++++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/TODO b/TODO index b2e800bb..900fb787 100644 --- a/TODO +++ b/TODO @@ -16,7 +16,6 @@ Version 1.4.0: * READMEs for examples. * Update documentation. * Overthink display style of hex numbers. -* Remove #x:y alias output. * Add -a and -p switches for 'ethercat config' command. * Race in jiffies frame timeout. * FoE diff --git a/tools/Master.cpp b/tools/Master.cpp index 246ed359..e85fbb20 100644 --- a/tools/Master.cpp +++ b/tools/Master.cpp @@ -1377,17 +1377,13 @@ void Master::listSlaves(int slavePosition) str.clear(); str.str(""); - if (lastAlias) { - str << "#" << hex << lastAlias; - slaveInfo.alias = str.str(); - str.str(""); - str << ":" << dec << aliasIndex; - slaveInfo.relPos = str.str(); - str.str(""); - } else { - slaveInfo.alias = ""; - slaveInfo.relPos = ""; - } + str << lastAlias; + slaveInfo.alias = str.str(); + str.str(""); + + str << aliasIndex; + slaveInfo.relPos = str.str(); + str.str(""); slaveInfo.state = slaveState(slave.state); slaveInfo.flag = (slave.error_flag ? 'E' : '+'); @@ -1415,15 +1411,14 @@ void Master::listSlaves(int slavePosition) maxStateWidth = slaveInfo.state.length(); } - if (lastAlias) - aliasIndex++; + aliasIndex++; } for (iter = slaveInfoList.begin(); iter != slaveInfoList.end(); iter++) { cout << setfill(' ') << right << setw(maxPosWidth) << iter->pos << " " << setw(maxAliasWidth) << iter->alias - << left + << ":" << left << setw(maxRelPosWidth) << iter->relPos << " " << setw(maxStateWidth) << iter->state << " " << iter->flag << " " -- GitLab