Commit Graph

178 Commits

Author SHA1 Message Date
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 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
Peter Barker 1f4ebb49b5 AP_Mount: document point-at-home default mode option 2022-06-23 16:37:54 +10: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 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 f157e5a073 AP_Mount: add set_yaw_lock 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
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
Hwurzburg 92283f2025 AP_Mount: make centideg metadata incr and range consistent 2021-05-25 10:10:18 +10: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 375fe22dff AP_Mount: Improve instance validation check
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-10-21 08:55:33 +09: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
Peter Barker c649fd1468 AP_Mount: support sysid targetting 2019-11-12 07:52:22 +08:00
Peter Barker 47ad331135 AP_Mount: use AHRS singleton to get current position 2019-11-05 19:55:45 +11:00
Peter Barker 2d1357b44c AP_Mount: stop passing serial manager through to init() 2019-08-28 06:55:28 +10:00
Pierre Kancir f3e40b4906 AP_Mount: pass mavlink_message_t by const reference 2019-07-16 20:51:42 +10:00
Peter Barker 178d26f8e3 AP_Mount: add general function for handling mavlink messages
AP_Mount: const parameters, add overrides, remove bad virtual declarations

AP_Mount: use AHRS singleton

AP_Mount: make status_msg pure-virtual and add override keyword

AP_Mount: handle deprecated mavlink control and configure msgs

AP_Mount: handle MAV_CMD_DO_MOUNT_CONFIGURE

AP_Mount: rename status_msg method to send_mount_status
2018-10-30 17:19:14 +11:00
Peter Barker 4ae6aeed7e AP_Mount: add singleton 2018-10-30 17:19:14 +11:00
Peter Barker 57bc4d8736 AP_Mount: remove un-needed initialisations
These objects should always be created with new() or statically.
2018-07-23 13:18:37 +09:00
Peter Barker 0652c89844 AP_Mount: use dataflash singleton
Closes #7550
2018-03-15 07:57:50 +09:00
Lucas De Marchi b3d8c0fc08 AP_Mount: use DataFlash_Class::instance()
Instead of requiring DataFlash_Class reference to be passed
on the init() function, get it from the singleton directly.
2017-09-26 03:01:21 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas 823bf217d9 AP_Mount: Use SI units conventions in parameter units
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
Michael du Breuil 7f11cf3ca6 AP_Mount: Remove solo gimbal from the minimal build support 2017-03-06 11:53:08 +11:00
Andrew Tridgell 4173432542 AP_Mount: adapt to new RC_Channel API 2017-01-12 17:39:37 +11:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Jonathan Challinger 5b834330cb AP_Mount: merge SoloGimbal from solo master 2016-01-23 10:35:40 +09:00
Don Gagne 964d02065a Mount: add missing RebootRequired to param description 2015-12-26 10:06:14 +09:00
Lucas De Marchi ad094b9073 AP_Mount: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:12 +11:00
Lucas De Marchi 5244559010 Minimize AP_Progmem.h includes
Most of AP_Progmem is already gone so we can stop including it in most
of the places. The only places that need it are the ones using
pgm_read_*() APIs.

In some cases the header needed to be added in the .cpp since it was
removed from the .h to reduce scope. In those cases the headers were
also reordered.
2015-10-30 14:35:32 +09:00
Lucas De Marchi 831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Jonathan Challinger c762865d66 AP_Mount: use configured function to determine if MNT_TYPE has been configured 2015-10-26 11:15:54 +11:00
Randy Mackay 3d7ec3704d Mount: add param descriptions to allow RC9 ~ RC12 inputs to be used to control gimbal 2015-09-29 16:41:51 +09:00
Randy Mackay fa0aa6f5c9 Mount: remove support for do-mount-configure as command long
Also fix bug in do-mount-control so that do-mount-control can switch mount into retract mode

