Commit Graph

1567 Commits

Author SHA1 Message Date
olliw42 c034f8a099 GCS_MAVLink: add find_by_mavtype_and_compid 2022-09-12 08:44:38 +09:00
Michael du Breuil 5282dba42a GCS_MAVLink: Rate limit blocking accel calibrations
This allows us to drop any queued commands that may have arrived while
we were calibrating. Rather then entering a second and unexpected
calibration.
2022-09-09 08:52:14 +10:00
Michael du Breuil ff94ef1c60 GCS_MAVLink: Check for mission space before sending items 2022-09-07 17:52:23 +10:00
Andrew Tridgell b79f3caf86 GCS_MAVLINK: report on unsigned bootloader flash attempt 2022-09-05 12:35:37 +10:00
Andrew Tridgell 611f26f16c GCS_MAVLink: support SECURE_COMMAND 2022-09-05 12:35:37 +10:00
Andrew Tridgell a06d163ef0 GCS_MAVLink: refuse DFU for secure firmware 2022-08-30 10:51:06 +10:00
bugobliterator f31d915e14 GCS_MAVLink: add support for booting into dfu 2022-08-30 10:51:06 +10:00
Randy Mackay ff1624d4a0 GCS_MAVLink: MOUNT_CONFIGURE and MOUNT_CONTROL send deprecation warnings 2022-08-25 20:28:06 -04:00
Randy Mackay 3941598a10 GCS_MAVlink: integrate proximity-distance-array scope change 2022-08-24 18:26:27 +10:00
Peter Barker cd98fcec87 GCS_MAVLink: rename OpticalFlow class to AP_OpticalFlow
Brings us in-line with other classes in ArduPilot.

Removes ambiguity with AP_HAL::OpticalFlow which can cause compilation errors as we start to make code more portable across targets
2022-08-18 14:24:01 +10:00
Randy Mackay 1a54236862 GCS_MAVLink: forward mav-cmd-do-gimbal-manager-pitchyaw to AP_Mount 2022-08-15 20:29:25 -04:00
Randy Mackay c8996c04e1 GCS_MAVLink: replace send-mount-status with send-gimbal-device-attitude-status 2022-08-15 20:29:25 -04:00
Peter Barker 35c2653a87 GCS_MAVLink: stop using GCS_MAVLINK.h in header files
... by passing through a reference to a link object instead
2022-08-16 09:45:51 +10:00
Andrew Tridgell 2a95ced697 GCS_MAVLINK: pass OPEN_DRONE_ID_SYSTEM_UPDATE to library 2022-08-14 22:02:43 +10:00
Peter Barker 26d3ffc27d GCS_MAVLink: correct INS_generic example
segfaults due to lack of singletoin objects in examples
2022-08-13 20:53:29 +10:00
Roel Schiphorst 3bd792295c GCS_MAVLINK: add OpenDroneID messages 2022-08-09 14:37:08 +10:00
Iampete1 31bc6d9ec4 GCS_MAVLink: change AC_FENCE to AP_FENCE_ENABLED 2022-07-27 19:04:56 +10:00
Iampete1 5fa29eb01a GCS_MAVLink: fix complation without fence 2022-07-27 19:04:56 +10:00
Peter Barker cf915a0f35 GCS_MAVLink: ensure payload space for ACK before sending
Attempting to fix instance of the ACK not arriving on SITL reboot.  We already have a lot of code around trying to get this out, but there's been at least once instance it hasn't.
2022-07-26 21:23:23 +10:00
Peter Barker cbd591f2ba GCS_MAVLink: save some bytes by removing empty methods based on #ifs 2022-07-22 13:49:51 +10:00
Peter Barker 34f2599479 GCS_MAVLink: remove transitive include dependencies 2022-07-20 17:32:24 +10:00
Peter Barker ba2b7b8014 GCS_MAVLink: remove mavlink-specific methods from AP_SerialManager 2022-07-13 18:32:35 +10:00
Peter Barker d768bcc904 GCS_MAVLink: eliminate get_mavlink_channel
there's no dependence on any SerialManager stuff when determining this.  The protocol passed through was always mavlink...
2022-07-12 11:32:57 +10:00
Peter Barker 38119e17c7 GCS_MAVLink: correct gcs_out_of_space_to_send methodname
the "_count" is incorrect given the method which this calles on the link object
2022-07-12 11:10:53 +10:00
Iampete1 e8607c09f1 GCS_MAVLink: send ais message 2022-07-12 09:39:54 +10:00
Andrew Tridgell a92161cd18 GCS_MAVLink: improved start battery cell monitoring
this fixes two issues:

 1) we are not reporting the sag corrected voltage to GCS when we are
    sending individual cells

 2) we don't cope with having more than AP_BATT_MONITOR_CELLS_MAX
    cells (or 12 for low flash boards, 14 for 2M boards)

