Commit Graph
207 Commits
Author SHA1 Message Date
Randy Mackay 81ae1e71d0 AP_Mount: handle attitude nan check fix 2026-07-03 10:31:21 +10:00
Peter Barker 241f3566e0 AP_Mount: add support for MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET 2026-06-03 09:54:28 +10:00
Peter Barker ecd3a4a950 AP_Mount: allow script-defined gimbals to specify target types
this allows a script which converts ArduPilot targets into a wire protocol to send to a gimbal to tell ArduPilot what sorts of targets the script/gimbal can understand.

For example, if the gimbal being controlled can understand a lat/lng/alt, the script can tell ArduPilot that with the new method call.
2026-04-07 10:44:42 +10:00
Peter BarkerandClaude Sonnet 4.6 7ae671e53f AP_Mount: gate get_angle/rate_target behind AP_SCRIPTING_ENABLED; scripting backend fully self-contained
get_angle_target() and get_rate_target() in AP_Mount_Backend and AP_Mount
are now declared and defined only when AP_SCRIPTING_ENABLED is set,
matching the existing treatment of get_location_target().

AP_Mount_Backend::write_log() read mnt_target directly when scripting is
not compiled in, avoiding the dependency on those methods.

AP_Mount_Scripting gains its own ScriptTargetType enum and
_angle_target/_rate_target members.  send_target_angles() and
send_target_rates() now store the pushed target into those members.
get_angle_target() / get_rate_target() overrides return the stored values,
removing the previous hack of stamping mnt_target.target_type = ANGLE
inside send_target_angles().  _script_target_type is reset to NONE at the
top of each update() cycle so stale targets are never returned.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 15:46:16 +09:00
Hunter McClelland 1c40cb2edd AP_Mount: Centralize getting device by mavlink id 2026-02-17 23:26:12 -08:00
Henry Wurzburg eec2cfb885 AP_Mount: add mount POI lock Aux Func/Switch 2026-01-19 18:29:05 -05:00
Randy Mackay 3dbe2519c3 AP_Mount: rename gremsy backend to mavlink 2025-12-02 21:43:07 +11:00
Henry Wurzburg 733ba5beac AP_Mount: CADDX mount R/P earth frame lock options and control 2025-12-02 13:58:02 +09:00
neo-0007 c8fd61f218 AP_Mount: fix get_location_target and remove unnecessary state variables
Fix the broken get_location_target method and move it up to generic
backend so that can be used by all backends

Remove flag variables that were used to determine valid or invalid
Location variables and use the initialized() method instead.

Should fix #31535

