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
Peter Barker
856b635e89
AP_Mount: convert Solo gimbal messages to TimeUS from TimeMS
...
Also remove unused gimbal3 message entirely
2020-04-15 16:11:04 +10:00
Randy Mackay
8ad9a49900
AP_Mount: ignore rc trim when calculating desired mount angles
2020-02-25 17:38:24 +09:00
Peter Barker
7b32f2876e
AP_Mount: change type of roi_target_set to boolean
2019-11-12 07:52:22 +08:00
Peter Barker
c649fd1468
AP_Mount: support sysid targetting
2019-11-12 07:52:22 +08:00
Peter Barker
7139c1121f
AP_Mount: correct use of disparate altitude frames in AP_Mount
2019-11-05 19:55:45 +11:00
Peter Barker
47ad331135
AP_Mount: use AHRS singleton to get current position
2019-11-05 19:55:45 +11:00
Andrew Tridgell
5f90afa71e
AP_Mount: change optimisation from -O3 to -O2
2019-09-28 08:57:26 +10: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
edc8401457
AP_Mount: remove pointless virtual declarations
2019-07-15 09:15:06 +09:00
Peter Barker
a037920de4
AP_Mount: tidy use of AP_Logger.h
2019-07-09 10:57:20 +10:00
Andrew Tridgell
a45e364252
AP_Mount: don't use disabled IMUs in solo gimbal code
2019-07-07 19:03:01 +10:00
Peter Barker
e58eae3c48
AP_Mount: remove unneeded typedefs
...
Also note that one of these was incorrectly sized.
2019-07-03 16:12:40 +09:00
Michael du Breuil
6480786ab2
AP_Mount: Cleanup SoloGimalEKF headers further
2019-06-27 14:56:21 +10:00
Michael du Breuil
fbd19f30e7
AP_Mount: Reduce header includes
2019-06-18 10:02:05 +10:00
Michael du Breuil
03a4dda810
AP_Mount: Remove unneeded dependency on AP_Airspeed, and bad example
2019-06-18 10:02:05 +10:00
Michael du Breuil
2d161e3594
AP_Mount: Remove unneeded headers
2019-04-05 20:12:53 +11:00
Tom Pittenger
9dc7e5342d
AP_Mount: rename dataflash to logger
2019-03-28 16:40:57 +11:00
HITMAnsOFT
9c26b5bb9c
AP_Mount: fix SToRM32 Serial protocol delay
...
The packets to a SToRM32 gimbal were being sent at 1s intervals when in MAVLINK targeting mode.
We need to send them faster or smooth targetting is impossible.
2019-03-22 10:11:05 +11:00
Peter Barker
bdcb48d835
AP_Mount: use enum class for AltFrame enumeration
2019-03-19 10:31:18 +11:00
Peter Barker
d18dee178d
AP_Mount: remove pointless includes
2019-02-19 09:16:26 +11:00
Tom Pittenger
4e9d026448
AP_Mount: remove HAL_CPU_CLASS_150 check, 150 is already a minimum requirement
2019-02-17 13:00:13 -08:00
Tom Pittenger
3bbd80a5de
AP_Mount: unify singleton naming to _singleton and get_singleton()
2019-02-10 19:09:58 -07:00
Matt
e7dcee0dd8
AP_Mount: Solo gimbal params use HAVE_PAYLOAD_SPACE
...
Adds the HAVE_PAYLOAD_SPACE check to the solo gimbal's driver.
2019-01-22 12:46:49 +11:00
Peter Barker
6fc76a32af
GLOBAL: use AP::logger() and strip redundant Log_ from methods
2019-01-18 18:08:20 +11:00
Peter Barker
b47733142f
GLOBAL: rename DataFlash_Class to AP_Logger
2019-01-18 18:08:20 +11:00
Peter Barker
2f3237143f
AP_Mount: adjust for Location_Class and Location unification
2019-01-16 11:45:29 +11:00
Peter Barker
828317860a
AP_Mount: adjust for location flags being moved out of union
2019-01-16 11:45:29 +11:00
Michael du Breuil
4b642f8895
AP_Mount: Remove unneeded AP_Buffer include
2018-12-31 11:41:43 +09:00
Pierre Kancir
f1aa4f3f87
AP_Mount: pass vector by const reference
2018-12-22 08:31:32 +09:00
Randy Mackay
9767c74311
AP_Mount: angle_input uses norm_input
2018-12-06 08:00:18 +09:00
Randy Mackay
5046c7fb91
AP_Mount: fix gimbal move to extreme before TX turned on
2018-12-06 08:00:18 +09:00
Andrew Tridgell
f6d564599e
AP_Mount: mark gimbal channel as private
2018-11-24 11:00:37 +11:00
Andrew Tridgell
8f709b7a34
AP_Mount: fixed build warning
2018-11-11 07:08:59 +11:00
Peter Barker
be53782ef1
AP_Mount: add override keyword where required
2018-11-08 11:30:12 +11:00
Peter Barker
0afc9bf724
AP_Mount: SoloGimbal: avoid calling safe_sqrtf
2018-11-05 16:24:29 +11:00
Peter Barker
126065e95c
AP_Mount: trim out dead getDebug method
2018-11-05 16:24:29 +11:00
Peter Barker
8641dcbc31
AP_Mount: SoloGimbal: stop taking reference to AHRS
2018-11-05 11:41:31 +09:00
murata
998dd7207f
AP_Mount: Change from sqrt to safe_sqrt
2018-11-03 15:23:08 +09:00
Michael du Breuil
922d593f3d
AP_Mount: Fix strncpy warning
2018-10-30 16:17:03 -07:00
Michael du Breuil
dda7c615a8
AP_Mount: Suppress clearing non-trival type warning
2018-10-30 16:17:03 -07: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
c73beffe1b
AP_Mount: factor out a rate_input_rad, const various functions
2018-10-30 11:07:53 +11:00
Peter Barker
0142265f67
AP_Mount: make a copy of ID for mavlink_msg_param_set_send
...
The send function is expecting an array of the full length, so passing i
na null-terminated char* may result in uninitialised data (or
information leak)
2018-10-20 10:17:50 +11:00
Patrick José Pereira
0f42702910
AP_Mount: Remove unused check
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-08-27 23:35:34 +01:00
Peter Barker
2489234fcf
AP_Mount: use rc() method to get rc singleton
2018-08-01 12:11:30 +09: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
Michael du Breuil
1e7a06ef6b
AP_Mount: Remove unused ADC include
2018-07-17 09:29:50 +10:00
Peter Barker
9f556197a0
AP_Mount: use ins singleton
2018-03-16 00:37:35 -07:00
Peter Barker
0652c89844
AP_Mount: use dataflash singleton
...
Closes #7550
2018-03-15 07:57:50 +09:00
Peter Barker
ea75dd2d59
AP_Mount: correct compiler warnings
...
In file included from ../../libraries/AP_Mount/SoloGimbal.cpp:5:
../../libraries/AP_Mount/SoloGimbal.h:122:11: warning: private field
'_yaw_rate_ff_ef_filt' is not used [-Wunused-private-field]
float _yaw_rate_ff_ef_filt;
^
../../libraries/AP_Mount/SoloGimbal.h:140:23: warning: private field
'_chan' is not used [-Wunused-private-field]
mavlink_channel_t _chan;
^
2 warnings generated.
2018-03-02 09:26:37 +09:00
Peter Barker
fb3cba3867
AP_Mount: use GPS singleton
2017-12-27 00:58:02 +00:00
Andrew Tridgell
3d2c81ff05
AP_Mount: removed create() method for objects
...
See discussion here:
https://github.com/ArduPilot/ardupilot/issues/7331
we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach
Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Lucas De Marchi
563f9bfe89
AP_Mount: add static create method
2017-09-26 03:01:21 +01: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
Pierre Kancir
0be022694a
AP_Mount: example fix travis warning
...
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
Michael du Breuil
7f11cf3ca6
AP_Mount: Remove solo gimbal from the minimal build support
2017-03-06 11:53:08 +11:00
murata
2d32211c81
AP_Mount: Unify from print or println to printf.
2017-01-27 18:20:22 +11:00
Andrew Tridgell
4173432542
AP_Mount: adapt to new RC_Channel API
2017-01-12 17:39:37 +11:00
Nacho Carnicero
bc9facf608
AP_Mount: Fix Alexmos gimbal Mavlink targeting mode
2017-01-05 02:16:32 +00:00
priseborough
6d086e0c31
AP_Mount: remove EKF1
2016-12-19 08:07:10 +11:00
Przemek Lekston
6d65b351cd
AP_Mount: allow computation of gps point target in earth fixed frame
2016-12-01 18:42:48 +09: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
Lucas De Marchi
ae53920e5b
build: don't build examples with old build system
...
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file. Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
Murilo Belluzzo
077e03678f
Global: Adapt Stream class to be used with Ringbuffer
2016-08-03 01:44:02 -03:00
Andrew Tridgell
1f2216982d
AP_Mount: fixed typo
2016-07-01 15:35:34 +10:00
Gustavo Jose de Sousa
f9cb760691
AP_Mount: use ARRAY_SUBSCRIPT instead of bytes field
...
That fixed compilation issues and seems more semantically correct. Using array
of length 0 fails compilation because of -Werror=array-bounds in GCC 6.1.
2016-06-23 21:02:05 -03:00
Andrew Tridgell
ac8c4d9beb
AP_Mount: use zero length flexible arrays in unions
2016-05-25 19:55:49 +10:00
Andrew Tridgell
f377787444
AP_Mount: always build with MAVLink2 headers
2016-05-21 15:25:16 +10:00
Andrew Tridgell
ec62d8f4ca
AP_Mount: use HAVE_PAYLOAD_SPACE()
2016-05-21 15:25:14 +10:00
Andrew Tridgell
0ef5d8995b
AP_Mount: support mavlink2 build
2016-05-21 15:25:12 +10:00
Lucas De Marchi
421b9ef54a
AP_Mount do not use flexible array in union
...
We actually don't want a flexible array in this union, but rather a way
to access it byte by byte. This fixes the build for gcc >= 6
In file included from ../../libraries/AP_GPS/AP_GPS_UBLOX.cpp:23:0:
../../libraries/AP_GPS/AP_GPS_UBLOX.h:387:23: error: flexible array member in union
uint8_t bytes[];
^
compilation terminated due to -Wfatal-errors.
In file included from ../../libraries/AP_Mount/AP_Mount.cpp:9:0:
../../libraries/AP_Mount/AP_Mount_Alexmos.h:291:23: error: flexible array member in union
uint8_t bytes[];
^
compilation terminated due to -Wfatal-errors.
2016-05-16 13:50:56 -03:00
Ricardo de Almeida Gonzaga
fcbed13533
AP_Mount: Fix typos
2016-05-13 19:20:06 -03:00
proficnc
20a569a4d5
AP_Mount: block forwarding of MAVlink by bitmask
2016-05-12 17:44:09 +10:00
dgrat
6d3b491c02
AP_Math: Replace is_equal with a type safe template function
...
It makes sense to consider also other floating point types.
2016-05-10 11:41:26 -03:00
dgrat
41661f815f
AP_Math: Replace the pythagorous* functions with a variadic template
...
The new function can deal with a variable number of function parameters.
Additionally, I renamed the functions to norm(), because this is the
standard name used in several other projects.
2016-05-10 11:41:26 -03:00
skyscraper
8b9c96814b
AP_Mount: Fix up after RC_Channels refactor
...
Further to refactor of RC_Channel class which included
adding get_xx set_xx methods, change reads and writes to the public members
to calls to get and set functionsss
old public member(int16_t) get function -> int16_t set function (int16_t)
(expression where c is an object of type RC_Channel)
c.radio_in c.get_radio_in() c.set_radio_in(v)
c.control_in c.get_control_in() c.set_control_in(v)
c.servo_out c.get_servo_out() c.set_servo_out(v)
c.pwm_out c.get_pwm_out() // use existing
c.radio_out c.get_radio_out() c.set_radio_out(v)
c.radio_max c.get_radio_max() c.set_radio_max(v)
c.radio_min c.get_radio_min() c.set_radio_min(v)
c.radio_trim c.get_radio_trim() c.set_radio_trim(v);
c.min_max_configured() // return true if min and max are configured
Because data members of RC_Channels are now private and so cannot be written directly
some overloads are provided in the Plane classes to provide the old functionality
new overload Plane::stick_mix_channel(RC_Channel *channel)
which forwards to the previously existing
void stick_mix_channel(RC_Channel *channel, int16_t &servo_out);
new overload Plane::channel_output_mixer(Rc_Channel* , RC_Channel*)const
which forwards to
(uint8_t mixing_type, int16_t & chan1, int16_t & chan2)const;
Rename functions
RC_Channel_aux::set_radio_trim(Aux_servo_function_t function)
to RC_Channel_aux::set_trim_to_radio_in_for(Aux_servo_function_t function)
RC_Channel_aux::set_servo_out(Aux_servo_function_t function, int16_t value)
to RC_Channel_aux::set_servo_out_for(Aux_servo_function_t function, int16_t value)
Rationale:
RC_Channel is a complicated class, which combines
several functionalities dealing with stick inputs
in pwm and logical units, logical and actual actuator
outputs, unit conversion etc, etc
The intent of this PR is to clarify existing use of
the class. At the basic level it should now be possible
to grep all places where private variable is set by
searching for the set_xx function.
(The wider purpose is to provide a more generic and
logically simpler method of output mixing. This is a small step)
2016-05-10 16:21:15 +10:00
Lucas De Marchi
3a771bf0e3
AP_Mount: replace header guard with pragma once
2016-03-16 18:40:42 +11:00
Randy Mackay
e502e0fc2e
SoloGimbal: resolve compiler warning re float comparison
2016-03-01 21:51:43 +09:00
Randy Mackay
438769c8ae
SoloGimbal: resolve compiler warning re initialisation order
2016-03-01 21:51:41 +09:00
dgrat
5148e41c1a
AP_Math: Cleaned macro definitions
...
Moved Definitions into a separate header. Replaced PI with M_PI and
removed the M_PI_*_F macros.
2016-02-27 02:51:33 -03:00
Tom Pittenger
a9c985bfb3
AP-Mount: compiler warning
...
ardupilot/libraries/AP_Mount/SoloGimbal_Parameters.cpp:193:107: warning: comparing floating point with == or != is unsafe [-Wfloat-equal]
2016-02-17 14:54:31 -08:00
Peter Barker
09525e8568
AP_Mount: remove redundant include dependant on bad #define
2016-01-30 12:48:05 -02:00
Jonathan Challinger
5b834330cb
AP_Mount: merge SoloGimbal from solo master
2016-01-23 10:35:40 +09:00
Jonathan Challinger
eabede692e
AP_SmallEKF: move to AP_Mount/SoloGimbalEKF and merge solo version
2016-01-23 10:35:38 +09:00
Gustavo Jose de Sousa
c2e3f05dbf
waf: ardupilotwaf: prefix build context methods with ap_
...
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
3d22490397
waf: examples: use methods from bld instead of ardupilotwaf
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
d281067bcc
waf: make example binaries be placed in 'examples' dir
...
This commit makes examples' wscripts use ardupilotwaf.example() instead of
ardupilot.program().
2016-01-15 16:46:41 -02:00
Randy Mackay
ccd3725f63
AP_Mount_Servo: remove out of date comment
2016-01-04 11:23:41 +09:00
Jonathan Challinger
62701448ca
AP_Mount: fix example build
2015-12-29 10:46:35 -08:00
Lucas De Marchi
a096703b06
Global: don't link with AP_Progmem
...
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Don Gagne
964d02065a
Mount: add missing RebootRequired to param description
2015-12-26 10:06:14 +09:00
Jonathan Challinger
63caca1d3f
AP_Mount: reflect renamed function in AP_AHRS
2015-12-18 18:08:37 +11:00
Lucas De Marchi
f1de9c25fe
AP_Mount: remove unused AP_ADC_AnalogSource
2015-12-03 13:32:43 +11:00
Caio Marcelo de Oliveira Filho
6e7b73610d
waf: add waf support
2015-12-03 07:54:30 +11:00
Caio Marcelo de Oliveira Filho
0b2184b818
AP_Mount: use millis/micros/panic functions
2015-11-20 12:32:24 +09:00
Andrew Tridgell
8f4ce7f20b
build: removed all nocore.inoflag files
...
these were APM2 specific
2015-11-16 08:05:17 +11: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
6f4904189b
Replace use of println_P() with println()
2015-10-30 14:35:22 +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
Lucas De Marchi
2c38e31c93
Remove use of PSTR
...
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.
This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.
AVR-specific places were not changed.
2015-10-30 14:35:04 +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
Caio Marcelo de Oliveira Filho
42a111f5df
AP_Mount: remove unnecessary board include from example
2015-10-21 09:16:12 +11:00
Caio Marcelo de Oliveira Filho
ec52df991c
build: compile only the HAL files needed by the board
...
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho
2e464a53c2
AP_HAL: make code not depend on concrete HAL implementations
...
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.
A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.
The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.
Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.
The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +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
fillycheezstake
39dae7a156
Mount: fix for STORM32 serial ver 78e and higher
...
This fixes the structs to be compatible with the changes OlliW made to
the gimbal firmware.
http://www.olliw.eu/storm32bgc-wiki/Serial_Communication
2015-08-25 13:45:33 +09:00
Lucas De Marchi
2011c4d988
AP_HAL_Mount: standardize inclusion of libaries headers
...
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10: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
b13921a7aa
Mount_SToRM32: find gimbal channel on startup
2015-07-25 10:53:05 +09: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
Grant Morphett
84ac8abc42
AP_Mount: Fixed a bug with wrapping of panning angles.
2015-06-22 09:32:26 +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
b8e3fe8f26
Mount: AlexMos fix to stop crashing before init
2015-06-05 12:31:16 +09:00
Randy Mackay
66d2328163
Mount: Alexmos save 4 bytes of RAM
2015-06-05 12:31:14 +09:00
Randy Mackay
7a8fe5f4d4
Mount: Alexmos formatting fixes
2015-06-05 12:31:12 +09:00
Andrew Tridgell
83b46243db
AP_Mount: convert example from .pde to .cpp
2015-06-01 17:07:05 +10:00
Andrew Tridgell
1400d0155c
AP_Mount: fixed valgrind error with gimbal code
2015-05-27 11:54:17 +10:00
Randy Mackay
fb2d29364e
Mount_SToRM32_serial: fix angle request
2015-05-26 21:05:29 +09:00
Randy Mackay
9b04a67e63
Mount_SToRM32_serial: rename sent_do_mount_control
2015-05-26 21:05:26 +09:00
Randy Mackay
72eb25b166
Mount: add SToRM32 serial to front end
2015-05-26 21:05:24 +09:00
Sergey Kirillov
c133511431
Mount: add SToRM32 serial support
2015-05-26 21:05:22 +09:00
Andrew Tridgell
d96e62cce7
AP_Mount: update gimbal for changed quaternion API
2015-05-25 09:08:45 +10:00
Andrew Tridgell
19419fd901
AP_Mount: fixed reporting of MAVLink gimbal position to GCS
2015-05-24 15:24:02 +10:00
Andrew Tridgell
730644eaeb
AP_Mount: use M_PI_F instead of (float)M_PI
2015-05-05 13:44:25 +10:00
Andrew Tridgell
7c9e3d4b58
AP_Mount: revert AP_Math class change
2015-05-05 13:27:06 +10:00
Tom Pittenger
4ac1f8a2fa
AP_Mount: compiler warnings: apply is_zero(float) or is_equal(float)
2015-05-05 13:26:54 +10:00
Andrew Tridgell
d8ca0658d7
AP_Mount: fixed some build warnings
2015-05-05 09:45:58 +10:00
Randy Mackay
8ced9cc904
Gimbal: only include for high performance CPUs
2015-04-21 21:47:18 +09:00
Randy Mackay
93ba2d2d32
Mount_MAVLink: uses vehicle's sysid
2015-04-21 21:47:17 +09:00
Randy Mackay
e726a05f3b
Gimbal: fix to parameter init order
...
resolves a compiler warning
2015-04-21 21:47:16 +09:00
Randy Mackay
e9b2153672
Gimbal: formatting fixes
...
Also isCopterFlipped returns bool instead of uint8_t
No functional change
2015-04-21 21:47:15 +09:00
Randy Mackay
db6bb295c7
Mount: add gimbal parameter descriptions
2015-04-21 21:47:14 +09:00
Jonathan Challinger
231f776dd7
AP_Gimbal: change isCopterFlipped()
2015-04-21 21:45:52 +09:00
Arthur Benemann
21b909f670
AP_Gimbal: report gimbal angles using a 312 rotation vector
2015-04-21 21:45:50 +09:00
Arthur Benemann
2850c7ab4a
AP_Gimbal: nest AP_Gimbal files into AP_Mount library
2015-04-21 21:45:49 +09:00
Arthur Benemann
255c5b3025
AP_Mount: report MAVLink gimbal angle to the GCS
2015-04-21 21:45:45 +09:00
Arthur Benemann
4bdf909bbf
AP_Mount: Create new copter parameters to hold gimbal settings
2015-04-21 21:45:43 +09:00
Arthur Benemann
a05fe7e117
AP_Gimbal: Re-implement the target low-pass filter
2015-04-21 21:45:40 +09:00
Arthur Benemann
b3dd8891c8
AP_Mount: Use AP_Gimbal on the AP_Mount_MAVLink class
2015-04-21 21:45:38 +09:00
Arthur Benemann
558a69bdca
Mount_MAVLink: remove code now in AP_Gimbal
2015-04-21 21:44:56 +09:00
Randy Mackay
44d2ae06fb
Mount: unix style line endings
2015-04-17 22:59:34 +09:00
Andrew Tridgell
df948e7358
AP_Mount: fixed for new GIMBAL_REPORT message
2015-04-06 16:42:23 -07:00
Randy Mackay
1ed7737669
Mount: integrate Serial Manager instance
2015-04-01 14:59:21 -07:00
Randy Mackay
8a3a7bdcd1
Mount: add set_angle_target method
2015-03-21 21:52:22 +09:00
Randy Mackay
2189b16165
Mount_SToRM: remove message throttling
...
recent versions of gimbal firmware can handle 50hz update rate
2015-03-21 05:56:18 +09:00
Randy Mackay
b3362d5829
Mount: calc_angle_to_location returns vehicle relative yaw
2015-03-21 05:56:16 +09:00
Randy Mackay
d2739c5ce5
Mount_SToRM: slow updates to 10hz, reverse yaw, pitch
2015-03-20 20:46:45 +09:00
Paul Riseborough
9c2f1ce869
AP_Mount: Fix bug in mavlink gimbal attitude control
2015-03-16 09:54:43 +11:00
Jonathan Challinger
dff899647f
AP_Mount: use AP_AHRS_TYPE instead of AP_AHRS_MOUNT
2015-03-16 09:14:03 +11:00
Jonathan Challinger
7b0e806db1
AP_Mount: correct status_msg to conform to MAVLink specification
2015-02-21 08:33:50 +09:00
Randy Mackay
73e00108e4
Mount: SToRM32 remove unnecessary include
2015-02-20 11:27:15 +09:00
Randy Mackay
23f0bab5d6
Mount: integrate SToRM32 backend
2015-02-20 11:05:40 +09:00