mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Scripting: move location_update to Location and rename to offset_bearing
This commit is contained in:
parent
72e4e69add
commit
3e122c19f3
@ -1,6 +1,7 @@
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <GCS_MAVLink/GCS.h>
|
||||
#include <SRV_Channel/SRV_Channel.h>
|
||||
#include <AP_Common/Location.h>
|
||||
|
||||
#include "lua_bindings.h"
|
||||
|
||||
@ -230,9 +231,7 @@ static int location_project(lua_State *L) {
|
||||
return luaL_argerror(L, args, "too many arguments");
|
||||
}
|
||||
|
||||
location_update(*check_location(L, -3),
|
||||
luaL_checknumber(L, -2),
|
||||
luaL_checknumber(L, -1));
|
||||
(*check_location(L, -3)).offset_bearing(luaL_checknumber(L, -2), luaL_checknumber(L, -1));
|
||||
|
||||
lua_pop(L, 2);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user