Client: add response for led_fill command

This commit is contained in:
leonidrogov
2019-06-14 18:50:35 +03:00
parent ede64e5716
commit 22557f9aa1

View File

@@ -84,6 +84,28 @@ def _command_led_test(*args, **kwargs):
time.sleep(2)
LedLib.off()
@messaging.message_callback("led_fill")
def _command_emergency_led_fill(**kwargs):
r = g = b = 0
try:
r = kwargs["red"]
except KeyError:
pass
try:
g = kwargs["green"]
except KeyError:
pass
try:
b = kwargs["blue"]
except KeyError:
pass
LedLib.fill(r, g, b)
@messaging.message_callback("flip")
def _copter_flip():
FlightLib.flip()