it fixes this by distributing the extra voltage over the calls.

This change is particularly important for high cell count DroneCAN
smart batteries, where we currently would not handle more than 14
cells and the GCS would display the wrong voltage

the PR also cleans up the use of volts vs mVolts for the local
variables
2022-07-11 14:21:41 +10:00
Peter Barker 5f095304cf GCS_MAVLink: add AP_LTM_TELEM_ENABLED 2022-06-28 20:19:41 +10:00
Randy Mackay 1fca72a831 GCS_MAVLink: add comment re sending locations to mounts 2022-06-15 09:07:14 +09:00
Randy Mackay f83b4cdb40 GCS_MAVLink: support sending AUTOPILOT_STATE_FOR_GIMBAL_DEVICE 2022-06-15 09:07:14 +09:00
bugobliterator 4dd66fed4b GCS_MAVLink: forward gimbal-device-information to AP_Mount
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>

also forward gimbal_device_attitude_status
2022-06-15 09:07:14 +09:00
Randy Mackay 85b9e6e57c GCS_MAVLink: remove ToshibaCAN support 2022-06-10 12:08:05 +09:00
Randy Mackay 3ac5ad8e33 GCS_MAVLink: remove unused send_gimbal_report 2022-06-07 09:27:47 +10:00
Randy Mackay 8c19af72e0 GCS_MAVLink: learn routes even on private channels
Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
2022-06-06 15:50:13 +10:00
Peter Barker be21091619 GCS_MAVLink: pass mavlink_command_ack_t to accelcal library
The library needs to look at the content of the packet.  Given that GCS_MAVLink is already within handle_command_ack, decoding it there makes sense.
2022-05-25 17:55:55 +10:00
Ruffalo-sunghwan 51451d29e1 GCS_MAVLink : correct comment spelling 2022-05-24 20:27:45 +09:00
Iampete1 7d3368fa33 GCS_MAVLink: send servo raw 17-32 using port 1 2022-05-22 12:07:37 +10:00
murata 970af16251 GCS_MAVLink: Console output can be disabled 2022-05-17 09:53:06 +10:00
Andrew Tridgell ab4772c9b7 GCS_MAVLink: support symlinks as files
this allows for use of symlinks with ftp and scripts
2022-05-04 17:48:45 +10:00
Peter Barker 17ad710866 GCS_MAVLink: tidy includes 2022-05-03 09:14:58 +10:00
Andrew Tridgell 973befa5d8 GCS_MAVLink: prevent devop larger than buffer 2022-04-16 19:24:16 +10:00
Peter Barker f023f0443d GCS_MAVLink: move logging of RPM into RPM library 2022-04-13 16:22:19 +10:00
Andrew Tridgell 73eabb1fd0 GCS_MAVLink: send GCS voltage to GCS
may be resting voltage of option enabled
2022-03-22 11:12:54 +11:00
Peter Barker f1ec657c41 GCS_MAVLink: correct compilation with HAL_INS_ACCELCAL_ENABLED false 2022-03-22 10:39:44 +11:00
Peter Barker e0561b0ca1 GCS_MAVLink: split AP_HAL_SITL and HAL_SIM_ENABLED 2022-03-17 14:39:55 +11:00
Andrew Tridgell d28cecf25b GCS_MAVLink: support CANFD_FRAME messages 2022-03-11 18:13:54 +11:00
bugobliterator e996392671 GCS_MAVLink: disable CANTester by default 2022-03-11 18:13:54 +11:00
Stephen Dade 1344a0f41a GCS_MAVLink: Add support for High Latency MAVLink protocol 2022-03-03 14:56:15 +11:00
Peter Barker 7638cbf001 GCS_MAVLink: include cleanups 2022-03-01 11:21:33 +11:00
Peter Barker 2d96842490 GCS_MAVLink: correct out-of-space-to-send count 2022-02-23 18:43:34 +11:00
Peter Barker 87439eec80 GCS_MAVLink: stop taking semaphore aorund statustext queue loop
we're taking it in the loop
2022-02-22 12:56:38 +11:00
Andrew Tridgell 890ef5679c GCS_MAVLink: handle CAN_FILTER_MODIFY call 2022-02-19 18:24:56 +11:00
Andrew Tridgell cce89099c5 GCS_MAVLink: fixed mavlink packet corruption with multiple threads
this ensures we don't try to send more data to a uart than is
available in the tx buffer
2022-02-19 18:24:56 +11:00
Andrew Tridgell 44d9d410a1 GCS_MAVLink: fixed mavlink packet corruption with multiple threads
this ensures we don't try to send more data to a uart than is
available in the tx buffer
2022-02-19 17:20:17 +11:00
Andrew Tridgell ba502b462f GCS_MAVLINK: support CAN_FRAME and MAV_CMD_CAN_FORWARD 2022-02-12 16:36:05 +11:00
Peter Barker 29a469432e GCS_MAVLink: send deprecated message warning for MAVLINK_MSG_ID_SET_HOME_POSITION 2022-02-10 12:13:43 +11:00
Peter Barker f25755a05f GCS_MAVLink: mark MAV_CMD_DO_REPOSITION as having a location 2022-02-09 09:15:11 +11:00
Peter Barker 2e804bb0d5 GCS_MAVLink: mark MAV_CMD_DO_SET_ROI_LOCATION as having a location 2022-02-09 09:15:11 +11:00
Peter Barker dffec9325e GCS_MAVLink: create and use location_from_command_t 2022-02-09 09:15:11 +11:00
Andrew Tridgell a32ecfbf29 mavlink: added read size limits on FTP read
thanks to Michael Oborne for spotting this:

