mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Scripting: Simplify the LED_roll example
This commit is contained in:
parent
6efbc484fd
commit
1c3287160e
@ -15,14 +15,14 @@ local num_leds = 30
|
|||||||
local chan = SRV_Channels:find_channel(94)
|
local chan = SRV_Channels:find_channel(94)
|
||||||
|
|
||||||
if not chan then
|
if not chan then
|
||||||
gcs:send_text(6, string.format("LEDs: channel not set"))
|
gcs:send_text(6, "LEDs: channel not set")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- find_channel returns 0 to 15, convert to 1 to 16
|
-- find_channel returns 0 to 15, convert to 1 to 16
|
||||||
chan = chan + 1
|
chan = chan + 1
|
||||||
|
|
||||||
gcs:send_text(6, string.format("LEDs: chan=" .. tostring(chan)))
|
gcs:send_text(6, "LEDs: chan=" .. tostring(chan))
|
||||||
|
|
||||||
-- initialisation code
|
-- initialisation code
|
||||||
serialLED:set_num_LEDs(chan, num_leds)
|
serialLED:set_num_LEDs(chan, num_leds)
|
||||||
|
Loading…
Reference in New Issue
Block a user