Skip to content

Commit

Permalink
Fix clang format
Browse files Browse the repository at this point in the history
Add printout for interactive mode
  • Loading branch information
nilsjor committed Aug 29, 2023
1 parent b282dce commit f601d2c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/controller/launcher/webots_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,16 @@ static bool parse_options(int nb_arguments, char **arguments) {

// Show resulting target options to user
const char *location = strncmp(protocol, "tcp", 3) == 0 ? "remote" : "local";
printf("\nThe started controller targets a %s instance (%s protocol) of Webots with port number %s. ", location, protocol, port);
strncmp(protocol, "tcp", 3) == 0 ? printf(" The IP address of the remote Webots instance is '%s'.\n\n", ip_address) :
printf("\n\n");
printf("\nThe started controller targets a %s instance (%s protocol) of Webots with port number %s.", location, protocol,
port);
strncmp(protocol, "tcp", 3) == 0 ? printf(" The IP address of the remote Webots instance is '%s'.\n", ip_address) :
printf("\n");
robot_name ? printf("Targeting robot '%s'.\n", robot_name) :
printf("Targeting the only robot waiting for an extern controller.\n");

if (matlab_args)
printf("Running MATLAB in interactive mode...\n");

free(protocol);
free(ip_address);
free(port);
Expand Down

0 comments on commit f601d2c

Please sign in to comment.