Skip to content

Commit

Permalink
AP_Scripting: merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed Jul 27, 2024
1 parent 08d120b commit a4fcb6d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libraries/AP_Scripting/applets/slung-payload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ function handle_global_position_int(msg)
return true
end

-- update function to receive location from payload and move vehicle to reduce payload's oscillation
function update()

-- consume mavlink messages from payload
local msg, chan = mavlink:receive_chan()
if (msg ~= nil) then
local parsed_msg = mavlink_msgs.decode(msg, msg_map)
Expand All @@ -92,6 +95,11 @@ function update()
end
end

-- if vehicle is in GUIDED mode and payload's location has been received recently
-- run controller to calculate vehicle's desired velocity
-- apply acceleration limit to the desired velocity
-- send desired velocity to vehicle

return update, UPDATE_INTERVAL_MS
end

Expand Down

0 comments on commit a4fcb6d

Please sign in to comment.