https://github.com/ArduPilot/MissionPlanner/issues/2784
2022-02-08 12:11:57 +11:00
Peter Barker a6713f8368 GCS_MAVLink: build ArduPilot against all.xml not ardupilotmega.xml 2022-02-08 11:00:41 +11:00
Peter Barker e9358ff491 GCS_MAVLink: provide default implemenation of handle_change_alt_request
The TODO items to actually implement these are almost 6 years old.
Since then these methods have been burning space.

This doesn't even make sense for several vehicles, so a default
implementation which does nothing seems OK.
2022-02-08 10:59:13 +11:00
Andrew Tridgell ab8c40d9bc GCS_MAVLink: report airspeed unhealthy when being rejected
this gives the pilot feedback on airspeed failing EKF innnovation
checks and switching to synthetic airspeed
2022-02-07 14:13:49 +11:00
Joshua Henderson f3cac9e1aa GCS_MAVLink: add send_attitude_target 2022-02-07 08:24:35 +09:00
Peter Barker 21caa8c686 GCS_MAVLink: rename AP_AHRS::get_position to get_location 2022-01-25 10:47:22 +11:00
Josh Henderson fa9a852ef7 GCS_MAVLINK: move AP_Airspeed to AP_Vehicle 2022-01-19 18:21:32 +11:00
Josh Henderson 1200f25e05 GCS_MAVLINK: move high_latency_air_temperature up 2022-01-19 18:21:32 +11:00
Jaaaky 20b3add9fb GCS_Common: Fix issue #19599 Failed to build Pixhawk1 with O3 2022-01-17 08:33:27 +11:00
Andrew Tridgell 06dcd5a16f GCS_MAVLink: don't use avoidance on plane 2022-01-11 09:51:47 +11:00
Peter Barker 948e00a072 GCS_MAVLink: make send_system_time const
needed when sending from const functions
2022-01-06 09:14:33 +11:00
Peter Barker d2693e4276 GCS_MAVLink: create and use AP_OPTICALFLOW_ENABLED
Including a define for each backend.
2021-12-29 18:12:03 +11:00
Andrew Tridgell f8e4d7facd GCS_MAVLink: support formatting of SD card 2021-12-28 16:04:57 +11:00
Peter Barker 6936a8eb6e GCS_MAVLink: adjust for rename of OpticalFlow.h to AP_OpticalFlow.h 2021-12-28 10:16:20 +11:00
Andrew Tridgell 20dd667fdc GCS_MAVLink: support ODOMETRY message for VIO
used by VOXL
2021-12-27 12:32:41 +11:00
Stephen Dade 038ae432ab GCS_MAVLink: Add UART option to not override streamrates 2021-12-15 14:14:07 +11:00
Stephen Dade c49fd7e908 GCS_MAVLink: Don't start with MAVLink1 messages on a MAVLink2 connection 2021-12-14 12:20:07 +09:00
Peter Barker f461605d88 GCS_MAVLink: make logging dependent on HAL_LOGGING_ENABLED not HAL_BUILD_AP_PERIPH 2021-12-14 10:34:06 +11:00
Randy Mackay d0747c5f20 GCS_MAVLink: battery status reports fault bitmask 2021-12-07 02:12:06 -08:00
Shiv Tyagi 339a07b8d3 AP_Devo_Telem: compile out devo telemetry
Devo telemetry is one of the most rarely used features (almost never used since added) we should compile it out from our code
2021-12-01 19:16:44 +11:00
Peter Barker ba63e9a17b GCS_MAVLink: correct send_scaled_imu gyro-count check 2021-11-29 15:08:23 +11:00
m c729fc7796 AP_Mission: Decode MAV_CMD_DO_PAUSE_CONTINUE commands 2021-11-25 08:18:27 +09:00
Peter Barker ca232bb510 GCS_MAVLink: signal quality reporting 2021-11-23 18:20:58 +11:00
Peter Barker 514368537b GCS_MAVLink: move from ENABLE_SCRIPTING to AP_SCRIPTING_ENABLED 2021-11-15 20:27:40 +11:00
Peter Barker fd128066ad GCS_MAVLink: ensure ENABLE_SCRIPTING is always defined 2021-11-15 20:27:40 +11:00
Andrew Tridgell 61cc86b911 GCS_MAVLINK: fixed build of boards with APJ_BOARD_ID>32768
this impacts modalai_fc_v1
2021-11-10 08:46:52 +11:00
Peter Barker f7d42a3f3b GCS_MAVLink: add board ID to AUTOPILOT_VERSION mavlink msg
Co-authored-by: durka
2021-11-05 14:10:46 +11:00
bugobliterator 85284d1bc0 GCS_MAVLink: remove use of AP_BattMonitor if AP_Periph and Battery disabled 2021-11-05 07:38:43 +11:00
Iampete1 a45e7608f2 GCS_MAVLink: set RC is_calibrating from command_preflight_calibration param4 2021-11-02 10:05:07 +11:00
Buzz 3ecfdd5f88 GCS_MAVLink: esp target is not STM32, so don't do stm32 specific magic
see libraries/AP_HAL_ESP32/README.md for more.

