Skip to content

Commit

Permalink
added spawner colors to list_controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
soham2560 committed Feb 21, 2024
1 parent c4affe4 commit d2df28d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ros2controlcli/ros2controlcli/verb/list_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@


def print_controller_state(c, args):
print(f"{c.name:20s}[{c.type:20s}] {c.state:10s}")
state_color = bcolors.OKGREEN if c.state == "active" else bcolors.FAIL
print(f"{c.name:20s}[{c.type:20s}] {state_color}{c.state:10s}{bcolors.ENDC}")
if args.claimed_interfaces or args.verbose:
print("\tclaimed interfaces:")
for claimed_interface in c.claimed_interfaces:
Expand Down

0 comments on commit d2df28d

Please sign in to comment.