Skip to content

Commit

Permalink
Fix verbose output of list_hardware_components (#1004)
Browse files Browse the repository at this point in the history
(cherry picked from commit e376c0b)

# Conflicts:
#	ros2controlcli/ros2controlcli/verb/list_hardware_components.py
  • Loading branch information
christophfroehlich authored and mergify[bot] committed Apr 29, 2023
1 parent 4e510fb commit c224deb
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,28 @@ def main(self, *, args):
print(f'\t\t{cmd_interface.name} {available_str} {claimed_str}')

if args.verbose:
<<<<<<< HEAD
print('\tstate interfaces')
for state_interface in component.command_interfaces:

=======
print("\tstate interfaces")
for state_interface in component.state_interfaces:
>>>>>>> e376c0b (Fix verbose output of list_hardware_components (#1004))
if state_interface.is_available:
available_str = f'{bcolors.OKBLUE}[available]{bcolors.ENDC}'
else:
available_str = f'{bcolors.WARNING}[unavailable]{bcolors.ENDC}'

<<<<<<< HEAD
if state_interface.is_claimed:
claimed_str = f'{bcolors.OKBLUE}[claimed]{bcolors.ENDC}'
else:
claimed_str = '[unclaimed]'

print(f'\t\t{state_interface.name} {available_str} {claimed_str}')
=======
print(f"\t\t{state_interface.name} {available_str}")
>>>>>>> e376c0b (Fix verbose output of list_hardware_components (#1004))

return 0

0 comments on commit c224deb

Please sign in to comment.