Author: Charles Villard <charlesvillard10@gmail.com>
Author: Buzz <davidbuzz@gmail.com>
2021-11-01 17:40:31 +11:00
nicholas-inocencio 9ca681c76d GCS_MAVLink: integrate new ADSB Ping200X/MissionPlanner new mavlink config and status commands 2021-10-26 16:53:00 -07:00
Andy Piper 008c61215c GCS_MAVLINK: convert APM_BUILD_COPTER_OR_HELI() to APM_BUILD_COPTER_OR_HELI 2021-10-26 11:42:12 +11:00
Sebastian Quilter 0276c165ed GCS_MAVLink: make rangefinder ranges m rather than cm 2021-10-21 21:28:53 +11:00
Peter Barker d7ef63deaf GCS_MAVLink: use USB VID and PID in AUTOPILOT_VERSION mavlink msg 2021-10-20 22:47:03 +11:00
Iampete1 05219ca5c4 GCS_Common: return true result for scripting set_message_interval 2021-10-20 18:35:09 +11:00
Tom Pittenger 12192f60e3 GCS_MAVLink: move ADSB mavlink handling from vehicles to common library 2021-10-14 19:55:27 -07:00
李孟晓 54b68ffae3 GCS_MAVLink: Provide the time remaining 2021-10-13 18:44:05 +11:00
Tom Pittenger e9ce1886c8 GCS_MAVLink: unify DO_SET_CAM_TRIG_DIST for missions and cmd_long 2021-10-12 15:04:00 -07:00
Josh Henderson 1e0ae4b998 GCS_MAVLINK: Common capacity_remaining_pct checks healthy status and has_current 2021-10-07 22:16:02 +11:00
Peter Barker e4ebea9e26 GCS_MAVLink: use AHRS position for location
This is our canonical source of position.
2021-10-05 10:20:44 +11:00
Peter Barker 07aa00f2b4 GCS_MAVLink: tidy sending of high-latency message 2021-10-05 10:20:44 +11:00
Shiv Tyagi 5cca39e50a GCS_Common : send water depth for each rangefinder instance
This sends depth message for each downward facing rangefinder instance which has data.

