Commit b95035c3 authored by Claes Sjofors's avatar Claes Sjofors

Profinet viewer, option -h added, and macaddress viewed with colon

parent dcedd225
...@@ -94,7 +94,11 @@ int main( int argc, char *argv[]) ...@@ -94,7 +94,11 @@ int main( int argc, char *argv[])
CoXHelpGtk::set_default( xhelp); CoXHelpGtk::set_default( xhelp);
for ( i = 1; i < argc; i++) { for ( i = 1; i < argc; i++) {
if ( strcmp( argv[i], "-l") == 0) { if ( strcmp( argv[i], "-h") == 0) {
usage();
exit(0);
}
else if ( strcmp( argv[i], "-l") == 0) {
if ( i+1 >= argc) { if ( i+1 >= argc) {
usage(); usage();
exit(0); exit(0);
......
...@@ -829,7 +829,7 @@ ItemDevice::ItemDevice( PnViewerNav *item_viewernav, const char *item_name, ...@@ -829,7 +829,7 @@ ItemDevice::ItemDevice( PnViewerNav *item_viewernav, const char *item_name,
memcpy( macaddress, item_macaddress, sizeof(macaddress)); memcpy( macaddress, item_macaddress, sizeof(macaddress));
sprintf( ipaddress_str, "%hhu.%hhu.%hhu.%hhu", sprintf( ipaddress_str, "%hhu.%hhu.%hhu.%hhu",
item_ipaddress[3], item_ipaddress[2], item_ipaddress[1], item_ipaddress[0]); item_ipaddress[3], item_ipaddress[2], item_ipaddress[1], item_ipaddress[0]);
sprintf( macaddress_str, "%02hhX-%02hhX-%02hhX-%02hhX-%02hhX-%02hhX", sprintf( macaddress_str, "%02hhX:%02hhX:%02hhX:%02hhX:%02hhX:%02hhX",
item_macaddress[5], item_macaddress[4], item_macaddress[3], item_macaddress[5], item_macaddress[4], item_macaddress[3],
item_macaddress[2], item_macaddress[1], item_macaddress[0]); item_macaddress[2], item_macaddress[1], item_macaddress[0]);
sprintf( deviceid_str, "%d", deviceid); sprintf( deviceid_str, "%d", deviceid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment