Skip to content

Commit 71b64ba

Browse files
committed
mavproxy_link: use numeric code for green
unreadable on Window's concept of "green", so I swiped the RGB values from Linux
1 parent d5adb8a commit 71b64ba

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: MAVProxy/modules/mavproxy_link.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,9 @@ def handle_msec_timestamp(self, m, master):
566566
master.link_delayed = False
567567

568568
def colors_for_severity(self, severity):
569+
# Windows and Linux have wildly difference concepts of
570+
# "green",so use specific RGB values:
571+
green = (0, 128, 0)
569572
severity_colors = {
570573
# tuple is (fg, bg) (as in "white on red")
571574
mavutil.mavlink.MAV_SEVERITY_EMERGENCY: ('white', 'red'),
@@ -574,8 +577,8 @@ def colors_for_severity(self, severity):
574577
mavutil.mavlink.MAV_SEVERITY_ERROR: ('black', 'orange'),
575578
mavutil.mavlink.MAV_SEVERITY_WARNING: ('black', 'orange'),
576579
mavutil.mavlink.MAV_SEVERITY_NOTICE: ('black', 'yellow'),
577-
mavutil.mavlink.MAV_SEVERITY_INFO: ('white', 'green'),
578-
mavutil.mavlink.MAV_SEVERITY_DEBUG: ('white', 'green'),
580+
mavutil.mavlink.MAV_SEVERITY_INFO: ('white', green),
581+
mavutil.mavlink.MAV_SEVERITY_DEBUG: ('white', green),
579582
}
580583
try:
581584
return severity_colors[severity]

0 commit comments

Comments
 (0)