Skip to content

Commit

Permalink
Fix verbose output of list_hardware_components (ros-controls#1004)
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich authored Apr 29, 2023
1 parent 3a3081b commit e376c0b
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,12 @@ def main(self, *, args):

if args.verbose:
print("\tstate interfaces")
for state_interface in component.command_interfaces:
for state_interface in component.state_interfaces:
if state_interface.is_available:
available_str = f"{bcolors.OKBLUE}[available]{bcolors.ENDC}"
else:
available_str = f"{bcolors.WARNING}[unavailable]{bcolors.ENDC}"

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}")

return 0

0 comments on commit e376c0b

Please sign in to comment.