Commit Graph

1751 Commits

Author SHA1 Message Date
Peter Barker b7cf418d1e GCS_MAVLink: allow handling of AP_MAVLINK_MSG_HIL_GPS_ENABLED to be compiled out 2024-05-23 09:16:32 +10:00
Peter Barker 9f0e191505 GCS_MAVLink: deny attempt to do partial upload while mission transfer in progress
fixes an internal error where we make sure resources are not allocated before allocating upload resources.

The user may receive a DENIED message if they move a waypoint before an item has been transfered to the vehicle.
2024-05-15 12:26:34 +10:00
Peter Barker bd3e58c413 GCS_MAVLink: mark as not receiving when too many items in MISSION_COUNT.count
we left things in the "receiving" state, which would eventually lead to a timeout, rather than just failing instanenously with the correct code.
2024-05-14 09:21:53 +10:00
Peter Barker 549411133b GCS_MAVLink: move handling of AP_Radio RC input down into AP_RCProtocol 2024-05-01 17:51:49 +10:00
Brad Bosch e8d2097ec4 GCS_MAVLink: Avoid serial passthrough buffer exhausted/lost data
Just don't read more than we can write.
2024-04-29 20:06:43 +10:00
Peter Barker ee038cdf1f GCS_MAVLink: adjust for AP_SCHEDULER_ENABLED being false 2024-04-18 08:25:15 +10:00
Peter Barker 7d10b0fc4d GCS_MAVLink: add and use AP_HOME_ENABLED 2024-04-17 18:09:25 +10:00
Brad Bosch 6538e8c9ae GCS_MAVLink: Cleanup and Reduce chance of GCS FTP timeout
Delete unneeded orphan comment
replace get_last_txbuf() with a predicate
Make txbuf flow control threashold consistent between Parameter download and FTP and keep it in range where we are also slowing down normal streams
Delay sending text banner until after first FTP response to reduce latency on slow links
Don't let flow control delay setting ftp.last_send_ms so as to slow down normal streams as soon as possible to improve FTP response time
2024-04-16 09:16:52 +10:00
Brad Bosch bbfb0ed001 GCS_MAVLink: Make get_last_txbuf() safer
Add check for stale radio_status to get_last_txbuf()
Move last_txbuf into last_radio_status struct
2024-04-16 09:16:52 +10:00
Brad Bosch 0e47599bb1 GCS_MAVLink: respect txbuf flow control for FTP messages
This gives slow radio links a fighting chance of getting FTP bulk download working even when they use a baud rate which is much higher than their current bandwidth.

This should eliminate the need to disable FTP for parameter download on slow to moderate speed radio links like mLRS and ELRS.  It allows removal of a hack in mLRS which results in a decrease in parameter download time for 19 Hz mLRS from 45-60 seconds to 11-17 seconds.  This should also be good news for the ELRS rc-mavlink branch.
2024-04-16 09:16:52 +10:00
Peter Barker f83cde7760 GCS_MAVLink: correct spelling of dereferecing 2024-04-10 21:56:52 +10:00
Peter Barker 420f80db75 GCS_MAVLink: move handling of DO_SET_HOME up to GCS_MAVLink base class 2024-04-09 09:35:16 +10:00
Clyde McQueen 10f39c3d28 GCS_Common: defer to AP_AHRS::set_origin to write logs 2024-04-02 11:00:22 +11:00
Randy Mackay ff7486e3cc GCS_MAVLink: forward set-camera-source to AP_Camera 2024-03-25 09:19:18 +09:00
Peter Barker abd5d0e3e9 GCS_MAVLink: cope with AHRS not being available 2024-03-19 07:00:10 +11:00
Stephen Dade faf2ae3a9c GCS_MAVLink: filter out additional messages for High Latency link 2024-03-12 21:13:47 +11:00
Iampete1 fdfdbe8d13 GCS_MAVLink: Routing: forward ADSB if local ADSB parsing is disabled 2024-03-12 09:36:15 +11:00
Peter Barker ceb45a9c3b GCS_Fence: cope with avoidance not being compiled in 2024-03-11 18:07:18 +11:00
Peter Barker a79569ccf3 GCS_Common: add missing include for AP_RCProtocol
we directly use this library's singleton, so include the header
2024-03-09 18:42:57 +11:00
olliw42 0bb98c3db5 GCS_MAVLink: handle RADIO_RC_CHANNELS 2024-03-09 10:47:39 +11:00
Peter Barker 9fc068d704 GCS_MAVLink: send set_position_target_global_int with non _INT frame
deprecating and hopefully removing the _INT frames.

