/
Sangak
/
ardupilot
Обзор
Документация
Войти
/
Sangak
/
ardupilot
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
libraries/AP_Scripting/examples/test_get_target_location.lua
16 строк
493 B
TsuyoshiKawamura
AP_Scripting: add test samples of get_target_location/update_target_location for copter
25 июн 2024, 02:29
25 июн 2024, 02:29
b9bf7ac
Код
Авторство
О чём код?
-- test get_target_location functions for copter -- https://discuss.ardupilot.org/t/vehicle-get-target-location-in-lua-copter/108901 function update() local next_WP = vehicle:get_target_location() if not next_WP then -- not in a flight mode with a target location gcs:send_text(0,"not in a flight mode with target loc") else gcs:send_text(0,"target loc : " .. next_WP:lat() .. " ; " .. next_WP:lng()) end return update, 10000 end return update()