ardupilot/libraries/AP_Scripting/examples/ahrs-set-home-to-vehicle-location.lua
CallanDaniel d1a228b086 AP_Scripting: add get_origin and set_home bindings
added bindings and example scripts for set_home and get_origin
2021-07-04 08:19:10 +10:00

15 lines
312 B
Lua

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