Commit Graph

51 Commits

Author SHA1 Message Date
Peter Barker 4cf71de646 GCS_MAVLink: allow compilation with HAL_LOGGING_ENABLED false 2024-01-17 18:25:55 +11:00
Peter Barker ed5da4ead2 GCS_MAVLink: allow more libraries to compile with no HAL_GCS_ENABLED 2023-09-05 22:23:51 +10:00
olliw42 d570f67420 GCS_MAVLink: use bw_in_bytes_per-scond()
avoid division by zero in FTP, and correct wrong calculus in Param which made it ineffective
2023-01-31 17:58:04 +11:00
Andrew Tridgell 1716fcf995 GCS_MAVLink: fixed valgrind errors with AP_Param::ParamToken 2021-01-26 10:43:09 +11:00
Brad Bosch a2192eda5e GCS_MAVLink: use RADIO_STATUS message txbuf field
this avoids overrunning radio buffer in queued_param_send()
2021-01-12 10:46:15 +11:00
Andrew Tridgell 5e3bf0a703 GCS_MAVLink: implement BRD_OPTIONS bit for setting of internal parameters 2020-12-08 13:22:17 +11:00
Andrew Tridgell 65e790a48c GCS_MAVLink: invalidate param count on set of ENABLE param 2020-04-29 07:36:55 +10:00
Andrew Tridgell 21e93dae34 GCS_MAVLink: send only old value for readonly param set
this prevents a condition where the GCS can display the wrong value if
the 2nd PARAM_VALUE is lost

Note that groundstations can tell the set failed due to readonly in
the following ways:

 1) look for the statustext: Param write denied (PARAMNAME)

 2) see that the value came back with the old value, with index of
   65535

 3) can repeat the send, looking for (1) and (2)

Michael has proposed we add a PARAM_VALUE mavlink2 flags
extension. That would be nice, but we should still make this change to
fix the issue with mavlink 1.0
2020-03-31 11:19:58 +11:00
Peter Barker 87a31c6409 GCS_MAVLink: don't recalculate max parameter count if not streaming params 2020-02-18 10:33:41 +11:00
murata 91e09338ea GCS_MAVLInk: Judgment of non-existence value by PARAM_SET 2019-12-31 10:12:01 +11:00
Peter Barker 7d2557b316 GCS_MAVLink: correct txspace return value issues
- checking of space in send_to_active_channels was incorrect - did not
take into account locked status of the channel

 - corrected return value on comm_get_txspace - took a uint32_t, cast it
to int16_t, checked it for zero, then cast it to uint16_t on return.
That's just... odd.
2019-11-12 16:33:12 +11:00
Peter Barker 4838ee6f58 GCS_MAVLink: check reply channel for space rather than current channel 2019-11-02 10:34:03 +11:00
Michael du Breuil 5000891a76 GCS_MAVLink: remove some unused includes 2019-09-19 10:48:25 +09:00
Andrew Tridgell 8bb6a67b36 GCS_MAVLink: refuse set of read-only parameters 2019-09-12 10:50:30 +10:00
Peter Barker 4f9d1ada33 GCS_MAVLink: deny setting MIS_TOTAL parameter
Closes #11413

GCS_MAVLink: conform to parameter protocol requirements while ignoring sets

