Skip to content

Commit

Permalink
changed color scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
soham2560 committed Feb 21, 2024
1 parent 1a22013 commit 7be93b2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ros2controlcli/ros2controlcli/verb/list_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@


def print_controller_state(c, args):
state_color = bcolors.OKGREEN if c.state == "active" else bcolors.FAIL
state_color = ""
if c.state == "active":
state_color = bcolors.OKGREEN
elif c.state == "inactive":
state_color = bcolors.OKCYAN
elif c.state == "unconfigured":
state_color = bcolors.WARNING

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:")
Expand Down

0 comments on commit 7be93b2

Please sign in to comment.