Signed-off-by: neo-0007 <hrishikeshgohain123@gmail.com>
2025-11-27 10:14:20 +11:00
Randy Mackay f623e60478 AP_Mount: XFRobot mount driver 2025-03-27 09:08:32 +09:00
Peter Barker 786df975f0 AP_Mount: remove MOUNT_CONFIGURE and MOUNT_CONTROL support 2025-01-03 14:18:25 +11:00
Henry WurzburgandRandy Mackay f3c837ed80 AP_Mount: add CADDX gimbal support
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2025-01-02 22:18:19 +11:00
Randy Mackay 5a1a8d1c10 AP_Mount: add get_attitude_quaternion method 2024-12-10 19:57:06 +09:00
Peter Barker 99e314f49a AP_Mount: tidy header includes
our pattern is to include the config file and then use the relevant define, with nothing in between
2024-11-12 13:02:43 +11:00
Randy Mackay aa65a2ab54 AP_Mount: siyi supports camera-thermal-range 2024-09-10 20:59:49 +09:00
Randy Mackay 1f14c2ca6b AP_Mount: Siyi implements change_setting 2024-09-03 09:04:39 +09:00
mduclehcm 25a406e633 AP_Mount: Conditionally define serial_instance to fix unused variable compile error
- Wrapped the definition of `serial_instance` with preprocessor directives to ensure it is only defined when necessary.
- This resolves the compile error caused by the unused variable when no features requiring `serial_instance` are enabled.
2024-07-25 09:35:46 +10:00
muramura 9f6edd8d55 AP_Mount: Increment the serial instance 2024-07-10 08:31:25 +09:00
laozhouandRandy Mackay 611fb94660 AP_Mount: integrate topotek gimbal driver
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2024-07-09 09:08:51 +10:00
Andrew Tridgell 28da263e16 AP_Mount: use NEW_NOTHROW for new(std::nothrow) 2024-06-04 09:20:21 +10:00
Randy Mackay 72b5efd8b3 AP_Mount: serial backends gets instance 2024-05-22 18:00:22 +10:00
James O'Shannessy a5e11911fc AP_Mount: Only save converted mount if mount was previously set in the first place
The mount library force configures the mount type on conversion, even if the mount was never configured in the first place
2024-05-22 17:11:40 +10:00
Nick Exton 8b5539c055 AP_Mount: Clarify angle frames of set_angle_target() 2024-05-21 14:28:38 +10:00
Randy Mackayanddavidsastresas c392089ae7 AP_Mount: do-gimbal-manager-pitch-yaw can set lock state
Co-authored-by: davidsastresas <davidsastresas@gmail.com>
2024-03-26 10:49:30 +11:00
Randy Mackay d0d33b0b36 AP_Mount: clarify yaw_lock comments 2024-03-26 10:49:30 +11:00
Randy Mackay a6a5cde34c AP_Mount: add set_camera_source support 2024-03-25 09:19:18 +09:00
Randy Mackay f9198b7e4e AP_Mount: add set_rangefinder_enable for ViewPro 2024-03-22 14:55:43 +09:00
Peter Barker a6db3bd069 AP_Mount: allow compilation with HAL_LOGGING_ENABLED false 2024-01-17 18:25:55 +11:00
Peter Barker 2332ea7942 AP_Mount: add missing include 2024-01-11 15:29:54 +11:00
Nick Exton ac313b6d7a AP_Mount: Add handler for CAMERA_CAPTURE_STATUS request 2023-11-09 13:00:57 +09:00
olliw42 4ffdb65288 AP_Mount: gimbal_manager_set_pitchyaw is not a command 2023-11-06 08:32:04 +09:00
Asif KhanandRandy Mackay eb5ead462b AP_Mount: add get_poi
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2023-11-02 15:54:37 +11:00
Nick Exton 5b28086131 AP_Mount: Remove handler for DO_SET_ROI_NONE 2023-10-30 08:28:23 +09:00
Peter Barker d1bcd2c5e1 AP_Mount: allow more libraries to compile with no HAL_GCS_ENABLED 2023-09-05 22:23:51 +10:00
Peter Barker 02d0a07083 AP_Mount: add build options for deprecated messages MOUNT_CONTROL/MOUNT_CONFIGURE
these are repalced by the command equivalents
2023-08-29 11:06:13 +10:00
Asif Khan 3927521aa6 AP_Mount: move handling of all do-set-roi to AP_Mount library 2023-08-26 17:55:53 +10:00
Peter Barker 02d1eca49b AP_Mount: accept mount commands as command_int 2023-08-24 22:07:12 +10:00
Randy Mackay 9d09739044 AP_Mount: Viewpro supports get rangefinder distance 2023-08-23 18:09:56 +10:00
olliw42 e2599252a1 AP_Mount: use backend instead of _backends[instance] 2023-08-11 07:55:05 +09:00
Asif Khan f26528edba AP_Mount: fix GIMBAL_MANAGER_SET_PITCHYAW not working correctly when using multiple gimbals 2023-08-09 10:03:34 +09:00
Asif Khan ea9f4a79f5 AP_Mount: fix sending camera information and settings for each backend 2023-08-09 10:03:34 +09:00
Randy Mackay 315d972c5d AP_Mount: add set lens support 2023-07-26 20:20:13 +09:00
Asif Khan fd6db1ef45 AP_Mount: add MNT log msg for mount's actual and target angles logging 2023-07-26 17:33:18 +10:00
Randy Mackay a8bb79b9ab AP_Mount: add viewpro cpp driver 2023-07-18 21:02:02 +09:00
Randy Mackay ddb91afdde AP_Mount: add set_tracking accessor 2023-07-18 21:02:02 +09:00
Peter Barker 485fee36ab AP_Mount: add and use SetFocusResult 2023-07-05 16:28:42 +10:00
Randy Mackay bb8319e914 AP_Mount: frontend instantiates Xacti backend 2023-06-27 21:12:20 +10:00
Randy Mackay 2c37958c3f AP_Mount: support send-camera-info and settings 2023-06-16 14:30:46 +10:00
Peter Barker 78c5fe097b AP_Mount: correct compilation when HAL_MOUNT_SERVO_ENABLED is 0
... but still do the parameter conversion
2023-06-08 11:52:44 +10:00
Peter Barker 3d245c4e4c AP_Mount: use switch statement on mount type when creating backends 2023-05-29 09:08:55 +10:00