Commit Graph

1114 Commits

Author SHA1 Message Date
Peter Barker bc8e56966f GCS_MAVLink: squelched rally-points-received message 2019-09-28 07:58:48 +09:00
Randy Mackay 5e3c6b4d3a GCS_MAVLink: allow proximity to send only upward facing distances
this removes the requirement that a horizontal proximity sensor be enabled
2019-09-25 15:22:13 +09:00
Michael du Breuil 5000891a76 GCS_MAVLink: remove some unused includes 2019-09-19 10:48:25 +09:00
Peter Barker 2f60b230cd GCS_MAVLink: use singleton to get AP_AdvancedFailsafe pointer 2019-09-17 09:13:43 +10:00
Peter Barker 8da978b913 GCS_MAVLink: use sending_mavlink1 method in send_rc_channels_raw 2019-09-12 16:10:23 +10:00
Andrew Tridgell 8bb6a67b36 GCS_MAVLink: refuse set of read-only parameters 2019-09-12 10:50:30 +10:00
Andrew Tridgell 98c2606c0a GCS_MAVLink: fixed assumption on return of snprintf 2019-09-12 08:43:31 +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 e5eeb6181d GCS_MAVLink: Remove the usage of force_safety_no_wait 2019-09-04 07:14:50 +10:00
Michael du Breuil a74f00d045 GCS_MAVLink: Remove single use method 2019-09-03 14:35:17 +10:00
Peter Barker 9da0efaaef GCS_MAVLink: fill SYS_STATUS bits from AC_Fence 2019-09-03 09:12:24 +10:00
Michael du Breuil c85c9faa6d GCS_MAVLink: Directly include needed headers 2019-08-28 13:13:03 +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 2acc53ec17 GCS_MAVLink: break out of loop statement once we have a result 2019-08-24 15:33:50 +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 67bf00c1c3 GCS_MAVLink: ensure payload space before sending message ack
Also add comment about how we shouldn't be sending this message at all.
2019-08-13 16:48:17 +10:00
Peter Barker bb542ca39a GCS_MAVLink: queue AUTOPILOT_VERSION for sending instead of direct-send
Also allows the message to be requested for streaming or with
REQUEST_MESSAGE

We weren't checking for buffer space before sending this out, so it was
a possible source of corruption.
2019-08-13 16:29:45 +10:00
Peter Barker 57528b94cf GCS_MAVLink: allow complete() call on subclasses to fail
Also terminate uploads if any error occurs fetching items
2019-08-07 12:07:59 +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 4e95832433 GCS_MAVLink: send mission acks for bad MISSION_ITEM requests 2019-08-06 13:58:44 +10:00
Peter Barker afd623a6fa GCS_MAVLink: use send_message to send mission items
It is less error-prone to use this new send_message function.

In particular, one of the parameters to these functions was using the
wrong constant when sending a mission item message.
2019-08-06 13:58:44 +10:00
Peter Barker 8fc6e16a4a GCS_MAVLink: fill missing seq and type fields in MISSION_ITEM
GCS_MAVLink: fill mission type in return MISSION_ITEM packets

GCS_MAVLink: fill in return sequence number for MISSION_ITEM messages
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 71533c7c5c GCS_MAVLink: correct frame on rally mission items 2019-08-02 09:17:04 +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 979a9fb679 GCS_MAVLink: ensure item being converted is a rally point 2019-08-01 17:44:37 +10:00
Randy Mackay 767408ffe9 GCS_MAVLink: resolve gcs::send_text compiler warning 2019-07-30 09:02:39 +09:00
Peter Barker 5e55aedd20 GCS_MAVLink: add printf-format attribute to send_text methods 2019-07-26 10:54:41 +10:00
Peter Barker 0bbe049477 GCS_MAVLink: assert max length of statustexts we send to the GCS 2019-07-22 23:05:15 -07:00
Andrew Tridgell 58b739db18 GCS_MAVLink: allow non-register device access with devop
useful for i2c devices such as LW20 lidar
2019-07-19 17:05:23 +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
Michael du Breuil b3c6d3d75a GCS_MAVLink: Refactor battery current interface 2019-07-14 00:28:00 -07: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
Peter Barker c8353c1c13 GCS_MAVLink: fill target system and target component in MISSION_ITEM responses 2019-07-09 09:25:06 +10:00
Peter Barker c6533723de GCS_Param: correct sending of parameters of length 16 2019-07-06 18:06:17 +10:00
Peter Barker ebd8170a15 GCS_MAVLink: add missing include for AP_RTC 2019-07-04 13:57:40 +10:00
Peter Barker f31b7b5772 GCS_MAVLink: remove stray undef of undefined macro 2019-07-02 10:02:55 +10:00
Michael du Breuil 18e979fd4f GCS_MAVLink: Include needed AP_Baro.h 2019-06-27 14:56:21 +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 278ac5e6ed GCS_MAVLink: correct deferred body timing debug 2019-06-25 19:59:49 +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
Andrew Tridgell b6dbb8f464 GCS_MAVLink: always show AHRS healthy with EKF type 10
this fixes an issue noticed by Marco with xplane
2019-06-25 00:28:45 +08:00
Peter Barker c11da6a85d GCS_MAVLink: routing example: use GCS_Dummy in place of custom GCS 2019-06-20 11:41:19 +10:00
Peter Barker 0963957b31 GCS_MAVLink: correct GCS_Dummy firmware version 2019-06-18 10:54:01 +10:00
Peter Barker c39a622653 GCS_MAVLink: take sw_version from AP_FWVersion struct 2019-06-18 10:54:01 +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 be7afe346b GCS_MAVLink: Fix AP_GPS include 2019-06-18 10:02:05 +10:00
Michael du Breuil 8c00102259 GCS_MAVLink: Reduce scoping on AP_BattMonitor include 2019-06-18 10:02:05 +10:00
Peter Barker ae85994c59 GCS_MAVLink: include internal error count as errors4 in SYS_STATUS 2019-06-12 10:05:59 +10:00
Peter Barker f385a4a329 GCS_Common: fix compiler warnings on missing parentheses 2019-06-11 21:50:53 +10:00
Randy Mackay 6ed09d83f3 GCS_MAVLink: send_home_position uses const Location reference 2019-06-11 13:13:22 +09:00
Rajat Singhal bc22aeb4da GCS_Mavlink: Correct format specifier in UART panic message 2019-06-11 13:36:03 +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 4d46c801f2 GCS_MAVLink: panic in SITL if we fail to write to uart 2019-06-06 12:41:48 +10:00
Peter Barker 99c56c1770 GCS_MAVLink: fix MAV.txp log field
This was being promoted to an unsigned.
2019-06-04 09:05:37 +10:00
Peter Barker 75ae6b59b0 GCS_MAVLink: allow Copter to disallow mavlink disarm 2019-05-30 07:37:30 +09:00
Peter Barker e340873d88 GCS_MAVLink: canonicalise on success on commanded-to-arm-when-armed
This means the mavlink return value indicates the current arm status of
the vehicle rather than success/failure of transitioning to the armed or
disarmed state (where trying to arm when armed is considered a failure).

