AP_Scripting: update examples for new nav_script_time

This commit is contained in:
Andrew Tridgell 2022-10-14 11:38:20 +11:00
parent 680278023f
commit f57935d406
4 changed files with 4 additions and 4 deletions

View File

@ -460,7 +460,7 @@ function resolve_jump(i)
end
function update()
id, cmd, arg1, arg2 = vehicle:nav_script_time()
id, cmd, arg1, arg2, arg3, arg4 = vehicle:nav_script_time()
if id then
if id ~= last_id then
-- we've started a new command

View File

@ -1033,7 +1033,7 @@ function save_parameters(arg1, arg2)
end
function update()
id, cmd, arg1, arg2 = vehicle:nav_script_time()
id, cmd, arg1, arg2, arg3, arg4 = vehicle:nav_script_time()
if id then
if id ~= last_id then
-- we've started a new command

View File

@ -83,7 +83,7 @@ function update()
end
else
-- activate_type 1: reset stage when disarmed or not in Auto executing NAV_SCRIPT_TIME command
auto_last_id, cmd, arg1, arg2 = vehicle:nav_script_time()
auto_last_id, cmd, arg1, arg2, arg3, arg4 = vehicle:nav_script_time()
if not arming:is_armed() or not auto_last_id then
stage = 0
if (update_user and arming:is_armed()) then

View File

@ -24,7 +24,7 @@ local stage = 0 -- stage0: fly North arg2 meters
local prev_stage = -1 -- previous stage, used to initate call to move to next corner
function update()
id, cmd, arg1, arg2 = vehicle:nav_script_time()
id, cmd, arg1, arg2, arg3, arg4 = vehicle:nav_script_time()
if id then
-- handle start of new command
if id ~= last_id then