Commit Graph

62 Commits

Author SHA1 Message Date
Daniel Agar a7f330075a clang-tidy: enable hicpp-braces-around-statements and fix 2019-10-28 10:50:31 -04:00
BazookaJoe1900 3007b0876c mavlink: add protection against setting wrong type of parameters 2019-10-14 11:18:08 -04:00
Daniel Agar fe4f6c186e Mavlink: ifdef networking code 2019-09-21 13:46:01 -04:00
Daniel Agar 494f35d5f4 Mavlink: wait for boot complete before sending or receiving anything 2019-09-18 09:07:55 -04:00
Daniel Agar f280977ed0 mavlink: update orb_publish to uORB::Publication<> 2019-09-02 23:51:54 -05:00
Daniel Agar e69398c09f introduce uORB::PublicationQueued and transition most orb_advertise_queue usage 2019-08-04 10:08:09 -04:00
Daniel Agar 34598fe353 mavlink uavcan parameters initialize value 2019-08-03 15:05:34 -04:00
Daniel Agar 579cbbb42c mavlink move to new lightweight uORB::Subscription 2019-06-03 17:06:21 -04:00
Daniel Agar f3533d31f8 mavlink update to latest and enable address-of-packed-member warning 2019-03-14 09:56:09 +01:00
Roman Bapst bef8b6b949 mavlink hash check: return early in case of hash check parameter (#10861)
*  a request for setting the '_HASH_CHECK' parameter is handled differently
than the same request for a standard parameter. Make sure we don't actually
try to set the parameter.

Signed-off-by: Roman <bapstroman@gmail.com>
2018-11-25 14:01:23 -05:00
Julian Oes 428c2f72bd mavlink: always acknowledge a param write
This change has two effects:
1. We always acknowledge a param write no matter if the value was
   actually changed or not. This is according to the spec:
   https://mavlink.io/en/services/parameter.html#write-parameters
2. This fixes the bug where int32 parameters were not actually acked
   because the memory of the param value was casted directly to float
   and then compared. In the case of a int32 parameter set from 0 to 1
   it would mean that the cast to float of the memory representation
   was still 0 and therefore it was assumed to be "no change" and the
   ack was omitted.
2018-11-01 00:06:22 +01:00
Roman Bapst f361749d70 mavlink temporary workarounds for dronekit: added parameters to disable (#10422)
hash check and heartbeat forwarding

- hash check disabling: for systems where a companion link forwards messages
to QGC (e.g. via LTE) parameter streaming will be stopped as soon as QGC
sends the request to stop the stream. If the companion side for some reason
still requires the stream to be active we need to disable QGC from stopping
the stream. Normally dronekit should be responsible for filtering out the
request from QGC but apparently this is not possible.

- disable heartbeat forwarding: dronekit does seem to get confused if
heartbeats from another system other than the autopilot get forwarded to it.
Example: Sending messages from QGC via the autopilot to dronekit running on
companion computer.

Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-17 13:24:20 -04:00
David Sidrane 8aa1d4d68d BUGFIX hardfault FMUv5 List was used before being initalized.
_uavcan_open_request_list was accessed before it was initalized.
2018-06-12 13:44:04 -07:00
Beat Küng 289e618b6c mavlink: fix compiler warnings with GCC 8.0.1
-Wno-extra-semi is not valid for C code
2018-05-09 07:59:46 +02:00
Lorenz Meier 27e64149f0 MAVLink app: Avoid comparing to zero for value change
No functional change, but this avoids numerical issues in the check routine. Since the routine will tend to false positives, we will tend to send more param updates than required in case of numerical noise of the float representation. This is desired, as we prefer to send two updates rather than not sending one.
2018-01-08 09:27:22 +01:00
Lorenz Meier f284385c3f MAVLink parameters: Send all updated parameters asynchronously
Parameters can change not just based on GCS request, but also due to internal code or requests by a different valid connected control authority such a cloud service. This change ensures that all connected systems get updated via MAVLink asynchronously.
2018-01-08 09:27:22 +01:00
Lorenz Meier fba592b5fc MAVLink app: Send newest param hash for every param change to notify GCS about change
This should help keeping the GCS up to date about asynchronous changes on the autopilot.
2018-01-08 09:27:22 +01:00
Lorenz Meier 4eac493413 MAVLink app: Remove deprecation support for old param
This has been out of use for more than a year now and is no longer required.
2018-01-08 09:27:22 +01:00
Daniel Agar ce78f254c2 mavlink parameters initialize struct
- fixes CID 141890
2017-10-31 08:11:18 +01:00
Beat Küng a89980f440 MavlinkParametersManager: update sending rate
This is an adjustment due to the changed calling frequency of send()
(was 300 Hz, is now 100 Hz)
2017-05-18 09:48:14 +02:00
Beat Küng d70caeb24b MavlinkParametersManager: remove MavlinkStream inheritance 2017-05-18 09:48:14 +02:00
Beat Küng 45af77a543 mavlink parameters: try to send 5 params at once on USB & UDP connections
This further speeds up param loading.

On Pixracer via USB, it's possible to send up to 11 at once before the TX
buffer gets full, so there is still enough free bandwidth left.
2017-03-14 21:30:04 +01:00
Michael Schaeuble 0d61e22d9b mavlink: Buffer UAVCAN parameter re-requests
We buffer the mavlink messages and don't forward them directly
via uORB. This solves an issue where many requests are dropped and
QGC does not start properly in combination with UAVCAN devices.
2017-02-17 09:15:56 +01:00
Lorenz Meier 3eb7caba4f MAVLink param handling: Exclude Coverity false positives 2017-01-14 07:47:03 -08:00
Daniel Agar c9956e25b4 mavlink fix code style 2017-01-07 01:03:18 -05:00
Lorenz Meier 86c581b2ef Enable usage of UAVCAN node ID for params 2016-11-13 18:43:15 +01:00
Lorenz Meier 9866ff8959 Allow sending a param with a different component ID 2016-11-13 18:43:15 +01:00
Beat Küng 643ccd66b6 MavlinkParametersManager: output deprecation warning if INAV is selected 2016-11-08 11:17:07 +01:00
Lorenz Meier 720c445f21 MAVLink: Code style 2016-08-26 23:43:33 +02:00
Lorenz Meier 71d150f6ec MAVLink app: Fix rate handling 2016-07-10 17:05:33 +02:00
Beat Küng 0eb22823a6 fix resource leak in MavlinkParametersManager: call orb_unsubscribe 2016-06-07 10:05:59 +02:00
Lorenz Meier 0a597d0d62 MAVLink: Update to version 2 compaat API 2016-05-19 20:13:32 +02:00
Daniel Agar 76387b1693 uorb autogeneration 2016-05-14 11:27:07 +02:00
Daniel Agar 7aa6e85563 enable Wshadow 2016-05-05 13:32:42 +02:00
Nate Weibley a1c9dc1f68 When restarting listing all parameters, skip sending hash on subsequent request
This change fixes a bug where hash-aware QGC using the old spec would continuously request the parameter list every time it received a mismatched hash.
2016-02-18 18:51:17 +01:00
Nate Weibley ae3838ff2e Remove superfluous parameter cache load message 2016-02-18 18:51:17 +01:00
Nate Weibley 0419a99f00 New param hashing spec
- When listing all params, lead with _HASH_CHECK value for cache load
 - When set value on _HASH_CHECK is rx'd, stop any ongoing listing req
2016-02-18 18:51:17 +01:00
Lorenz Meier b126f00052 Merged master 2015-10-14 22:07:49 +02:00
Ben Dyer 7dacb835b9 Fixing build on targets without the UAVCAN module 2015-10-14 00:50:07 +11:00
Ben Dyer 250c912704 Added MAVLink/UAVCAN parameter bridge; implemented UAVCAN ESC enumeration 2015-10-13 21:50:23 +11:00
Nate Weibley d7274ac5f0 Enable hash check of used parameters to verify integrity of GCS local copy 2015-10-12 13:40:14 -04:00
Lorenz Meier d7bfdfd234 MAVLink app: Adjust to changes in uORB topic 2015-08-20 10:20:27 +02:00
Lorenz Meier 951b27518f Merged beta to master 2015-08-06 10:08:50 +02:00
Lorenz Meier e2c657ede0 MAVLink params: Eventually time out to make QGC happy, but let the user know that the boot failed. 2015-08-06 00:13:09 +02:00
Lorenz Meier ea7ae7d019 Merged beta into master 2015-08-01 16:58:02 +02:00
Lorenz Meier a1fd088e8f MAVLink app: Rely on booted state, not on timeout for parameters. This fixes any param timing issues for good. 2015-07-22 10:03:45 +02:00
Lorenz Meier 454becdae5 Merged release_v1.0.0 branch into master 2015-06-25 21:45:17 +02:00
Lorenz Meier c192398a65 mavlink app: Be more verbose on param load fails 2015-06-23 09:36:19 +02:00
Mark Charlebois a452478ef9 More fixups for orb_advert_t changed to void *
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Mark Charlebois 1ca05aaa64 orb_advert_t changed to void * and checks changed to nullptr
The existing orb_advert_t use thoughout the code sometimes tries
to treat it as a file descriptor and there are checks for < 0
and ::close calls on orb_advert_t types which is an invalid use
of an object pointer, which is what orb_advert_t really is.

Initially I had changed the -1 initializations to 0 but it was
suggested that this should be nullptr. That was a good recommendation
but the definition of orb_advert_t had to change to void * because
you cannot initialize a uintptr_t as nullptr.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00