Commit Graph

47 Commits

Author SHA1 Message Date
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 1e354d53c9 GCS_MAVLink: added private channel mask
this allows a channel to be marked "private". A private channel gets
heartbeats, but doesn't get forwarded packets or broadcast messages

This is used by solo gimbal driver
2018-11-24 11:00:37 +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 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 ac1a00739c GCS_MAVLink: remove msg_snoop functionality
inherit from GCS_MAVLink if you want to see mavlink traffic
2018-03-28 09:28:23 +09:00
Peter Barker cc28ff49e9 GCS_MAVLink: support for a singleton 2017-02-13 09:32:01 +11:00
Lucas De Marchi 4e7b65260d GCS_MAVLink: shut up mavlink warnings 2017-02-06 09:27:22 -08:00
floaledm 9f8d2f0506 GCS_MAVLink: send status_text messages to Frsky lib queue 2016-11-08 07:42:39 +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
Andrew Tridgell 018b1143d2 GCS_MAVLink: handle difference between SERIALn_PROTOCOL=1 and 2 2016-05-21 15:25:17 +10: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
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
Andrew Tridgell 5080201be6 GCS_MAVLINK: added set_dataflash() method 2016-02-22 12:34:32 +11:00
Lucas De Marchi 5f26c951d8 GCS_MAVLink: stop using Progmem.h 2015-12-27 15:58:12 -02: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
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 f198cdcf20 GCS_MAVLink: added support for a MAVLink snoop function
this can be used to watch messages for different targets
2014-12-11 12:32:32 +09: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 11f88f0f5d GCS_MAVLink: added routing object to GCS_MAVLink 2014-12-11 12:30:55 +09:00
Andrew Tridgell de294277e9 GCS_MAVLink: cope with new mavlink repo change in mavlink_system_t 2014-11-18 11:20:28 +11:00
Andrew Tridgell b8675b9abc GCS_MAVLink: implement SERIAL_CONTROL MAVLink message 2014-04-05 07:34:33 +11: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 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 97b7130bb9 libraries: update license header to GPLv3
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
2013-08-30 13:01:39 +10:00
Andrew Tridgell 91a60be758 GCS_MAVLink: fixed indent-tabs-mode 2013-05-30 09:50:57 +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 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
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
Andrew Tridgell 2a7b298bbc MAVLink: moved mavlink variables back to library
these were moved to the main sketches to allow for compile time
selection of MAVLink 0.9 vs 1.0. We no longer support 0.9, so we can
move it back, which simplifies some test sketches
2012-08-09 12:06:21 +10:00
Andrew Tridgell d11957718f MAVLink: removed the cpp part of the library
this was preventing building MAVLink 1.0 with the arduino GUI as we
can't set cpp defines
2012-04-24 22:24:58 +10:00
James Goppert ba89f39781 Updated MAVLink to 1.0.6 release. 2012-04-19 15:46:29 -04:00
Andrew Tridgell de7cf3d1db mavlink: make it possible to build with mavlink 1.0 headers 2011-10-24 10:20:36 +11:00
Amilcar Lucas e5c248e2bf Moved mavlink_check_target() to the libraries/.
This allows it to be reused by the other libraries and by other projects ArduPlane, ArduCopter, ArduRover ... etc.
It also reduces code duplication
2011-09-24 14:40:07 +02:00
Andrew Tridgell edd7e509d9 MAVLink: enable separate MAVLink helpers
this makes the core MAVLink functions into library calls, instead of
being inlined. The resulting code size doesn't change, but it means we
can safely call MAVLink functions from multiple places without causing
undue code bloat
2011-09-18 11:03:27 +10:00
tridge60@gmail.com 89f9fafb90 BetterSerial has txspace() now
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3248 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-09-04 22:52:22 +00:00
tridge60@gmail.com 7774ac534e added comm_get_txspace() to GCS_MAVLink
this gives us the number of bytes available in the transmit buffer for
a mavlink channel

git-svn-id: https://arducopter.googlecode.com/svn/trunk@3246 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-09-04 21:23:24 +00:00
DrZiplok@gmail.com 7582353b08 Library wrapper for MAVLink protocol bits.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@924 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-25 06:38:18 +00:00