Skip to content

Commit

Permalink
Change debug print behavior
Browse files Browse the repository at this point in the history
The debug printout is no lonager dependend on a external define, instead the
debug prints are printed at the highest verbosity level.
  • Loading branch information
fjes committed Feb 14, 2017
1 parent 46687c9 commit 5078884
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions libethercat_wrapper/src/testlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,22 +377,22 @@ int main(int argc, char **argv)
return 1;
}

#ifdef DEBUG_APP
printf("\nPrint bus topology\n");
ecw_print_topology(master);
printf("\nprint domain registries\n");
ecw_print_domainregs(master);
printf("\nPrint all slaves object dictionary\n");
ecw_print_allslave_od(master);

/* master information */
get_master_information(master);
for (int i = 0; i < ecw_master_slave_count(master); i++) {
get_slave_information(master, i);
}
if (g_dbglvl >= 3) {
printf("\nPrint bus topology\n");
ecw_print_topology(master);
printf("\nprint domain registries\n");
ecw_print_domainregs(master);
printf("\nPrint all slaves object dictionary\n");
ecw_print_allslave_od(master);

/* master information */
get_master_information(master);
for (int i = 0; i < ecw_master_slave_count(master); i++) {
get_slave_information(master, i);
}

read_object_dictionary(master);
#endif /* DEBUG_APP */
read_object_dictionary(master);
}

/*
* Activate master and start operation
Expand Down

0 comments on commit 5078884

Please sign in to comment.