diff --git a/TODO b/TODO index f133b1e80029ee7118d2d70999531d5d0262f8dd..8db03535a57cb8b2ccf0f038f0aeb5302ca16613 100644 --- a/TODO +++ b/TODO @@ -20,7 +20,6 @@ Version 1.4.0: * Distributed clocks. * Fix datagram errors on application loading/unloading. * Race in jiffies frame timeout? -* Break 'ethercat domain' output at 16 bytes. Future issues: diff --git a/tools/Master.cpp b/tools/Master.cpp index ae730169a1566930520aba3acc78dcffc9732689..47cfa308c21c7ddcaa327a47780d2637611d6df7 100644 --- a/tools/Master.cpp +++ b/tools/Master.cpp @@ -1238,6 +1238,8 @@ void Master::showDomain(unsigned int domainIndex) cout << " " << hex << setfill('0'); for (j = 0; j < fmmu.data_size; j++) { + if (j && !(j % BreakAfterBytes)) + cout << endl << " "; cout << setw(2) << (unsigned int) *(processData + dataOffset + j) << " "; } diff --git a/tools/Master.h b/tools/Master.h index 6524b62446e9f30b8d5c926d900d6309eec5d728..a4b3ed89bf34c57986f53f9833f5e3a9f51266aa 100644 --- a/tools/Master.h +++ b/tools/Master.h @@ -74,6 +74,7 @@ class Master void showDetailedConfigs(); void listConfigs(); void outputDomainData(unsigned int); + enum {BreakAfterBytes = 16}; void showDomain(unsigned int); void listSlavePdos(uint16_t, bool = false); void listSlaveSdos(uint16_t, bool = false);