From b757a7d21a8198df46ae5ffd10c091e4d05ae642 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Fri, 26 May 2023 10:19:02 +0900 Subject: [PATCH] AP_Scripting: mount-poi applet sends camera feedback message --- libraries/AP_Scripting/applets/mount-poi.lua | 79 ++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/libraries/AP_Scripting/applets/mount-poi.lua b/libraries/AP_Scripting/applets/mount-poi.lua index a0eb1e16d1..ebe6483f41 100644 --- a/libraries/AP_Scripting/applets/mount-poi.lua +++ b/libraries/AP_Scripting/applets/mount-poi.lua @@ -43,6 +43,81 @@ TERRAIN_SPACING = Parameter("TERRAIN_SPACING") -- local variables and definitions local last_rc_switch_pos = 0 -- last known rc switch position. Used to detect change in RC switch position +local success_count = 0 -- count of the number of POI calculations (sent to GCS in CAMERA_FEEDBACK message) + +-- mavlink message definition +-- initialise mavlink rx with number of messages, and buffer depth +mavlink.init(1, 10) +local messages = {} +messages[180] = { -- CAMERA_FEEDBACK + { "time_usec", "