Co-Authored-By: Josh Henderson <69225461+hendjoshsr71@users.noreply.github.com>
2021-10-03 09:21:31 -04:00
Peter Barker 4aeb85d080 GCS_MAVLINK: correct mavlink return code when wiping storage header 2021-10-01 11:39:25 +10:00
Peter Barker 3f37a21aaf GCS_MAVLink: set message intervals from config files 2021-09-30 10:31:03 +10:00
Gone4Dirt a0245a2640 GCS_MAVLink: Add APM_BUILD_Heli 2021-09-29 19:55:48 +10:00
Dr.-Ing. Amilcar do Carmo Lucas 52c39bc382 GCS_MAVLink: add ESC_TELEMETRY_1_TO_4 to the mavlink_id_to_ap_message_id table 2021-09-28 10:01:16 +10:00
Shiv Tyagi 5f94986af1 GCS_Common : Mavlink wrap when battery percentage is above 100
When calculated battery percentage is above 100 we wrap it to INT8_MAX
2021-09-28 09:54:55 +10:00
Peter Barker 341379c5bd GCS_MAVLink: rename GENERATOR_ENABLED to HAL_GENERATOR_ENABLED 2021-09-26 19:24:09 +10:00
Tom Pittenger 6ac1b7daf2 GCS_MAVLink: fix periph-heavy compile errors with different things enabled 2021-09-24 10:47:13 -05:00
Peter Barker 9f6b9c7519 GCS_MAVLink: move from HAL_NO_GCS to HAL_GCS_ENABLED 2021-09-22 21:37:00 +10:00
Andrew Tridgell 5dcfa95444 GCS_Mavlink: allow setting of AHRS_TRIM_Z 2021-09-17 14:07:14 +10:00
Willian Galvani 018ff3d11c GCS_MAVLink: update to use capacity_remaining_pct() as a bool 2021-09-08 17:17:41 +10:00
Peter Barker fd144ccc59 GCS_MAVLink: log source sysid/compid in MAVC
For field length purposed had tor remove Current and autocontinue which we don't care about
anyway.
2021-09-07 11:06:08 +10:00
Peter Barker a292fe13d6 GCS_MAVLink: add option to create internal error via preflight-reboot
useful for testing our handling of internal errors
2021-09-01 18:58:15 +10:00
Andrew Tridgell ae615de4ce GCS_MAVLink: added logging of NAMED_VALUE_FLOAT
this is useful when running sensors on a companion computer and
wanting values logged in main ArduPilot log.
2021-09-01 17:52:48 +10:00
Andrew Tridgell dc252aa8f5 GCS_MAVLink: check for null comm_port before writing
this was found when adding debug code to write to a specific channel
2021-08-31 07:55:27 +10:00
olliw42 617024bdfa GCS_Mavlink: scale across full valid range 2021-08-26 09:44:59 +10:00
olliw42 bacfe82c66 GCS_MAVLINK: add receiver_rssi() method, and use it 2021-08-26 09:44:59 +10:00
Andrew Tridgell 5c3056e50d GCS_MAVLink: added MCU_STATUS message 2021-08-25 07:11:31 +10:00
Tom Pittenger 896dd49c96 GCS_MAVLink: add MAV_CMD_ADSB_IDENT cmd 2021-08-19 17:49:27 +10:00
bugobliterator e9faab288c GCS_MAVLink: allow mavftp on AP_Periph 2021-08-19 14:20:58 +10:00
Randy Mackay 2fba31332b GCS_MAVLink: support MAV_CMD_SET_EKF_SOURCE_SET command
this allows external systems to set the active EKF source set
2021-08-19 12:11:08 +10:00
Andrew Tridgell d92c5589a9 GCS_MAVLink: added fields for new mavlink2 extensions 2021-08-19 12:08:54 +10:00
Peter Barker a91d30369e GCS_MAVLink: stop sending SENSOR_OFFSETS
Only works for first compass instance.

