Commit Graph

449 Commits

Author SHA1 Message Date
Randy Mackay 1a3ef62b84 GCS_MAVLink: add virtual send_winch_status 2020-08-07 21:55:07 +09:00
Dr.-Ing. Amilcar do Carmo Lucas 7067cbdafd GCS_Mavlink: Adapt to upstream mavlink changes to the SCALED_PRESSURE message 2020-07-29 14:34:22 +10:00
Andrew Tridgell 9466e7e71e GCS_MAVLink: make correct_offboard_timestamp_usec_to_ms protected
for use by vehicle code
2020-07-10 13:28:38 +10:00
Peter Barker e2056f56e3 GCS_MAVLink: support for sending generator message 2020-07-03 08:21:42 +09:00
Michael du Breuil 7fae084793 GCS_MAVLink: Only send a single battery status per call 2020-06-23 09:18:56 +10:00
chobits 991387dbfb GCS_MAVLink: support covariance field in vis pose msg 2020-06-09 13:31:21 +09:00
Peter Barker f158533fe9 GCS_MAVLink: allow private channels to also be active
This will allow for logging of private channels.
2020-06-09 10:37:32 +10:00
Peter Barker b428f12913 GCS_MAVLink: add and use accessor for last-RADIO_STATUS.remrssi-ms 2020-06-09 10:20:29 +10:00
Peter Barker 07e3f1d48f GCS_MAVLink: add RADIO_STATUS.rssi as an AP_RSSI telemetry source 2020-06-09 10:20:29 +10:00
chobits ff6e4c4f9a GCS_MAVLink: support VISION_SPEED_ESTIMATE 2020-06-01 17:51:24 +09:00
Andrew Tridgell 87c2858bde GCS_MAVLink: give banner on param download with ftp
thanks to Peter for noticing
2020-05-10 15:10:21 +10:00
Andrew Tridgell 7cd901fa5b GCS_MAVLink: enable ftp without filesystem
allows for @PARAM and @SYS
2020-04-29 07:36:55 +10:00
Andrew Tridgell 6811d79b6f GCS_MAVLink: define GCS_SEND_TEXT() globally
used to avoid linking GCS in AP_Periph
2020-04-29 07:36:55 +10:00
Peter Barker 26b88823f4 GCS_MAVLink: correct out-of-space-to-send call in HAVE_PAYLOAD_SPACE 2020-04-27 15:30:30 +10:00
Randy Mackay 6f8176c71e GCS_MAVLink: remove ahrs3 2020-04-22 14:11:17 +09:00
Peter Barker 8b9281eaa1 GCS_MAVLink: log number of times message not sent due to no space 2020-04-17 22:21:14 +10:00
Peter Barker 41ada7f8f4 GCS_MAVLink: document the payload-space macros 2020-04-17 10:20:49 +10:00
Randy Mackay c39fef6c56 GCS_MAVLink: pass vision-position-estimate reset_counter to AP_VisualOdom handler 2020-04-14 10:28:03 +10:00
Randy Mackay a9c1eb5af4 GCS_MAVLink: fill in sys_status vision position bits 2020-04-09 19:41:08 +09:00
Randy Mackay 728e8b45a9 GCS_MAVLink: use AP_VisualOdom to handle vision-position-estimate messages 2020-04-09 19:41:08 +09:00
Peter Barker ca7fcc093c GCS_MAVLink: correct return type on get_stream_slowdown_ms
Only used in one place.  On slow links may have caused us to re-request
a waypoint too often.  "Too often" is still >1s intervals.
2020-03-31 11:15:04 +11:00
Randy Mackay ecf5abc1f2 GCS_MAVLink: minor format fix 2020-03-30 20:20:08 +09:00
Andrew Tridgell 8a84dbc19e GCS_MAVLink: slow down telemetry during ftp 2020-03-28 15:28:03 +11:00
Peter Barker fbe2e75b9f GCS_MAVLink: divide time allowed to send messages fairly 2020-02-27 08:49:59 +11:00
Peter Barker 727c12c388 GCS_MAVLink: move initialisation of serial and gcs to AP_Vehicle 2020-02-25 11:50:55 +11:00
Peter Barker 1650979a2b GCS_MAVLink: add support for MAV_CMD_DEBUG_TRAP 2020-01-29 10:27:01 +11:00
Peter Barker e248bdfb16 GCS_MAVLink: split statustexts into 50-byte chunks using mav2 extensions 2020-01-28 19:56:38 +11:00
Peter Barker a9f62f196e GCS_MAVLink: consolidate places we snprintf statustexts 2020-01-14 10:38:43 +11:00
Peter Barker 01710c035e GCS_MAVLink: handle proximity and rangefinder messages 2019-12-24 12:08:54 +11:00
Andrew Tridgell dd73eac08c GCS_MAVLink: support MAV_CMD_FIXED_MAG_CAL_YAW 2019-12-18 17:20:37 +11:00
Peter Barker ebbcd00873 GCS_MAVLink: send statustext to all GCSs until update_send is called
until update_send it called we don't mark channels as streaming, so
send_statustext won't send to that channel.