GCS_MAVLink: use internal-use-only param bit
2019-08-22 09:23:56 +10:00
Peter Barker 74670a77be GCS_MAVLink: avoid allocating a GCS_MAVLINK per mavlink channel 2019-08-14 18:25:43 +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
Pierre Kancir b1506ca652 GCS_MAVLink: pass mavlink_message_t by const reference 2019-07-16 20:51:42 +10:00
Peter Barker c6533723de GCS_Param: correct sending of parameters of length 16 2019-07-06 18:06:17 +10:00
Peter Barker a2c4bfea0c GCS_MAVLink: use send_to_active_channels for parameters 2019-06-18 10:27:56 +10:00
Michael du Breuil 8cafbe394f GCS_MAVLink: Fix includes 2019-04-05 20:12:53 +11:00
Tom Pittenger 8845cc2053 GCS_MAVLink: rename dataflash to logger 2019-03-28 16:40:58 +11:00
Peter Barker 3dc2db8d9a GCS_MAVLink: queue parameter request even if we can't fit a reply ATM 2019-03-19 10:37:09 +11:00
Peter Barker 4eba6d4fe2 GCS_MAVLink: exempt requested parameters from buffer space reservation
Fixes a problem where we reserve space to send replies but then do not
bypass the reserved-space checks when sending them.
2019-03-19 10:37:09 +11:00
Peter Barker f0200a4d9b GCS_MAVLink: GCS_Common: correct overflows in bandwidth and count calculations 2019-03-19 10:37:09 +11: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
Tom Pittenger 9f0e895c37 GCS_MAVLink: unify singleton naming to _singleton and get_singleton() 2019-02-10 19:09:58 -07: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 8fd8ae660b GCS_MAVLink: send multiple async replies per call to send_queued_param 2019-01-15 10:11:21 +11:00
Peter Barker 99ea5d1a5e GCS_MAVLink: avoid initial rush of params into uart
bandwidth calculation is based on this.
2019-01-15 10:11:21 +11:00
Peter Barker 35f3906424 GCS_MAVLink: do not adjust parameter stream rate on MAV_DATA_STREAM_ALL 2019-01-14 13:27:55 +11:00
Peter Barker 979e5261d5 GCS_MAVLink: remove unused method 2018-12-19 10:55:38 +09:00
Peter Barker 61e048a41b GCS_MAVLink: tidy queued_param_send a little 2018-12-18 21:51:31 +11:00
Peter Barker ef46acda71 GCS_MAVLink: support MAV_CMD_SET_MESSAGE_INTERVAL 2018-12-10 12:52:41 +09:00
Peter Barker 1eac03a257 GCS_MAVLink: scale parameter send rate according to link bandwidth 2018-10-30 19:31:37 +11:00
Peter Barker d8871078ff GCS_MAVLink: create persist_streamrates() callback to indicate persistence
Removes the catching of the message in each vehicle separately.
2018-05-29 13:08:29 +10:00
Peter Barker bf124e9333 GCS_MAVLink: make send_parameter_value_all a GCS method rather than static 2018-05-01 09:39:01 +10:00
Peter Barker c3e70e477d GCS_MAVLink: avoid using global chan to uart mapping
This is an instance method, so it has a pointer to its own
uart
2018-04-02 23:04:24 +01:00
Michael du Breuil 9b7c3ce9a7 GCS_Mavlink: Fix out of bounds access, CID 144337 2017-10-28 03:30:46 +01:00
Peter Barker 1544a92f8b GCS_MAVLink: factor out a send_banner 2017-08-30 15:54:47 +01:00
Peter Barker 2e078f7c5e GCS_MAVLink: send fw_string, px4 git hash and nuttx hash on param request 2017-08-30 15:54:47 +01:00
Peter Barker 8a7a1b77dd GCS_MAVLink: handle param_request_list in GCS_MAVLINK base class 2017-08-30 15:54:47 +01:00
Peter Barker 50242178b3 GCS_MAVLink: handle param_set in GCS_MAVLINK base class 2017-08-30 15:54:47 +01:00
Peter Barker 95ff94bfad GCS_MAVLink: factor out a handle_common_param_message 2017-08-30 15:54:47 +01:00
Peter Barker e9204a66ee GCS_MAVLink: include version for AP_FWVersion 2017-08-30 15:54:46 +01:00
Peter Barker b18c1853f9 GCS_MAVLink: count parameters in param thread
This helps avoid counting parameters on the main thread,
avoiding long-loops
2017-05-11 08:21:17 +10:00
Andrew Tridgell 5c62e4f4c2 GCS_MAVLink: don't use more than 1ms sending parameters
this reduces the scheduling misses when fetching parameters initially
2017-05-01 14:37:15 +10:00
Andrew Tridgell f465c37c65 GCS_MAVLink: added async parameter sending 2017-05-01 14:37:13 +10:00
Andrew Tridgell 5c4ca3bf0b GCS_MAVLink: added send_queued_parameters() 2017-05-01 14:36:52 +10:00