Skip to content

Commit

Permalink
AP_Scripting: copter-posoffset uses pos-vel-accel offset targets
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed Sep 13, 2024
1 parent 0bc54a8 commit 7a94274
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/AP_Scripting/examples/copter-posoffset.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function update()
local pos_offset_NED = Vector3f()
pos_offset_NED:x(PSC_OFS_POS_N:get())
pos_offset_NED:y(PSC_OFS_POS_E:get())
if not vehicle:set_pos_offset(pos_offset_NED) then
if not vehicle:set_posvelaccel_offset(pos_offset_NED, Vector3f(), Vector3f()) then
gcs:send_text(MAV_SEVERITY.ERROR, "copter-posoffset: failed to set pos offset")
end
test_position = not pos_offsets_zero
Expand All @@ -91,7 +91,7 @@ function update()
local vel_offset_NED = Vector3f()
vel_offset_NED:x(PSC_OFS_VEL_N:get())
vel_offset_NED:y(PSC_OFS_VEL_E:get())
if not vehicle:set_vel_offset(vel_offset_NED) then
if not vehicle:set_velaccel_offset(vel_offset_NED, Vector3f()) then
gcs:send_text(MAV_SEVERITY.ERROR, "copter-posoffset: failed to set vel offset")
end
end
Expand Down

0 comments on commit 7a94274

Please sign in to comment.