We have all of these in parameters anyway.
2021-08-18 18:06:24 +10:00
Peter Barker 784c56f6d0 GCS_MVALink: remove virtual from send_simstate
No longer overridden by anyone
2021-08-10 09:48:34 +10:00
Peter Hall 60db4c1a62 GCS_Mavlink: add AIS msg 2021-08-10 08:11:18 +09:00
Andrew Tridgell 02ca6b67a2 GCS_MAVLINK: fixed macos snprintf error 2021-08-05 09:43:35 +10:00
bugobliterator 0d34a78701 GCS_MAVLink: change class name from SITL::SITL to SITL::SIM 2021-08-05 07:25:31 +10:00
Peter Barker 76c4af6aef GCS_MAVLink: cope with MAV_CMD_ACCELCAL_VEHICLE_POS outside accelcal 2021-08-03 10:54:52 +10:00
Peter Barker 431c186306 GCS_MAVLink: use AP::compass().available in place of enabled() 2021-07-30 12:19:42 +10:00
Peter Barker ad89e9777c GCS_MAVLink: send primary quat in ATTITUDE_QUATERNION 2021-07-28 17:20:28 +10:00
bugobliterator 3d03979b16 GCS_MAVLink: add support for mavlink out on AP_Periph 2021-07-26 13:45:43 +10:00
Peter Barker e1b839f739 GCS_MAVLink: rename for AHRS restructuring 2021-07-21 21:01:39 +10:00
Peter Barker ec17abce2e GCS_MAVLink: remove ability to use DCM as AHRS 2021-07-21 21:01:39 +10:00
bugobliterator f3bc75c538 GCS_MAVLink: add support for passthrough with baud changes 2021-07-21 17:06:41 +10:00
Stephen Dade 035f65fe03 GCS_MAVLink: Add support for HIGH_LATENCY2 messages 2021-07-07 17:10:05 +10:00
Siddharth Purohit 9a19a86a81 GCS_MAVLink: omit code that breaks build for herepro 2021-07-02 08:50:16 +10:00
Randy Mackay 3900a4f14a GCS_MAVLink: send water depth and temp 2021-06-30 12:05:09 +09:00
Siddharth Purohit 02c74a8fa1 GCS_MAVLink: Use HAL_CANMANAGER_ENABLED instead of HAL_ENABLE_LIBUAVCAN_DRIVERS 2021-06-24 09:02:42 +10:00
Peter Barker 84603e2c85 GCS_MAVLink: add support for MAV_CMD_RUN_PREARM_CHECKS 2021-06-21 09:41:17 +10:00
Peter Barker a23999d0f0 GCS_MAVLink: remove HIL support 2021-06-15 09:47:31 +10:00
Peter Barker c43965f32e GCS_MAVLink: correct decimation of SENSOR_STATUS message
static infers shared between all backends
2021-06-15 07:07:39 +10:00
Andrew Tridgell 6c24a030a6 GCS_MAVLink: use HAL_EFI_ENABLED 2021-06-09 18:07:00 +10:00
Josh Henderson 518666b5f0 GCS_MAVLink: Add battery_charge_state to Battery_Status message 2021-06-08 09:27:13 +10:00
Andrew Tridgell 96577b47f0 GCS_MAVLink: removed perf counters 2021-06-07 14:29:27 +10:00
Peter Barker aaae7bda6b GCS_MAVLink: provide compatability with bad integer-stored radii 2021-06-06 11:41:30 +10:00
Peter Barker 09f4961a63 GCS_MAVLink: increase statustext queue size to 7 on low-mem boards
... and SITL....

Copter currently spits out so many messages on a banner-send (e.g what
we do when parameters are fetched) that it puses the first sent message
straight out of the queue before it gets a chance to be sent from the
queue.
2021-05-27 12:39:04 +10:00
giacomo892 f486d7170c GCS_MAVLink: Fix build for builds with GPS_MAX_RECEIVERS = 1 2021-05-18 10:26:55 +10:00
Andrew Tridgell 45daff9f47 GCS_MAVLINK: mag health reported in SYS_STATUS should not depend on AHRS use
When using external yaw, EKF3 always reports use_compass as false,
which causes the GCS to get a bad compass health message.

thanks to Argosdyne for reporting
2021-05-14 08:05:08 +09:00
Andy Piper fca6925129 GCS_MAVLink: use generic send_esc_telemetry_mavlink() from AP_ESC_Telem 2021-05-12 17:01:11 +10:00
Peter Barker bd76d15df4 GCS_MAVLink: log auxillary function invocations 2021-04-29 13:00:40 +10:00
Andrew Tridgell c53c112691 GCS_MAVLink: expose functions to convert fence and rally to mavlink
this allows for the @MISSION filesystem to download data in the
current mavlink format
2021-04-21 07:12:55 +10:00
Andrew Tridgell 8444a3310d GCS_MAVLink: added handle_command_landing_target()
used to allow vehicle handling of time corrected LANDING_TARGET msgs
2021-04-13 17:30:19 +10:00
Peter Barker 9471d8069c GCS_MAVLink: move handling of last-seen-SYSID_MYGCS up to GCS base class 2021-04-07 17:54:21 +10:00
Peter Barker 1a2b960b0d GCS_MAVLink: prune old statustexts from queue 2021-04-06 09:10:43 +10:00
Peter Barker 4027ed6070 GCS_MAVLink: make servicing statustext more efficient
We should only need to do a single PAYLOAD_SIZE check for each mavlink
backend now.

 - stop iterating over all channels, only do instantiated mavlink
