Peter Barker
e3c4d9fd23
GCS_MAVLink: allocate mavlink status and send buffers dynamically
...
This makes ArduPilot responsible for supplying buffers to the mavlink layer, rather than that layer allocating them based on MAVLINK_COMM_NUM_BUFFERS.
We will want to rename MAVLINK_COMM_NUM_BUFFERS to AP_GCS_MAX_BACKENDS at some stage.
2023-06-21 17:50:31 +10:00
Peter Barker
29d6c51f43
SITL: stop using mavlink channels for packing messages
...
precedent was set in the mavlink rangefinder; we don't need to re-use SITL buffers for this
2023-05-16 10:17:56 +10:00
Andrew Tridgell
44d9d410a1
GCS_MAVLink: fixed mavlink packet corruption with multiple threads
...
this ensures we don't try to send more data to a uart than is
available in the tx buffer
2022-02-19 17:20:17 +11:00
Peter Barker
a6713f8368
GCS_MAVLink: build ArduPilot against all.xml not ardupilotmega.xml
2022-02-08 11:00:41 +11:00
Andrew Tridgell
91aaa7876d
GCS_MAVLink: reserve another mavlink channel
...
for SimShip
2020-07-10 13:28:38 +10:00
Peter Barker
8fc55b9678
GCS_MAVLink: remove comm_get_available
...
available returns an unsigned integer, so this was just weird
2019-09-10 15:45:27 +10:00
Peter Barker
210c2070a1
GCS_MAVLink: remove include of AP_Param.h in GCS_MAVLink.h
...
This will help break include loops.
2019-07-17 18:05:29 +10:00
Jaaaky
971e3af826
GCS_MAVLink: prgama away address-of-packed-member only for g++ >= 9
2019-05-03 01:57:26 +10:00
Peter Barker
9273ac3631
GCS_MAVLink: pragma away address-of-packed-member
...
g++-9 throws a lot of warnings for taking addresses of packed members.
We can have this warning for our ArduPilot code, but there's way too
many issues within MAVLink to put up with.
2019-05-01 19:36:49 -07:00
Peter Barker
49493676ea
GCS_MAVLink: use MAV_PARAM_TYPE for sending parameter messages
...
... rather than mavlink_message_type_t
2019-02-26 08:20:25 +11:00
Andrew Tridgell
048a52ebc0
GCS_MAVLink: make mavlink send from multiple threads safe
...
this takes a lock to prevent interleaving of mavlink msgs from
multiple threads
2018-08-16 12:40:10 +10:00
Peter Barker
1aaf7e96af
GCS_MAVLink: remove intermediate functions
...
GCS_MAVLink: remove comm_receive_ch
This is a lot of sanity checking in a static function which has been
called from a place where things are guaranteed
GCS_MAVLink: remove unused comm_is_idle
GCS_MAVLink: remove unused comm_send_ch
GCS_MAVLink: remove unused hal reference
GCS_MAVLink: remove unused #includes
2018-05-29 14:42:02 +10:00
Andrew Tridgell
a5fe798e7f
GCS_MAVLink: we don't need the conversion helpers
2018-05-07 11:43:23 +10:00
Andrew Tridgell
fd3037bbb7
GCS_MAVLink: add support for alternative protocol
...
this allows an alternative to MAVLink to be installed on a GCS
port. This is used for BLHeli passthru support
2018-04-07 09:10:29 +10:00
Peter Barker
42547d2d6d
GCS_MAVLink: allow extra mavlink port for packing vicon messages
2018-04-02 09:23:27 +09:00
Andrew Tridgell
e255f07022
GCS_MAVLink: rename ch variable
...
avoid conflict with ch variable from ChibiOS
2018-01-15 11:46:02 +11: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
Andrew Tridgell
b3f94184f2
GCS_MAVLink: always build with MAVLink2 headers
2016-05-21 15:25:16 +10:00
Andrew Tridgell
0ead0ab978
GCS_MAVLink: support mavlink2 build
2016-05-21 15:25:12 +10:00
Andrew Tridgell
62986957b4
GCS_MAVLink: raise number of mavlink buffers to 5
2016-04-20 09:39:50 +10:00
Lucas De Marchi
a502c0924c
GCS_MAVLink: simplify sanity check
2016-03-30 01:32:45 -03:00
Francisco Ferreira
d3e149e5d7
GCS_MAVLink: ignore Clang out-of-range warning
...
warning: comparison of constant 4 with expression of type 'mavlink_channel_t' is always false [-Wtautological-constant-out-of-range-compare]
if (chan >= MAVLINK_COMM_NUM_BUFFERS) {
~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
2016-03-30 01:32:45 -03:00
Lucas De Marchi
c2b5ad46b4
GCS_MAVLink: replace header guard with pragma once
2016-03-16 18:40:44 +11:00
Lucas De Marchi
039f42d916
GCS_MAVLink: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1
2015-11-04 12:14:13 +11:00
squilter
426dab5078
GCS_MAVLink: update severities and remove old enum
2015-08-28 10:04:35 +10:00
Gustavo Jose de Sousa
d7a2ef3e35
GCS_MAVLink: 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:25 +10:00
Randy Mackay
85eeba93c0
GCS_MAVLink: mavlink_comm_port to array
2015-05-15 15:07:31 +09:00
Randy Mackay
62e7e8cc7d
GCS_MAVLink: add support for 4th mavlink chan on PX4
2015-05-15 15:07:23 +09:00
Randy Mackay
1157c13eb6
GCS_MAVLink: mavlink_comm_x become UARTDrivers
2015-01-29 14:05:12 +11:00
Andrew Tridgell
f1edd1bafb
GCS_MAVLink: removed use of mavlink_check_target()
...
not needed now we do routing properly, as messages will only be
processed if they are for us
2014-12-11 12:31:06 +09:00
Andrew Tridgell
ffd6fa1366
GCS_MAVLink: ignore alignment warnings in MAVLink headers
2014-07-25 17:14:48 +10:00
Andrew Tridgell
013aaf4d3e
GCS_MAVLink: moved comms functions to not be inline
...
saves a bit of flash space
2014-04-04 13:19:15 +11:00
Andrew Tridgell
d9e8c34a89
GCS_MAVLink: allow for proxying of larger MAVLink messages on PX4
...
this makes it possible to deal with large MAVLink messages
2014-03-11 13:48:25 +11:00
Andrew Tridgell
ac24ff0b1e
GCS_MAVLink: added support for 3 UARTs
...
support 3 UARTs on non-AVR platforms
2013-11-23 19:29:22 +11:00
Andrew Tridgell
8d227b801f
GCS_MAVLink: increase max packet size to 104
...
this enables the DATA96 packet to be sent
2013-11-22 15:08:34 +11:00
Andrew Tridgell
445edb8793
GCS_MAVLink: remove CR/LF
2013-09-19 16:27:14 +10:00
Randy Mackay
8545071a21
GCS_MAVLink: include AP_Math.h
...
Required because mavlink_conversions's mavlink_dcm_to_euler function
uses atan2
2013-07-14 15:56:58 +09:00
Andrew Tridgell
91a60be758
GCS_MAVLink: fixed indent-tabs-mode
2013-05-30 09:50:57 +10:00
Andrew Tridgell
11bf6f40f7
GCS_MAVLink: moved gcs_severity to library header
2013-05-09 09:27:58 +10:00
Andrew Tridgell
7e58bde826
GCS_MAVLink: added comm_is_idle() function
...
this will make CLI detection more reliable
2013-03-21 21:55:12 +11:00
Andrew Tridgell
ea3b405959
MAVLink: moved CRC table into program
...
this saves 256 bytes of memory
2013-01-10 21:28:07 +11:00
Andrew Tridgell
dc66708856
MAVLink: cope with available() returning -1
2013-01-09 13:31:00 +11:00
Andrew Tridgell
c9fe7fe932
MAVLink: use buffer send and fast CRC if possible
2013-01-08 14:37:40 -08:00
Andrew Tridgell
feeebae03f
GCS_MAVLink: added comm_send_buffer()
...
this reduces the overhead of sending messages
2013-01-08 14:37:39 -08:00
Pat Hickey
6661f827fa
GCS_MAVLink: port to work with AP_HAL class rather than FastSerial
2012-12-20 14:51:24 +11:00
Pat Hickey
3f1d9d7f69
AP_Param: #include <AP_Param.h> fixups for libraries & sketches
...
* I mostly went through with grep and added an #include <AP_Param.h> below
every #include <AP_Common.h>. Not all of these example sketches might
strictly need AP_Param.
2012-12-20 14:51:19 +11:00
Andrew Tridgell
15abc784ec
MAVLink: use a smaller maximum payload to reduce memory
...
this limits the sizes of the MAVLink buffers. It doesn't make a big
difference now, but it will matter when we update to the latest
mavlink code which has some very large packets
2012-12-03 23:28:23 +11:00
Andrew Tridgell
9f9d570597
MAVLink: comm_get_txspace should return 0 on error
...
it is used in expressions that add constants
2012-09-25 07:20:43 +10:00
Andrew Tridgell
3a1ff7bdd9
Mavlink: enable MAVLINK_SEPARATE_HELPERS
...
this fixes a seq number problem with SIMSTATE packets
2012-09-08 10:06:19 +10:00
Andrew Tridgell
dc47074dbd
MAVLink: removed the need for Mavlink_compat.h
...
we have now fully transitioned to MAVLink 1.0, so we no longer need
the compatibility layer and the old names in the code
2012-08-09 12:22:46 +10:00