Fixed hex display of slave position; thanks to Henry Bausley. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Mon, 05 May 2014 13:55:00 +0200
branchstable-1.5
changeset 2542 8dd49f6f6d32
parent 2541 1ddd186e9d2c
child 2543 0d978e56a635
Fixed hex display of slave position; thanks to Henry Bausley.
tool/CommandXml.cpp
--- a/tool/CommandXml.cpp	Mon May 05 13:49:45 2014 +0200
+++ b/tool/CommandXml.cpp	Mon May 05 13:55:00 2014 +0200
@@ -2,7 +2,7 @@
  *
  *  $Id$
  *
- *  Copyright (C) 2006-2009  Florian Pose, Ingenieurgemeinschaft IgH
+ *  Copyright (C) 2006-2014  Florian Pose, Ingenieurgemeinschaft IgH
  *
  *  This file is part of the IgH EtherCAT Master.
  *
@@ -118,7 +118,7 @@
 
     cout
         << in << "<EtherCATInfo>" << endl
-        << in << "  <!-- Slave " << slave.position << " -->" << endl
+        << in << "  <!-- Slave " << dec << slave.position << " -->" << endl
         << in << "  <Vendor>" << endl
         << in << "    <Id>" << slave.vendor_id << "</Id>" << endl
         << in << "  </Vendor>" << endl
@@ -142,9 +142,11 @@
         m.getSync(&sync, slave.position, i);
 
         cout
-            << in << "        <Sm Enable=\"" << dec << (unsigned int) sync.enable
+            << in << "        <Sm Enable=\""
+            << dec << (unsigned int) sync.enable
             << "\" StartAddress=\"#x" << hex << sync.physical_start_address
-            << "\" ControlByte=\"#x" << hex << (unsigned int) sync.control_register
+            << "\" ControlByte=\"#x"
+            << hex << (unsigned int) sync.control_register
             << "\" DefaultSize=\"" << dec << sync.default_size
             << "\" />" << endl;
     }