AP_Scripting: Simplify the LED_roll example

This commit is contained in:
Michael du Breuil 2019-12-05 15:33:07 -07:00 committed by Randy Mackay
parent 6efbc484fd
commit 1c3287160e
1 changed files with 2 additions and 2 deletions

View File

@ -15,14 +15,14 @@ local num_leds = 30
local chan = SRV_Channels:find_channel(94)
if not chan then
gcs:send_text(6, string.format("LEDs: channel not set"))
gcs:send_text(6, "LEDs: channel not set")
return
end
-- find_channel returns 0 to 15, convert to 1 to 16
chan = chan + 1
gcs:send_text(6, string.format("LEDs: chan=" .. tostring(chan)))
gcs:send_text(6, "LEDs: chan=" .. tostring(chan))
-- initialisation code
serialLED:set_num_LEDs(chan, num_leds)