Calculating the streaming mask could have been done as part of the init
call, but this fix may allow for information getting to the user in the
case that the streaming parameters are all zero, too.
2019-12-18 14:36:58 +11:00
Peter Barker b48da34c61 GCS_MAVLink: move setting of GPS SYS_STATUS bits up to base class 2019-12-05 13:02:19 +11:00
Peter Barker 314ea32ede GCS_MAVLink: any internal error means MAV_STATE_CRITICAL 2019-11-27 14:27:53 +11:00
Marian Soban 6e961b55eb GCS_MAVLink: LTM telemetry support 2019-11-26 12:14:13 +11:00
Peter Barker a96a4c0510 GCS_MAVLink: correct encoding used for send_to_components
These have to be packed onto the channel - otherwise they may ge
tencoded as mavlink1 instead of mavlink2 (or vice-versa)
2019-11-26 12:10:12 +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 a893a5483c GCS_MAVLink: support sysid targetting 2019-11-12 07:52:22 +08:00
Andrew Tridgell 43da68ae59 GCS_MAVLink: added ftp_push_replies() 2019-11-02 22:52:06 +11:00
Andrew Tridgell 00549d13fa GCS_MAVLink: rename emit_dir_entry to gen_dir_entry
comment from Sid
2019-11-02 22:52:06 +11:00
Michael du Breuil 6f538dd45a GCS_MAVLink: Initial FTP support 2019-11-02 22:52:06 +11:00
Michael du Breuil cb1b236439 GCS_MAVLink: Use the vehicle singleton to directly set the flight mode 2019-10-25 08:48:22 +08:00
Randy Mackay 7ce2fb8783 GCS_Mavlink: handle_preflight_reboot made virtual 2019-10-15 07:41:44 +09:00
Do Carmo Lucas dc4ad26e96 GCS_MAVLink: updates to support the latest stable mavlink changes (IMU temperature extension) 2019-10-10 13:23:03 +11:00
Randy Mackay 8686197c59 GCS_MAVLink: add comment above set-message-interval 2019-10-02 16:17:09 +09:00
Tatsuya Yamaguchi 9a99d9bff5 GCS_MAVLink: add set_message_interval functions 2019-10-02 16:09:44 +09:00
Andrew Tridgell 0deef76875 GCS_MAVLink: use HAL_MEM_CLASS for status sizes 2019-10-01 09:29:55 +10:00
Peter Barker 6d0c5da84a GCS_MAVLink: allow upload of fence using mission item protocol
GCS_MAVLink: add support for fence inclusion circles

