Commit Graph

540 Commits

Author SHA1 Message Date
Asif Khan caf35b71a6 AP_Mount: fix SiYi gimbal upside-down facing not working 2023-06-09 09:38:43 +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 cd472b8f52 AP_Mount: use minimize_features.inc for more features 2023-06-06 10:14:02 +10:00
Peter Barker 487ed8d888 AP_Mount: remove use of AP_Mount.h from headers 2023-05-29 09:08:55 +10:00
Peter Barker 3d245c4e4c AP_Mount: use switch statement on mount type when creating backends 2023-05-29 09:08:55 +10:00
Peter Barker 3acc917ea7 AP_Mount: use enum class for mount type 2023-05-25 09:54:43 +10:00
Asif Khan 28748dc2c0 AP_Mount: add GIMBAL_MANAGER_SET_PITCHYAW message support 2023-05-24 12:36:37 +10:00
Peter Barker 07160e2985 AP_Mount: move get_bf_yaw to be a method on the object it takes 2023-05-18 15:07:17 +10:00
Randy Mackay e672a75776 AP_SerialManager: generalise SToRM32 serial protocol desc and enum 2023-05-17 17:34:10 +10:00
davidsastresas cbec7ee47b AP_Mount: support gimbal_manager_status and do_gimbal_manager_configure
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2023-05-17 12:38:49 +10:00
Randy Mackay 341910bce4 AP_Mount: fix send_gimbal_manager_information instance 2023-05-17 12:38:49 +10:00
davidsastresas de9024b633 AP_Mount: Siyi supports absolute zoom control
Co-authored-by: davidsastresas <davidsastresas@gmail.com>
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2023-05-02 10:00:38 +10:00
Randy Mackay 020a505d78 AP_Mount: set_focus replaces set_manual/auto_focus 2023-04-26 22:55:47 +10:00
Randy Mackay ddbc52d2db AP_Mount: support gimbal-manager-information requests 2023-04-25 15:07:35 +10:00
Asif Khan 47ad614e8e AP_Mount: Add MNTx_SYSID_DFLT param to easily target another vehicle 2023-04-24 13:34:20 +10:00
Asif Khan 3d11ec7b5c AP_Mount: Add SysID-Target entry to MNTx_DEFLT_MODE param description 2023-04-24 13:34:20 +10:00
Randy Mackay 14ef3870bc AP_Mount: integrate ZoomType def move out of AP_Camera 2023-04-19 17:31:46 +10:00
Randy Mackay a8c593d44c AP_Mount: Siyi driver comment re zoom decrement 2023-04-19 17:31:46 +10:00
Randy Mackay 5b7f9c874d AP_Mount: set_zoom replaces set_zoom_step 2023-04-19 17:31:46 +10:00
Peter Barker a3c5926040 AP_Mount: use quat.to_euler(Vector3f&) 2023-04-19 14:24:45 +10:00
Peter Barker 3b2e92c4d6 AP_Mount: use only radians within servo backend 2023-04-15 23:14:48 +10:00
Peter Barker 69d7843f22 AP_Mount: don't check MINIMIZE_FEATURES when also checking BOARD_FLASH_SIZE
we have an assertion that no board with >1MB of flash is minimized
2023-04-15 09:33:35 +10:00
Randy Mackay 470b9638ea AP_Mount: remove unused get_camera_state 2023-04-14 07:47:47 +10:00
Randy Mackay db51915e27 AP_Mount: scripting backend loses camera support
drivers should use the camera scripting backend
2023-04-13 07:04:46 +10:00
Nick Exton 5d39dd45be AP_Mount: Add clear_roi_target() function 2023-04-11 09:11:08 +10:00
Peter Barker c63ec307f1 AP_Mount: do not allow both attitude and rate for GIMBAL_MANAGER_SET_ATTITUDE
this will allow us to support both at the same time into the future without worrying about how it might break existing callers.
2023-04-04 09:48:40 +10:00
Asif Khan 91935fc404 AP_Mount:Add GIMBAL_MANAGER_SET_ATTITUDE support 2023-04-04 09:48:40 +10:00
Peter Barker 51757a192e AP_Mount: clarify attitude returned in get_attitude_quaternion method call 2023-03-27 09:03:35 +09:00
Peter Barker b644dfebc4 AP_Mount: add and use a "bool read(c)" method to AP_HAL
this is much less likely to not work vs the int16_t equivalent
2023-03-22 17:59:11 +11:00
Peter Barker 518fece88d AP_Mount: remove redundant constructors
just copy in the one from the parent class
2023-03-07 13:40:54 +11:00
Peter Barker 93cb56b5f2 AP_Mount: create and use AP_Mount_config.h 2023-03-06 14:03:00 +11:00
Peter Barker fb98ef21aa AP_Mount: replace check_instance with get_instance 2023-03-03 17:35:39 +11:00
Peter Barker 04e5b5096e AP_Mount: check array bounds when setting to default mode
This is a public method, so needs some checking
2023-03-02 18:07:11 +11:00
Peter Barker 8c47a3d268 AP_Mount: allow gimbals other than primary to be retracted/neutralised 2023-03-02 18:07:11 +11:00
Peter Barker 44bf0ec1a7 AP_Mount: Gremsy uses _link.send_message(id, buffer) to send set-attitude 2023-02-25 17:41:44 +11:00
Peter Barker 2e987b3b35 AP_Mount: rename local _chan to chan in Gremsy methods
based on PR feedback
2023-02-24 09:21:09 +11:00
Peter Barker 550d94f99f AP_Mount: correct double-mapping of port to channel number
set_message_interval takes a port number, not a channel number (it was originally written as an internal function, after all).  Before this patch we were double-mapping from one to the other.  That works so long as the port you are mapping also corresponds to the chanel number - which it will, for example, if you are using serial2 with both serial0 and serial1 also set to mavlink.  If you set serial5_protocol to 2 an attempt to use it for controlling a gremsy it will *not* work because we map into backwards twice.
2023-02-24 09:21:09 +11:00
Peter Barker d6b5dc206e AP_Mount: make get_attitude_euler non-virtual
If a backend ever needs to override this method then we can make it virtual, in the meantime we can save flash by re-using the quaternion getter in the frontend
2023-02-17 10:04:49 +11:00
Randy Mackay 04e8fffc53 AP_Mount: add get_camera_state method 2023-02-16 16:49:51 +09:00
Randy Mackay 0f24b079e4 AP_Mount: add scripting backend 2023-01-31 17:20:37 +09:00
Randy Mackay b8ace06077 AP_Mount: servo mount yaw handling fix 2023-01-24 10:59:10 +11:00
Randy Mackay 1a4f51d782 AP_Mount: servo driver loses unnecessary closest_limits method 2022-12-21 18:45:33 +11:00
Randy Mackay 5fa6914137 AP_Mount: siyi recording send-text demoted to INFO 2022-12-16 08:15:53 +09:00
Randy Mackay 6efa35e889 AP_Mount: Siyi fix for record ON OFF reporting 2022-12-16 08:15:53 +09:00
Randy Mackay 6bd4afeb48 AP_Mount: siyi a8 fix for gimbal-config-info message
Siyi A8 uses a different format from Z10 for this message
2022-12-16 08:15:53 +09:00
Moe Bataineh 5b9403527b AP_Mount: Align received data to AP frame for Storm32 Serial
(Note: reversed pitch and yaw) to match NED.