backends
 - if we don't have space for a statustext on a channel, break
immediately and don't do remaining texts
 - resposibility is now on the GCS_MAVLINK backend for sending texts
   - that's a timing change

 - only iterate over entries actually in the queue rather than maximum
queue size
   - it's likely to be the full length anyway as we don't expire things
from the queue and most setups will have full channels
2021-04-06 09:10:43 +10:00
Iampete1 0fe38da522 GCS_MAVLink: rename battery reset function 2021-03-31 19:21:59 +11:00
Peter Barker 115e895c82 GCS_MAVLink: return MAV_RESULT_FAILED from do_aux_function if invalid function 2021-03-31 11:36:09 +11:00
Peter Barker 2d61ded1f3 GCS_MAVLink: add option to execute auxillary functions via mavlink 2021-03-31 11:36:09 +11:00
Randy Mackay b8f9c3b9c0 GCS_MAVLink: use of AP_Proximity checks HAL_PROXIMITY_ENABLED 2021-03-26 16:22:46 +09:00
Peter Barker 5123b05b2b GCS_MAVLink: add support for ATTITUDE_QUATERNION 2021-03-13 09:44:12 +11:00
James O'Shannessy f028747399 GCS_MAVLink: Remove todo since plane now supports MAV Protocol Capability Mission Fence 2021-03-05 16:48:57 +11:00
James O'Shannessy c2abf27d78 GCS_MAVLink: Add reporting of fence floor breaches to GCS_MAVLink
GCS_MAVLink: Add disabling of fence floor only, per mavlink spec

GCS_MAVLink: Cannot enable a fence if the fence is not present
2021-03-05 14:52:46 +11:00
Peter Barker e3de88d1d4 GCS_MAVLink: handle MAV_CMD_DO_SET_MISSION_CURRENT 2021-03-04 11:59:33 +11:00
Peter Barker 7480a2a00b GCS_MAVLink: correct output of AHRS2 mavlink message
The || here was causing short-circuiting
2021-03-02 20:48:36 +11:00
Peter Barker 9932aa99f7 GCS_MAVlink: return identical seq in MISSION_CURRENT if possible after set
// because MISSION_SET_CURRENT is a message not a command,
        // there is not ACK associated with us successfully changing
        // our waypoint.  Some GCSs use the fact we return exactly the
        // same mission sequence number in this packet as an ACK - so
        // if they send a MISSION_SET_CURRENT with seq number of 4
        // then they expect to receive a MISSION_CURRENT message with
        // exactly that sequence number in it, even if ArduPilot never
        // actually holds that as a sequence number (e.g. packet.seq==0).
2021-02-24 19:00:34 +11:00
Peter Barker cfe9dc32d1 GCS_MAVLink: only send distance_sensor messages if valid data seen
In the case you only have a forward-pointing LIDAR we'd send messages
for each of the other orientations from proximty's horizontal-distances
array, chewing up bandwidth and processing time.
2021-02-23 10:02:47 +09:00
Peter Barker c5e62eb6e4 GCS_MAVLink: schedule current waypoint rather than immediate send
This message may not fit in our outgoing buffer
2021-02-23 11:27:22 +11:00
Patrick José Pereira ba2adac869 GCS_MAVLink: Simplify boolean expression
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-23 10:30:05 +11:00
Peter Barker 1afa0a7ff2 GCS_MAVLink: remove unused member
and a bogus comment
2021-02-20 21:48:25 +11:00
Peter Barker eefcc92f24 GCS_MAVLink: take MAV_CMD_DO_SPRAYER as a mavlink command 2021-02-16 22:36:43 +11:00
Peter Hall c1a831bbf4 GCS_MAVLink: sensor flags, only mark AHRS as enabled once initialised 2021-02-16 12:54:28 +11:00
Andrew Tridgell 6d1511f3eb GCS_MAVLink: added method to force save calibration
useful after reloading parameters
2021-02-15 07:24:40 +11:00
Mark Whitehorn bb15c18cc3 GCS_MAVLink: send message when MAVFTP init fails 2021-02-10 23:06:36 +11:00
murata 698f967b63 GCS_MAVLink: Notify the maximum number of missions
Update libraries/GCS_MAVLink/MissionItemProtocol.cpp

Co-authored-by: WickedShell <Wicked.Shell.Scripts@gmail.com>

