ardupilot/libraries/AP_Scripting/examples/ahrs-set-home-to-vehicle-lo...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
357 B
Lua
Raw Normal View History

-- example script for using "set_home()"
-- sets the home location to the current vehicle location every 5 seconds
---@diagnostic disable: param-type-mismatch
function update ()
if ahrs:home_is_set() then
ahrs:set_home(ahrs:get_location())
gcs:send_text(0, "Home position reset")
end
return update, 5000
end
return update()