Also removes ability to set which axis are stabilized through
ardupilotmega mount_configure message
2015-09-06 16:01:18 +09:00
squilter cc58ec917c Mount: add support for do_mount_control via command_long 2015-09-06 16:01:12 +09:00
Gustavo Jose de Sousa 8011579c5a AP_Mount: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:20 +10:00
Randy Mackay cc0ab26f5d Mount: fix init of mode
Mode was being set from MNT_DEFTL_MODE parameter before that parameter's
value had been initialised from eeprom
2015-07-16 14:14:01 +09:00
Randy Mackay 1d732ddf62 Mount: param desc rename from MAVLink to 3DR Solo 2015-07-07 13:29:24 +09:00
Randy Mackay 0b6323d5ed Mount: default MNT_TYPE to servo gimbal if rc outputs defined 2015-06-10 16:47:08 +09:00
Randy Mackay 72eb25b166 Mount: add SToRM32 serial to front end 2015-05-26 21:05:24 +09:00
Randy Mackay db6bb295c7 Mount: add gimbal parameter descriptions 2015-04-21 21:47:14 +09:00
Arthur Benemann 4bdf909bbf AP_Mount: Create new copter parameters to hold gimbal settings 2015-04-21 21:45:43 +09:00
Randy Mackay 8a3a7bdcd1 Mount: add set_angle_target method 2015-03-21 21:52:22 +09:00
Jonathan Challinger dff899647f AP_Mount: use AP_AHRS_TYPE instead of AP_AHRS_MOUNT 2015-03-16 09:14:03 +11:00
Randy Mackay 23f0bab5d6 Mount: integrate SToRM32 backend 2015-02-20 11:05:40 +09:00
Andrew Tridgell fa7c584733 AP_Mount: fixed build on non-EKF systems 2015-02-03 09:49:17 +11:00
Andrew Tridgell da27a8696d AP_Mount: added initial ekf estimation of gimbal bias
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2015-02-03 09:49:16 +11:00
Andrew Tridgell 01b264951a AP_Mount: added handling of GIMBAL_REPORT messages 2015-02-03 09:49:15 +11:00
Randy Mackay 886cc9aa46 Mount: use SerialManager for init 2015-01-29 14:05:13 +11:00
Randy Mackay acbcf3c54e Mount: backends use reference to their state 2015-01-29 14:05:10 +11:00
Randy Mackay b5127b680f Mount: set primary to first instance 2015-01-29 14:05:10 +11:00
Randy Mackay c5ef5d21d3 Mount: add Alexmos to MNT2_TYPE param description 2015-01-29 14:05:09 +11:00
Matthias Badaire 0b88f15a37 AP_Mount: fix Backend enum for AP_Mount_Alexmos and add comments
fix Backend enum for AP_Mount_Alexmos and add comments
2015-01-29 14:05:09 +11:00
Matthias Badaire 6e5e438b0f AP_Mount: Make use of the new AP_Mount_Alexmos backend
This is adding AP_Mount_Alexmos as one of the available backend
2015-01-29 14:05:08 +11:00
Randy Mackay efeb05876e AP_Mount: initialise mode to default 2015-01-29 14:05:07 +11:00
Randy Mackay 6af5a6687f Mount: add params for second mount 2015-01-29 13:57:19 +11:00
Randy Mackay 5d30af233a Mount: move param underscore to lib 2015-01-29 13:57:18 +11:00
Randy Mackay ef719b145b Mount: rename MODE to DFLT_MODE, move set_mode to backend 2015-01-29 13:57:17 +11:00
Randy Mackay 88db50c3a7 Mount: parent class becomes front-end 2015-01-29 13:57:17 +11:00
Andrew Tridgell 411766f45a AP_Mount: removed use of mavlink_check_target() 2014-12-11 12:32:27 +09:00
Andrew Tridgell 78db698108 AP_Mount: allow a MOUNT_CONTROL message to reset RC targetting
fixes issue #1617
2014-11-18 13:35:11 +11:00
Andrew Tridgell 14467b75a1 AP_Mount: use norm_input_dz()
this makes rc targeting much easier without drift
2014-11-18 12:44:29 +11:00
Arthur Benemann f7f9bedc38 AP_Mount: update the status_msg() method to match the new definition 2014-11-17 15:59:23 -08:00
Jason Short 7ee5b58535 AP_Mount: Axis mask speedup
Using a simple bit mask to avoid calculating an unneeded ATAN2() for AVR users.
2014-11-14 13:51:16 +11:00
Jonathan Challinger d03ed7a2c3 AP_Mount: Added lead filter 2014-11-06 07:35:32 +11:00
Ju1ien 1c96bf0b1d AP_Mount.cpp - correct units in description
That should be corrected also in MP as the current code is expecting
degrees, not centidegrees.
2014-08-25 15:55:07 +09:00
Randy Mackay 5614e42063 Mount: init members to resolve compiler warnings 2014-08-14 11:27:33 +09:00
Michael Oborne 30a3927ea8 AP_Mount: fix where status_msg() is sent
send to the channel where the trigger msg was sent from
2014-06-18 12:03:18 +10:00
Andrew Tridgell eb67948171 AP_Mount: convert to new GPS API 2014-04-01 06:38:24 +11:00
Don Gagne e68cf2d1c5 Plane: Fix parameter documentation
Fixes some problems with incorrect docs which would in turn generate
bad amp.pdef.xml files for ground stations.

merge with below
2014-01-09 14:02:21 +09:00
Andrew Tridgell 4de2a654ab AP_Mount: changed ahrs to be a const reference
saves a bit of code
2013-10-13 11:03:24 +09:00
Andrew Tridgell 033828aeb6 AP_Mount: make the code a bit easier to read 2013-06-03 16:23:48 +10:00
Andrew Tridgell 9076f6a1d0 AP_Mount: use RC_Channel::rc_channel() instead of rc_ch[] 2013-06-03 16:23:47 +10:00
Andrew Tridgell 1cc02836a0 AP_Mount: fixed indent-tabs-mode 2013-05-30 09:51:24 +10:00
tobias 217b8d7a59 cleanup: use const for struct Location pointers and references
this allows the compiler to generate more efficient code
2013-04-09 12:10:32 +10:00
Andrew Tridgell 26fedc543c AP_Mount: fixed scaling of the joystick speed to give better control
thanks to Chris Miser for reporting this problem
2013-03-08 14:39:32 +11:00
James Bielman 5631f865b2 Update floating point calculations to use floats instead of doubles.
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
rmackay9 cf409abc63 AP_Mount: add parameter descriptions 2013-01-02 16:47:39 +09:00
Andrew Tridgell ceb3f577d8 libraries: use new math functions 2012-12-20 14:53:22 +11:00
Andrew Tridgell 9d1f43928c Mount: updates for new AP_Param API 2012-12-20 14:51:39 +11:00
Pat Hickey 6cc231ae7d AP_Mount: ported to AP_HAL
I do not have the hardware required to test this
2012-12-20 14:51:29 +11:00
rmackay9 6bbf66697b AP_Mount: resolve compiler warning about unused mount_open variable 2012-11-07 23:29:25 +09:00
Andrew Tridgell f41270a3ce AP_Mount: updated for new RC_Channel_aux API 2012-09-08 15:12:52 +10:00