GCS_MAVLink: Notify the maximum number of missions
2021-02-03 20:31:50 +11:00
Patrick José Pereira e8e41c512e GCS_MAVLINK: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Rishabh a5fafe57d8 GCS_MAVLink: Add support for OBSTACLE_DISTANCE_3D 2021-02-01 14:34:13 +09:00
Andrew Tridgell 1716fcf995 GCS_MAVLink: fixed valgrind errors with AP_Param::ParamToken 2021-01-26 10:43:09 +11:00
Peter Barker e32ca819fc GCS_MAVLink: mark results as unused 2021-01-21 20:41:17 +11:00
Peter Barker e58d2ecf2f GCS_MAVLink: add mavlink command option to create a 250ms long loop 2021-01-21 11:35:57 +11:00
yaapu 1c3b7d5ecd GCS_MAVLink: added support for passthrough telemetry over crossfire 2021-01-20 18:06:24 +11:00
Pierre Kancir 30a4747898 GCS_MAVLink: send sim_state msg 2021-01-19 10:40:43 +11:00
Andrew Tridgell ed8d86e5e6 GCS_MAVLINK: support deliberate parameter corruption 2021-01-16 06:47:10 +11:00
Peter Barker 3d577d94e8 GCS_MAVLink: add do_disarm_checks boolean to disarm call
this creates symmetry between arming and disarming, at least as far as
the top-level arm() and disarm() calls are concerned.
2021-01-12 08:48:44 +09:00
Peter Barker 0052500d67 GCS_MAVLink: split out a handle_command_component_arm_disarm 2021-01-12 08:48:44 +09: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 882d9c4e23 GCS_MAVLink: adjust stack sizes 2021-01-10 08:28:55 +11:00
Peter Barker d24e569b20 GCS_MAVLink: add option to panic the autopilot 2021-01-05 10:04:25 +11:00
Peter Barker b8827e6486 GCS_MAVLink: allow control to be return to radio for higher-numbered RC_CHANNELS_OVERRIDE 2020-12-29 15:03:34 +11:00
Peter Barker 6f4bbd3f57 GCS_MAVLink: for high RC_CHANNELS_OVERRIDE channels zero means ignore the field 2020-12-29 15:03:34 +11:00
Andrew Tridgell e6c5382a28 GCS_MAVLINK: fixed FPE in DO_SET_ROI
this prevents a floating point exception when MissionPlanner sends an
invalid DO_SET_ROI

See https://github.com/ArduPilot/MissionPlanner/issues/2528
2020-12-28 11:53:03 +11:00
Dr.-Ing. Amilcar do Carmo Lucas d76825feeb GCS_MAVLink: adapt to upstream changes in the distance_sensor mavlink message 2020-12-19 19:54:03 +11:00
Andrew Tridgell 6df118e7b4 GCS_MAVLink: convert to using hal.serial() instead of hal.uartX 2020-12-15 10:32:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas 1d0e7d2974 GCS_MAVLink: Added cells 11...14 voltage information (13 and 14 are 0 for now) 2020-12-11 06:37:32 +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 8b5ff1a6de GCS_MAVLink: enable GCS_SEND_TEXT() to send as CAN LogMessage messages 2020-12-04 15:16:21 +11:00
Peter Barker 88895f9b13 GCS_MAVLink: stop using one backend's signing structure for all backends 2020-11-30 14:11:08 +11:00
Gone4Dirt caf1ad28d5 GCS_Common: AP_Generator_Richenpower is now AP_Generator 2020-11-24 12:54:52 +11:00
Peter Barker f0c22244a5 GCS_MAVLink: correct response codes when mode change fails
Was "UNSUPPORTED", which is supposed to mean, "Command is not supported"

Now is either "DENIED" (Command is invalid (is supported but has invalid
parameters)) or "FAILED" (Command is valid, but execution has failed.)

We should probably returned DENIED if we try to change to a mode which
doesn't exist, but that would require another callback on AP_Vehicle.
It would also lead to questions around what a valid mode is - so
QSTABILIZE if quadplane is disabled in Plane, for example.
2020-11-24 10:09:37 +11:00
Hwurzburg 6eca18c08b GCS_MAVLink: add Board option to disable MAVftp in low mem bds/apps 2020-11-17 10:41:59 +11:00
Andrew Tridgell 9c74474196 GCS_MAVLink: setup baudrates for passthru serial ports 2020-11-17 10:26:14 +11:00
Peter Barker 41943f5fda GCS_MAVLink: correct use of uninitialised value in Rally upload 2020-11-11 18:22:58 +11:00