GCS_MAVLink: factor out a transfer_is_complete; start commenting properly
2019-09-28 07:58:48 +09:00
Peter Barker 2f60b230cd GCS_MAVLink: use singleton to get AP_AdvancedFailsafe pointer 2019-09-17 09:13:43 +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 df5921a87c GCS_MAVLink: gate AP_DEVO_Telem behind !HAL_MINIMIZE_FEATURES 2019-09-04 17:47:33 +10:00
Michael du Breuil a74f00d045 GCS_MAVLink: Remove single use method 2019-09-03 14:35:17 +10:00
Peter Barker 5d9b332bcb GCS_MAVLink: log exectuted COMMAND_LONG and COMMAND_INT packets 2019-08-27 09:32:00 +10:00
Andrew Tridgell cfc37f2089 GCS_MAVLink: log corrected timestamp for vision data
this allows for debugging of link lag issues
2019-08-26 12:27:31 +10:00
Peter Barker 052e721622 GCS_MAVLink: tweak timings debug messages 2019-08-24 15:33:50 +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 03c439f9ab GCS_MAVLink: make update_sensor_status_flags private 2019-08-17 17:45:03 +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 4b012ab62b GCS_MAVLink: deny upload of non-MISSION items if not doing mavlink2 2019-08-06 13:58:44 +10:00
Peter Barker cf0b7cf016 GCS_MAVLink: pass link object in place of channel to compass cal
Also eliminate intermediate function as just adding noise
2019-08-05 09:23:10 +10:00
Peter Barker 880e96448b GCS_MAVLink: tighten type on mavlink_coordinate_frame_to_location_alt_frame 2019-08-01 17:45:30 +10:00
Peter Barker 5e55aedd20 GCS_MAVLink: add printf-format attribute to send_text methods 2019-07-26 10:54:41 +10:00
Peter Barker 93ca243987 GCS_MAVLink: rearrange mission item handling code
This splits the missionitemprotocol handling entirely into separate
header files and separate compilation units.
2019-07-18 10:48:57 +09: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 459680e7c8 GCS_MAVLink: make Avoidance responsible for sending collision message 2019-07-16 09:52:54 +10:00
Peter Barker c0993509f7 GCS_MAVLink: declare GCS_MAVLINK as a class as it hasn't been defined yet 2019-07-16 09:29:48 +10:00
Peter Barker 6cb8fcc466 GCS_MAVLink: move use of AP_AHRS_NAVEKF_AVAILABLE into cpp file
This is defined in AP_AHRS which we only get transitively in the header
2019-07-09 22:32:57 +10:00
Peter Barker 1ebbe45fe1 GCS_MAVLink: split sending of RC_CHANNELS and RC_CHANNELS_RAW
Before this patch is applied we may never send the second message
because there's not room for it in the buffer and we can't return
failure-to-send (always interpreted as "retry") as we're in a void function.

Further, if you are on a mavlink2 connection we will not send out the
RC_CHANNELS_RAW message, depriving the user of any RC_CHANNELS messages.