MAVLink is a lossy communication mechanism.  It would not be
unreasonable for a GCS to issue a disarm command multiple times to
increase the chances of the command getting through.
2019-05-30 07:37:30 +09:00
Peter Barker b857d2c1af GCS_MAVLink: handle MAV_CMD_COMPONENT_ARM_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
Andrew Tridgell e2d863498b GCS_MAVLink: clear last msgs when done
this makes MON and WDOG logs clearer
2019-05-17 08:56:06 +10:00
Andrew Tridgell 64c723fd31 GCS_MAVLink: record mavlink msg IDs for watchdog 2019-05-15 15:33:48 +10:00
Andrew Tridgell 3772f58be9 GCS_MAVLink: removed unusued AP_Common/Semaphore.h 2019-05-15 15:33:48 +10:00
Tom Pittenger 1f3c3c853f GCS_MAVLink: move heartbeat sending to gcs instead of by vehicles 2019-05-14 10:54:45 -06:00
Tom Pittenger 4c641c6e2b GCS_MAVLink: comply with mavlink spec to ignore rc_override UINT16_MAX 2019-05-10 15:30:54 -07:00
Jaaaky 971e3af826 GCS_MAVLink: prgama away address-of-packed-member only for g++ >= 9 2019-05-03 01:57:26 +10:00
Peter Barker 9273ac3631 GCS_MAVLink: pragma away address-of-packed-member
g++-9 throws a lot of warnings for taking addresses of packed members.
We can have this warning for our ArduPilot code, but there's way too
many issues within MAVLink to put up with.
2019-05-01 19:36:49 -07:00
Peter Barker a0c80a0b3b GCS_MAVLink: make send_text and send_textv const 2019-05-01 10:18:46 +10:00
Peter Barker e6653f42dd GCS_MAVLink: correct examples with override keyword 2019-04-30 09:29:59 +10:00
Pierre Kancir e3057b40f3 GCS_MAVLINK: remove mavlink send_buf usage 2019-04-23 09:41:00 +10:00
Pierre Kancir cc14885913 GCS_MAVLINK: remove mavlink send_buf usage 2019-04-23 09:41:00 +10:00
Andrew Tridgell 2313970eaf GCS_MAVLink: added method to lockup autopilot
used for watchdog testing
2019-04-22 16:53:35 +10:00
Peter Barker c143ec47da GCS_MAVLink: Bitmask is now a template 2019-04-16 15:12:07 +10:00
Peter Barker efb98437e6 GCS_MAVLink: move setting of compass sys_status bits up 2019-04-16 09:48:23 +10:00
Peter Barker 08cbf18958 GCS_MAVLink: header include fixes for RSSI changes 2019-04-09 09:33:13 +10:00
Pierre Kancir 5a7081b457 GCS_MAVLink: move check_latlng to Location 2019-04-08 12:56:01 -07:00
Andrew Tridgell f998a74adf GCS_MAVLink: don't report SCALED_PRESSURE2 with a non-existant airspeed sensor 2019-04-08 12:52:19 +10:00
Randy Mackay bbd051b246 GCS_MAVLink: send OPTICAL_FLOW messages to optical flow driver 2019-04-08 11:26:59 +09:00
Peter Barker 31daaf9933 GCS_MAVLink: add floating-point-constant designators 2019-04-05 23:04:17 -07:00
Peter Barker 5c4983ffcd GCS_MAVLink: stop converting compass cal floats to ints before saving 2019-04-05 06:09:25 -07: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
Tom Pittenger 8845cc2053 GCS_MAVLink: rename dataflash to logger 2019-03-28 16:40:58 +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