Commit Graph

365 Commits

Author SHA1 Message Date
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