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 9a44085
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion 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);
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");
robot_name ? printf("Targeting robot '%s'.\n", robot_name) :
printf("Targeting the only robot waiting for an extern controller.\n");

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

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

0 comments on commit 9a44085

Please sign in to comment.