Update AP_Mount_SToRM32_serial.cpp
2022-12-13 09:02:43 +09:00
Randy Mackay 204d32c9a9 AP_Mount: fix siyi version display 2022-11-30 20:07:17 +11:00
Randy Mackay 345629cdad AP_Mount: fix for Siyi A8 2022-11-30 20:07:17 +11:00
Randy Mackay be922f20a2 AP_Mount: gremsy driver sends vehicle att at 50hz 2022-11-10 10:34:05 +09:00
Peter Barker aad489c8cb AP_Mount: change namespace of MultiCopter and FixedWing params
this stops the libraries knowing anything about AP_Vehicle
2022-11-09 19:04:37 +11:00
Peter Barker 4bdac4afc5 AP_Mount: include cleanups 2022-11-08 09:49:19 +11:00
jackhong12 4a4f361a17 all: use CLASS_NO_COPY() macro 2022-10-04 11:23:04 +11:00
murata b90079bfa6 AP_Mount: Enable debugging outputs and variables in debug definitions 2022-10-01 09:05:05 +09:00
Randy Mackay de3d763e36 AP_Mount: minor comment fix to has_pan_control 2022-09-30 15:17:29 +09:00
Randy Mackay 8c5463ec78 AP_Mount: add Siyi gimbal driver 2022-09-30 15:17:29 +09:00
Randy Mackay 53905c5f35 AP_Mount: add camera controls 2022-09-30 15:17:29 +09:00
Randy Mackay e9b92da241 AP_Mount: add get_attitude_euler
this allows external callers including Lua to retrieve the gimbal mount's current attitude
2022-09-28 17:09:31 +10:00
Peter Barker 3d099b0d2f AP_Mount: include required GCS.h header 2022-09-27 09:26:45 +10:00
Randy Mackay a16b9cc5ad AP_Mount: remove set_mode overrides
The mode state is local to the driver and does not depend upon successful communication with the gimbal
2022-09-19 20:23:03 -04:00
olliw42 64b1277a66 AP_Mount: storm integrates find_by_mavtype_and_compid
Note that this forces users to set their gimbal's component id while before any component id was acceptable
2022-09-12 08:44:38 +09:00
Randy Mackay 7c9b487779 AP_Mount: gremsy integrates find_by_mavtype_and_compid 2022-09-12 08:44:38 +09:00
Randy Mackay f932add7ea AP_Mount: mav-cmd-do-gimbal-manager-pitchyaw supports multiple gimbals 2022-09-07 16:09:07 +09:00
Randy Mackay 73d817b985 AP_Mount: add access for primary instance 2022-09-07 16:09:07 +09:00
Randy Mackay 76096899ac AP_Mount: add 2nd instance 2022-09-07 16:09:07 +09:00
Randy Mackay c072a201bc AP_Mount: param conversion for MNT to MNT1 2022-09-06 13:53:25 +09:00
Randy Mackay 66a8775895 AP_Mount: remove param set of MNT1_TYPE to 1 if servo outputs defined 2022-09-06 13:53:25 +09:00
Randy Mackay c20ec27c54 AP_Mount: parameter angles in degrees
Also MNTx_RC_RATE param per backend
2022-09-06 13:53:25 +09:00
Randy Mackay ac769baa3c AP_Mount: Servo mount's STAB params replaced by BrushlessPWM type 2022-09-06 13:53:25 +09:00
Randy Mackay 0d9526f1c5 AP_Mount: replace RC input params with RC options 2022-09-06 13:53:25 +09:00
Randy Mackay 2bcb503170 AP_Mount: allow users to disable yaw on 3-axis gimbals
Also fixes 3-axis gimbal support for SToRM32 serial and MAVLink gimbals
2022-08-30 10:05:09 +10:00
Randy Mackay 83c9a76260 AP_Mount: send warning to GCS on invalid GPS or angle targets
This hopefully will help catch cases where the GCS relied on a bug in 4.2 (and earlier's) handling of MAV_CMD_DO_MOUNT_CONTROL
2022-08-25 20:28:06 -04:00
Randy Mackay 022d610519 AP_Mount: separate handling of mount-control and do-mount-control 2022-08-25 20:28:06 -04:00
Randy Mackay 119c8b7363 AP_Mount: get_angle_target_to_location checks for valid location 2022-08-24 18:07:08 +10:00
Randy Mackay b4979e2cfa AP_Mount: replace send-mount-status with send-gimbal-device-attitude-status 2022-08-15 20:29:25 -04:00
Iampete1 47105f0b03 AP_Mount: params always use set method 2022-08-03 13:43:48 +01:00
Randy Mackay f03ac3648d AP_Mount: fixup handle do-gimbal-manager-pitchyaw flags 2022-06-29 10:56:48 +09:00
Randy Mackay 3b0869d098 AP_Mount: SToRM32_serial restructure and support for ef/bf angle and rate 2022-06-29 10:56:48 +09:00
Randy Mackay f14f524ff5 AP_Mount: SToRM32 restructure and support for ef/bf angle and rate 2022-06-29 10:56:48 +09:00
Randy Mackay 18fe1d44b7 AP_Mount: Solo restructure and support for ef/bf angle and rate 2022-06-29 10:56:48 +09:00
Randy Mackay d59e87ea59 AP_Mount: Servo restructure and support for ef/bf angle and rate 2022-06-29 10:56:48 +09:00
Randy Mackay 80b70dcd66 AP_Mount: Gremsy fixup for support of ef/bf angle and rate 2022-06-29 10:56:48 +09:00
Randy Mackay d17e1b6fab AP_Mount: Alexmos restructure and support for ef/bf angle and rate 2022-06-29 10:56:48 +09:00
Randy Mackay 0d60e47c68 AP_Mount: backend restructure and support for ef/bf angle and rate 2022-06-29 10:56:48 +09:00
Randy Mackay f0f95fb812 AP_Mount: frontend adds support for both ef/bf angle and rate 2022-06-29 10:56:48 +09:00
Randy Mackay 33a4efa936 AP_Mount: move mode, yaw_lock, roi_target and sysid target to backend 2022-06-29 10:56:48 +09:00
Randy Mackay ec07c15e1e AP_Mount: set_roi_target and set_target_sysid lose struct and const before args 2022-06-29 10:56:48 +09:00
Randy Mackay 898bdb864c AP_Mount: fix handle_command_do_mount_configure instance handling 2022-06-29 10:56:48 +09:00
Randy Mackay e58d72931e AP_Mount: Solo in sysid target sets lockedToBody
Also re-order calls in home-location mode to be consistent with other modes
2022-06-29 10:56:48 +09:00
Randy Mackay e8ab4eb8b7 AP_Mount: SToRM32_serial provides calc_angle_to_xxx relative_pan argument 2022-06-29 10:56:48 +09:00
Randy Mackay 5958bced0c AP_Mount: SToRM32 provides calc_angle_to_xxx relative_pan argument 2022-06-29 10:56:48 +09:00
Randy Mackay 57a508b037 AP_Mount: Solo provides calc_angle_to_xxx relative_pan argument 2022-06-29 10:56:48 +09:00
Randy Mackay 3c501bb408 AP_Mount: alexmos provides calc_angle_to_xxx relative_pan argument 2022-06-29 10:56:48 +09:00
Randy Mackay b0a473ee53 AP_Mount: alexmos minor spell fix 2022-06-29 10:56:48 +09:00
Randy Mackay f426711177 AP_Mount: backend calc_angle_to_xxx requires relative_pan argument 2022-06-29 10:56:48 +09:00
Randy Mackay 3711c362ce AP_Mount: update_rate_and_angle_from_rc fix arg name to match units 2022-06-29 10:56:48 +09:00
Randy Mackay 23209ddafd AP_Mount: gremsy neutral mode leaves ef targets untouched 2022-06-29 10:56:48 +09:00
Peter Barker 1f4ebb49b5 AP_Mount: document point-at-home default mode option 2022-06-23 16:37:54 +10:00
Randy Mackay 45cd158b1c AP_Mount: gremsy searches for gimbal while disarmed 2022-06-21 13:37:11 +09:00
Randy Mackay 8ba8c67452 AP_Mount: gremsy implements healthy 2022-06-21 13:37:11 +09:00
Randy Mackay 822ee75e20 AP_Mount: add healthy and pre_arm_checks
Co-authored-by: olliw42 <waldmanns@gmx.de>
2022-06-21 13:37:11 +09:00
Randy Mackay 10da8a42bd AP_Mount: replace JSTICK_SPD with RC_RATE 2022-06-21 13:37:11 +09:00
Randy Mackay 1400eba400 AP_Mount: minor include and definition re-order and fixup 2022-06-15 18:08:58 +10:00
Randy Mackay d24d3c0af8 AP_Mount: add HAL_MOUNT_STORMSERIAL_ENABLED build option 2022-06-15 18:08:58 +10:00
Randy Mackay 59916d0327 AP_Mount: add HAL_MOUNT_STORM32MAVLINK_ENABLED build option 2022-06-15 18:08:58 +10:00
Randy Mackay 4f0ee1276b AP_Mount: add HAL_MOUNT_SERVO_ENABLED build option 2022-06-15 18:08:58 +10:00
Randy Mackay e2106e63bf AP_Mount: add HAL_MOUNT_ALEXMOS_ENABLED build option 2022-06-15 18:08:58 +10:00
Randy Mackay 34f327404a AP_Mount: Gremsy only enabled on >1MB boards 2022-06-15 09:07:14 +09:00
Randy Mackay e595da41e6 AP_Mount: gremsy uses gimb-dev-att-send to retract gimbal
this replaces the MAV_CMD_USER_1 method
2022-06-15 09:07:14 +09:00
Randy Mackay 14c81099db AP_Mount: add Gremsy driver
Co-authored-by: bugobliterator <siddharthbharatpurohit@gmail.com>

this drivers special features include
sends ATTITUDE and AUTOPILOT_STATE_FOR_GIMBAL
support of RC rate targets
captures and re-forwards gimbal_device_attitude_status
2022-06-15 09:07:14 +09:00
Randy Mackay 6723a0fc55 AP_Mount: handle gimbal_device_attitude_status 2022-06-15 09:07:14 +09:00
Randy Mackay 247697ccc4 AP_Mount: add support for DO_GIMBAL_MANAGER_PITCHYAW mavlink command 2022-06-15 09:07:14 +09:00
Randy Mackay 8092697c1a AP_Mount: backend record RC rate targets 2022-06-15 09:07:14 +09:00
Randy Mackay f157e5a073 AP_Mount: add set_yaw_lock 2022-06-15 09:07:14 +09:00
Randy Mackay 0975da6068 AP_Mount: remove virtual distructor from backend 2022-06-15 09:07:14 +09:00
Randy Mackay b6d7601a55 AP_Mount: SToRM32 minor comment fix
also move definitions to cpp file
2022-06-15 09:07:14 +09:00
Randy Mackay 5651d8761d AP_Mount: remove unimplemented send_gimbal_report 2022-06-07 09:27:47 +10:00
Randy Mackay 29a1aed1e3 AP_Mount: backend gets minor comment fix 2022-06-03 19:43:54 +09:00
Randy Mackay 6303a7d958 AP_Mount: Alexmos minor comment fix 2022-06-03 19:43:51 +09:00
Randy Mackay 9e8f000ac2 AP_Mount: minor spelling fix 2022-06-03 11:56:18 +09:00
murata d478a40edc AP_Mount: Console output can be disabled 2022-05-17 09:53:06 +10:00
Peter Barker 7ce739aeef AP_Mount: tidy includes 2022-05-03 09:14:58 +10:00
Peter Barker f3bf6e56c8 AP_Mount: enable Solo Gimbal only on CubeGreen 2022-03-29 08:24:59 +09:00
Peter Barker 38a1c4412a AP_Mount: correct compilation with HAL_INS_ACCELCAL_ENABLED false 2022-03-22 10:39:44 +11:00
murata 4eca7383b8 AP_Mount: Change from division to multiplication 2022-03-16 18:41:52 +11:00
Peter Barker 17fc5499f8 AP_Mount: mark result of get_velocity as unused 2022-02-02 19:32:47 +11:00
Peter Barker fcd8d1b5eb AP_Mount: rename AP_AHRS::get_position to get_location 2022-01-25 10:47:22 +11:00
Joshua Henderson dd8daa05fc AP_Mount: add mount mode to MOUNT_STATUS 2022-01-12 18:03:27 +11:00
olliw42 312604f577 AP_Mount: add handle_global_position_int() method to backend and use it + little spelling 2021-10-08 14:22:43 +11:00
olliw42 af634f0421 AP_Mount: initialize backends after all mounts were added 2021-09-01 18:57:24 +10:00
Peter Barker dc82487fae AP_Mount: stop using AHRS as conduit for Compass pointer 2021-07-30 12:19:42 +10:00
Peter Barker ee069a081b AP_Mount: rename for AHRS restructuring 2021-07-21 21:01:39 +10:00
Peter Barker 85bd9de903 AP_Mount: remove ability to use DCM as AHRS 2021-07-21 21:01:39 +10:00
Andrew Tridgell 32a83ef347 AP_Mount: use ZERO_FARRAY() 2021-07-10 07:20:41 +10:00
Andrew Tridgell f12a7dd04b AP_Mount: fixed longitude subtraction 2021-06-25 15:33:55 +10:00
Hwurzburg 92283f2025 AP_Mount: make centideg metadata incr and range consistent 2021-05-25 10:10:18 +10:00
Peter Barker 5c31238f28 AP_Mount: remove separate calls to get delta-times for vel and ang 2021-03-13 11:29:29 +11:00
murata e041b647d7 AP_Mount: Change misnomer (NFC) 2021-03-03 20:49:55 +11:00
Hugo Trippaers 0dbe2e072c AP_Mount: Set relative pan to true for servo mounts 2021-03-03 18:55:38 +11:00
Hugo Trippaers 44902ef535 AP_Mount: Add parameter to control relative pan option for servo mounts
* Change from a dedicated parameter to a reusable options field
2021-03-03 18:55:38 +11:00
Hugo Trippaers bcee4b7b82 AP_Mount: Add parameter to control relative pan option for servo mounts 2021-03-03 18:55:38 +11:00
Iampete1 e64a7b2884 AP_Mount: type enable flag 2021-03-02 10:09:19 +11:00
Patrick José Pereira cc39e36ee1 AP_Mount: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Igor Campos 174700b7ad AP_Mount: Implement roll control on Solo gimbal 2021-01-13 08:39:03 +11:00
Peter Barker 7b9fbe3b30 AP_Mount: support MAV_MOUNT_MODE_HOME_LOCATION to point at HOME 2020-12-25 12:17:27 +11:00
Andrew Tridgell 021e305340 AP_Mount: cope with INS_MAX_INSTANCES below 3 2020-11-10 16:15:45 +11:00
Patrick José Pereira 375fe22dff AP_Mount: Improve instance validation check
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-10-21 08:55:33 +09:00
Tom Pittenger f364dc933d AP_Mount: remove unused GPS.h include 2020-09-17 10:55:08 +10:00
Andy Piper f7f5880179 AP_Mount: make mount/gimbal inclusion configurable per-board and disable Solo gimbal on all 1MB boards 2020-08-04 09:18:14 +10:00
Andy Piper 5a6be9e0a2 AP_Mount: INS get_sample_rate() renamed to get_loop_rate_hz() 2020-07-10 16:45:29 +10:00
Peter Barker 9142f877e7 AP_Mount: use logger Write method for logging Solo gimbal
Also document the messages
2020-04-28 09:56:09 +10:00