This method is only called by Rover, so thankfully the altitude is not that important...
2024-03-08 13:28:14 +11:00
Marek S. Lukasiewicz baf0da74ed GCS_MAVLink: Match handling of MAV_CMD_EXTERNAL_POSITION_ESTIMATE to common MAVLink dialect 2024-03-07 18:13:51 +11:00
Andrew Tridgell 0aba1ce939 GCS_MAVLink: pass channel number to AP_GPS on RTCM injection 2024-03-06 19:38:06 +11:00
Peter Barker d6df142eaa GCS_MAVLink: allow FTP to be compiled out with build_options.py 2024-03-03 08:38:22 +11:00
Randy Mackay 442c90ff1b GCS_MAVLink: send Odometry quality to VisualOdom 2024-02-28 18:52:37 +11:00
Peter Barker 0fe9027b23 GCS_MAVLink: handle MAV_CMD_DO_SET_SAFETY_SWITCH_STATE 2024-02-27 21:10:39 +11:00
Peter Barker 5cc48a12e2 GCS_MAVLink: remove code based on ENABLE parameters 2024-02-27 11:02:48 +11:00
Andrew Tridgell 632bb71c87 GCS_MAVLink: use can_printf_severity() for AP_Periph 2024-02-22 15:03:01 +11:00
Iampete1 a9eadd9f01 GCS_MAVLink: FTP: strip trailing `/` in dir list request 2024-02-22 07:43:16 +11:00
Peter Barker 362867415f GCS_MAVLink: move gripper up to AP_Vehicle
also make the singleton return a reference rather than a pointer
2024-02-21 21:05:12 +11:00
bugobliterator 402c8a5e4d GCS_MAVLink: fix version setting in CheckFirmware app descriptor 2024-02-21 18:54:17 +11:00
Patrick José Pereira 3f2c82df12 GCS_MAVLink: Remove wrong usage of COMMAND_ACK message
SET_MODE message does not exist inside the MAV_CMD enum
as described in the mavlink specification.
The system that is using SET_MODE to communicate with the
vehicle should rely on HEARTBEAT message to detect if
the mode was set correctly.

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2024-02-20 10:08:06 +11:00
Peter Barker e787fc5dfd GCS_MAVLink: allow AP_Periph to use mavlink library 2024-02-15 12:17:07 +11:00
Peter Barker 43adaf3714 GCS_MAVLink: make guided-mode-change-alt and guided-mode-wp dependant on AP_MISSION_ENABLED
We really should not be using Mission_Command to transfer information between the base-class GCS_MAVLink and subclasses like GCS_MAVLink_Plane.  But until we fix that we can exclude the code if Mission is not available (like on peripherals...)
2024-02-14 14:47:03 +11:00
Peter Barker c23ba04638 GCS_MAVLink: move RC bits in mavlink to common code
Plane's semantics change to be like Copter. Rover, Sub and Tracker will start reporting the bits
2024-02-10 11:46:44 +11:00
Peter Barker 4a1adc69da GCS_MAVLink: make compass.mag_cal_fixed_yaw return boolean
this method could be used from a transmitter without GCS enabled, for example
2024-02-06 11:11:27 +11:00
Peter Barker f1457034e2 GCS_MAVLink: provide and use base-method implementation for guided mode request 2024-02-06 11:07:48 +11:00
Peter Barker c33d665906 GCS_MAVLink: make rally/fence item conversion methods public 2024-01-24 19:14:41 +11:00
Peter Barker 5e5bca2bba GCS_MAVLink: handle RADIO_STATUS is GCS base class 2024-01-24 18:43:15 +11:00
Peter Barker f18e196fa9 GCS_MAVLink: use virtual method for GCS_MAVLink::handle_message
use more appropriate naming for the method.
2024-01-24 09:07:41 +11:00
Peter Barker cac3a2216d GCS_MAVLink: make mavlink-required methods available even if not HAL_GCS_ENABLED 2024-01-23 11:27:30 +11:00
Peter Barker cedcd190fc GCS_MAVLink: add ASSERT_STORAGE_SIZE macro
saves havin gto name the dummy variable yourself
2024-01-22 22:44:05 +11:00
Andrew Tridgell 4289a4bb3a GCS_MAVLink: added AP_HAVE_GCS_SEND_TEXT 2024-01-21 12:30:08 +11:00
Andrew Tridgell 1d6f1b9d8f GCS_MAVLink: fixed passthru for SITL
prevent panic when we expect zero writes
2024-01-18 14:57:57 +11:00
Peter Barker 15cea77e98 GCS_MAVLink: exclude entire case statement for can filter modify 2024-01-17 18:34:06 +11:00
Peter Barker 4cf71de646 GCS_MAVLink: allow compilation with HAL_LOGGING_ENABLED false 2024-01-17 18:25:55 +11:00
Peter Barker 5b5ee4e95d GCS_MAVLink: correct compilation when AP_AHRS_ENABLED is off
e.g. CubeOrange-periph-heavy
2024-01-16 16:14:04 +11:00
Peter Barker caf1e33f17 GCS_MAVLink: make AHRS attitude member variables private 2024-01-14 12:47:47 +11:00
Peter Barker 964b683b83 GCS_MAVLink: add missing includes 2024-01-11 15:29:54 +11:00
Peter Barker 78087da03c GCS_MAVLink: correct compilation when AP_MISSION_ENABLED is false 2024-01-03 16:16:47 +11:00
Peter Barker 4dae077787 GCS_MAVLink: return MAV_RESULT_COMMAND_INT_ONLY if command-long support not compiled in 2024-01-02 18:58:07 +11:00
Thomas Watson 94888822be GCS_MAVLink: correct comment about stream array 2023-12-19 06:53:15 +11:00
Peter Barker 6515df72f0 GCS_MAVLink: correct compilation when AP_Vehicle disabled 2023-12-13 18:34:40 +11:00
Peter Barker 70cc84dd89 GCS_Common: correct compilation when AP_RSSI_ENABLED is false 2023-12-13 18:30:32 +11:00
Peter Barker 71a64d5046 GCS_MAVLink: correct compilation when compass not enabled 2023-12-13 14:34:13 +11:00
Iampete1 423a218643 GCS_MAVLink: use new filesystem crc32 method 2023-12-05 11:03:58 +11:00
Bob Long 467e62b967 GCS_Common: allow fallback vert rate in VFR_HUD 2023-12-05 10:44:37 +11:00
Andrew Tridgell f345d94e91 GCS_MAVLink: increase max mavlink connections when networking enabled 2023-11-28 12:18:55 +11:00
Peter Mullen adc0ebf9de AP_RangeFinder: Add signal_quality_pct to range finder state 2023-11-21 22:24:12 +11:00
Peter Barker bc03918ea4 GCS_MAVLink: create and use AP_MAVLINK_MSG_UAVIONIX_ADSB_OUT_STATUS_ENABLED
narrower define we can use when not compiling in the backends which use this
2023-11-21 13:21:13 +11:00
Peter Barker 6d172a1b22 GCS_MAVLink: exclude deadlock-creation based on FAILURE_CREATION_ENABLED 2023-11-21 09:35:50 +09:00
Peter Barker 170d96e8cc GCS_Common: remove mappings for non-supported messages 2023-11-20 19:25:25 +11:00
Peter Barker 70160c58e8 GCS_MAVLink: tidy sending of ADSB messages 2023-11-20 19:25:25 +11:00
Peter Barker 6f5ff2f952 GCS_MAVLink: tidy sending of HIGH_LATENCY2 messages 2023-11-20 19:25:25 +11:00
Peter Barker 031e5b1dab GCS_MAVLink: tidy sending of WATER_DEPTH messages 2023-11-20 19:25:25 +11:00
Peter Barker a8906ac491 GCS_MAVLink: tidy sending of winch messages 2023-11-20 19:25:25 +11:00
Peter Barker 564e6ec77a GCS_MAVLink: tidy sending of efi messages 2023-11-20 19:25:25 +11:00
Peter Barker 892bafe951 GCS_MAVLink: tidy sending of esc telem generator messages 2023-11-20 19:25:25 +11:00
Peter Barker a95b2b2497 GCS_MAVLink: tidy sending of queued generator messages 2023-11-20 19:25:25 +11:00
Peter Barker d894281f2b GCS_MAVLink: tidy sending of queued SIM messages 2023-11-20 19:25:25 +11:00
Peter Barker ec69867102 GCS_MAVLink: tidy sending of queued mcu status messages 2023-11-20 19:25:25 +11:00
Peter Barker 0983bd2d06 GCS_MAVLink: tidy sending of queued opticalflow messages 2023-11-20 19:25:25 +11:00
Peter Barker c017c8acf4 GCS_MAVLink: tidy sending of queued mount messages 2023-11-20 19:25:25 +11:00
Peter Barker 24f00ddaf7 GCS_MAVLink: add and use AP_MAVLINK_COMMAND_LONG_ENABLED 2023-11-16 10:50:21 +11:00
Peter Barker 9ff9f8d216 GCS_MAVLink: remove no-longer-required location_from_command_t(command_long) 2023-11-16 10:50:21 +11:00
Peter Barker 485fa80f1c GCS_MAVLink: collapse un-needed method 2023-11-16 10:50:21 +11:00
Peter Barker e0eacdc197 ArduPlane: handle DO_SET_MISSION_CURRENT as both long and int 2023-11-16 10:50:21 +11:00
Peter Barker d7160aea2d GCS_MAVLink: handle DO_SET_MISSION_CURRENT as both long and int 2023-11-16 10:50:21 +11:00
Peter Barker b572fe80ec GCS_MAVLink: handle request autopilot capabilities as both long and int 2023-11-16 10:50:21 +11:00
Nick Exton 59c5092810 GCS_MAVLink: Handle param2 (reset) in DO_SET_MISSION_CURRENT cmd 2023-11-14 10:22:45 +11:00
Nick Exton 0567d8576e GCS_MAVLink: Add explicit handling of DO_JUMP_TAG 2023-11-14 10:22:45 +11:00
Nick Exton 3ba63d33d5 GCS_MAVLink: Add handler for CAMERA_CAPTURE_STATUS request 2023-11-09 13:00:57 +09:00
Peter Barker abf32906d2 GCS_MAVLink: support gripper commands as both long and int 2023-11-08 18:15:25 +11:00
Peter Barker 09ab14c69f GCS_MAVLink: handle battery reset as both long and int 2023-11-08 18:14:27 +11:00
Peter Barker 1d08900cb0 GCS_MAVLink: handle MAV_CMD_DO_SPRAYER as both long and int 2023-11-07 10:55:46 +11:00
Peter Barker 9285188d85 GCS_MAVLink: handle DO_ADSB_OUT_IDENT as both long and int 2023-11-07 10:32:39 +11:00
Asif Khan 8a791d6082 GCS_MAVLink: add SEND_FOV_STATUS support 2023-11-02 15:54:37 +11:00
Peter Barker 187ae07225 GCS_MAVLink: handle camera messages as COMMAND_INT as well as COMMAND_LONG 2023-11-02 15:54:13 +11:00
Peter Barker 9d9b95af15 GCS_MAVLink: correct mavlink result when airspeed not available
only in progress if we have started a task running
2023-11-02 15:52:30 +11:00
Peter Barker e162e74c0c GCS_MAVLink: allow MAV_CMD_RUN_PREARMS as both long and int 2023-11-01 19:30:44 +11:00
Iampete1 d25d1c253e GCS_MAVLink: MissionItemProtocol_Rally: deal with alt frame 2023-11-01 19:06:39 +11:00
Peter Barker 78475cad5c GCS_MAVLink: handle FLASH_BOOTLOADER as command-long and command-int 2023-10-31 11:32:32 +11:00
Peter Barker afd85c8613 GCS_MAVLink: handle MAV_CMD_START_RX_PAIR as both int and long 2023-10-31 11:18:57 +11:00
Nick Exton 57cead9052 GCS_MAVLink: Make handler for DO_SET_ROI_NONE common 2023-10-30 08:28:23 +09:00
Peter Barker b5edc4c757 GCS_MAVLink: correct use of AP_MAVLINK_MSG_RELAY_STATUS_ENABLED define 2023-10-27 14:16:47 +11:00
Peter Barker 2ac9cc94c6 GCS_MAVLink: correct compilation if rangefinder disabled 2023-10-27 14:16:47 +11:00
Peter Barker fbbadecfe3 GCS_MAVLink: tidy use of GPS mavlink defines 2023-10-27 14:16:47 +11:00
Peter Barker 1c7eebec3a GCS_MAVLink: tidy proximity message handling 2023-10-27 14:16:47 +11:00
Peter Barker 306caae6e5 GCS_MAVLink: tidy OSD param message handling 2023-10-27 14:16:47 +11:00
Peter Barker 1f0ae343b1 GCS_MAVLink: tidy ADSB message handling 2023-10-27 14:16:47 +11:00