This patch does have the drawback of doing more work on a mavlink1
connection - it has to fetch the data twice.  On the other hand, it also
allows the GCS to set the message rates independently for both
RC_CHANNELS and RC_CHANNELS_RAW so one or the other can be squelched.
That could be handy for reducing bandwidth if you know you're not using
more than 8 input channels.
2019-07-09 13:08:45 +10:00
Michael du Breuil f955a4e4d5 GCS_MAVLink: Don't retain a FrSky instance if we aren't using it
Saves 96 bytes of RAM
2019-06-26 11:59:41 +10:00
Peter Barker feddaabc42 GCS_MAVLink: handle out-of-time to send messages in parent class 2019-06-25 10:29:40 +10:00
Andrew Tridgell f28df4dff1 GCS_MAVLink: support MAV_CMD_BATTERY_RESET command 2019-06-25 09:56:25 +10:00
Peter Barker a55c40949b GCS_MAVLink: remove pointless protocol parameter to setup_uart 2019-06-25 09:47:08 +10:00
Peter Barker ca449cd979 GCS_MAVLink: stop pointlessly passing serial manager around 2019-06-25 09:47:08 +10:00
Peter Barker 45fab82345 GCS_MAVLink: eliminate redundant static pointer to serialmanager 2019-06-25 09:47:08 +10:00
Michael du Breuil 8c00102259 GCS_MAVLink: Reduce scoping on AP_BattMonitor include 2019-06-18 10:02:05 +10:00
Peter Barker a025794bae GCS_MAVLink: correct is_streaming check and update of is-streaming mask 2019-06-11 09:26:10 +10:00
Peter Barker 264a757095 GCS_MAVLink: add send_to_active_channels method 2019-06-06 12:41:48 +10:00
Peter Barker 75ae6b59b0 GCS_MAVLink: allow Copter to disallow mavlink disarm 2019-05-30 07:37:30 +09:00
Peter Barker 1b90643751 GCS_MAVLink: report more internal errors in SYS_STATUS 2019-05-23 07:29:29 +10:00
Peter Barker d0105c8fa7 GCS_MAVLink: factor mission handling, use for Rally
GCS_MAVLink: allow all mission types to be cleared

GCS_MAVLink: remove unused parameters from handle-mission-count
2019-05-22 08:53:45 +10:00
Peter Barker a0c80a0b3b GCS_MAVLink: make send_text and send_textv const 2019-05-01 10:18:46 +10:00
Peter Barker c143ec47da GCS_MAVLink: Bitmask is now a template 2019-04-16 15:12:07 +10:00
Randy Mackay bbd051b246 GCS_MAVLink: send OPTICAL_FLOW messages to optical flow driver 2019-04-08 11:26:59 +09:00
Michael du Breuil 8cafbe394f GCS_MAVLink: Fix includes 2019-04-05 20:12:53 +11:00
Rajat Singhal b7a40f2bfe GCS_Mavlink: Add function for sending POSITION_TARGET_LOCAL_NED message 2019-03-29 09:11:14 +11:00
Peter Barker 30a66d9f13 GCS_MAVLink: implement a convenience manual_override method 2019-03-27 22:33:47 -07:00
Randy Mackay b496af411e GCS_MAVLink: fix typo 2019-03-28 13:54:19 +09:00
Peter Barker 778bff966c GCS_MAVLink: stop passing dataflash into handle_radio_status
It can use the singleton instead
2019-03-27 10:38:39 +11:00
Peter Barker 0ef26a6950 GCS_MAVLink: add support for request_message 2019-03-26 16:20:50 +11:00
Peter Barker 2796beac8d GCS_MAVLink: move various sensor status flag updates up 2019-03-26 11:03:21 +11:00
Peter Barker b3203601f3 GCS_MAVLink: send internal errors as bitmask in sys_status 2019-03-21 21:34:33 +11:00
Peter Barker 95745f0d31 GCS_MAVLink: move command-long DO_SET_HOME up 2019-03-19 19:56:13 +11:00
Peter Barker bc2080cea2 GCS_MAVLink: move devo telemetry handling to GCS 2019-03-19 14:39:14 +11:00
Peter Barker 3100c8edad GCS_MAVLink: GCS can report simple/supersimple input modes 2019-03-19 14:39:14 +11:00
Peter Barker cf264a7d5e GCS_MAVLink: move vehicle_initialised to be on GCS not GCS_MAVLink 2019-03-19 14:39:14 +11:00
Peter Barker b12d20d86c GCS_MAVLink: add support for frame_string 2019-03-19 14:39:14 +11:00
Peter Barker ab1c42696c GCS_MAVLink: move FRsky telemetry up into common GCS telemetry class 2019-03-19 14:39:14 +11:00
Michael du Breuil 75caad52c0 GCS_MAVLink: Always check the return value on get_velocity_NED 2019-03-19 11:42:54 +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 716b0fdc88 GCS_MAVLink: use enum class for AltFrame enumeration 2019-03-19 10:31:18 +11:00