AP_Scripting: add simple example of a loop

This commit is contained in:
Peter Barker 2019-10-22 02:26:31 +11:00 committed by Peter Barker
parent 7842d07b12
commit 099379713c
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
-- This script is an example of saying hello. A lot.
function update() -- this is the loop which periodically runs
gcs:send_text(0, "hello, world") -- send the traditional message
return update, 1000 -- reschedules the loop
end
return update() -- run immediately before starting to reschedule