AP_Scripting: update examples for new nav_script_time
This commit is contained in:
parent
680278023f
commit
f57935d406
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user