Commit Graph

568 Commits

Author SHA1 Message Date
Daniel Agar
27b631e827 mavlink: ADSB_VEHICLE stream check free tx buf before send 2020-12-28 11:03:53 +01:00
Daniel Agar
dcb897307d mavlink: HEARTBEAT stream check free tx buf before send 2020-12-28 11:03:53 +01:00
Daniel Agar
ef6209ba03 new manual_control_switches msg (split out of manual_control_setpoint) (#16270)
- split out switches from manual_control_setpoint into new message manual_control_switches
 - manual_control_switches published at minimal rate (~ 1 Hz) or immediately on change
 - simple switch debounce in rc_update (2 consecutive identical decodes required)
 - manual_control_switches logged at full rate rather than sampled at (5-10% of messages logged)
 - manual_control_setpoint publish at minimal rate unless changing
 - commander handle landing gear switch for manual modes
 - processing of mode_slot and mode_switch is now split so we only do one or the other (not both)
     - a future step will be to finally drop mode_switch and accompanying switches entirely

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2020-12-11 12:11:35 -05:00
Antonio Sanjurjo Cortés
aa80167b47 mavlink: rename OPTICAL_FLOW header and defines to OPTICAL_FLOW_RAD
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com>
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
7dde298664 mavlink: move COLLISION to streams hpp
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com>
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
2243931abd mavlink: move ATTITUDE_TARGET to streams hpp
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com>
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
ce28aa089b mavlink: move ATTITUDE_QUATERNION to streams hpp
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com>
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
8ac2ada0e6 mavlink: move ATTITUDE to streams hpp
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com>
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
0bf622e211 mavlink: move OPTICAL_FLOW to streams hpp
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com>
2020-11-29 20:26:07 -05:00
Matthias Grob
0ca63120eb mavlink_messages: add GPS_GLOBAL_ORIGIN
sending out local position reference.
Only send as anser to a request message command or
when the origin was changed from externally to verify.
2020-11-19 19:00:37 +01:00
Daniel Agar
ed8a30d73e mavlink: STATUSTEXT directly use mavlink_log subscription
- ORB_ID(mavlink_log) increase queue depth now that mavlink ringbuffer is gone
2020-11-17 19:47:06 -05:00
Daniel Agar
29658961ef mavlink: move DISTANCE_SENSOR to streams header 2020-11-13 10:05:22 -05:00
Daniel Agar
860a7fd1db mavlink: move ALTITUDE to streams header 2020-11-13 10:05:22 -05:00
Daniel Agar
a8f0987028 mavlink: move WIND_COV to streams header 2020-11-13 10:05:22 -05:00
Daniel Agar
4a9f293596 mavlink: move MOUNT_ORIENTATION to streams header 2020-11-13 10:05:22 -05:00
Daniel Agar
4a6c90b8ea mavlink: STATUSTEXT check TX buffer before sending
- Note the TX buffer size check is lazily ignoring the possibility of messages that span multiple Mavlink STATUSTEXT. This at least accommodates the calibration use case and it's no worse than before for longer messages.
2020-11-13 09:52:05 -05:00
Daniel Agar
0f411d6820 Multi-EKF support (ekf2)
- ekf2 can now run in multi-instance mode (currently up to 9 instances)
    - in multi mode all estimates are published to alternate topics (eg estimator_attitude instead of vehicle_attitude)
 - new ekf2 selector runs in multi-instance mode to monitor and compare all instances, selecting a primary (eg N x estimator_attitude => vehicle_attitude)
 - sensors module accel & gyro inconsistency checks are now relative to the mean of all instances, rather than the current primary (when active ekf2 selector is responsible for choosing primary accel & gyro)
 - existing consumers of estimator_status must check estimator_selector_status to select current primary instance status
 - ekf2 single instance mode is still fully supported and the default

Co-authored-by: Paul Riseborough <gncsolns@gmail.com>
2020-10-27 10:56:11 -04:00
Daniel Agar
16119f0e8c mavlink debug messages disable on CONSTRAINED_FLASH boards
- mavlink messages DEBUG/DEBUG_FLOAT_ARRAY/DEBUG_VECT/NAMED_VALUE_FLOAT move to separate stream headers and don't include if CONSTRAINED_FLASH
 - mavlink receiver DEBUG/DEBUG_FLOAT_ARRAY/DEBUG_VECT/NAMED_VALUE_FLOAT handling excluded if CONSTRAINED_FLASH
 - msg: skip debug_array.msg, debug_key_value.msg, debug_value.msg, debug_vect.msg if CONSTRAINED_FLASH
2020-10-20 11:05:47 -04:00
Oleg Kalachev
c302514a08 mavlink: expose kill switch status 2020-10-19 10:49:52 -04:00
mcsauder
047531b924 Add MavlinkStreamGPSStatus status class stream via GPS_STATUS.hpp and add PRN code to satellite_info.msg. 2020-10-14 08:26:42 +02:00
Daniel Agar
5fa1e8e8ba mavlink: stream rename GROUND_TRUTH -> HIL_STATE_QUATERNION 2020-10-10 19:49:41 -04:00
Daniel Agar
cb4d974977 mavlink: move GROUND_TRUTH stream to separate file 2020-10-10 19:49:41 -04:00
Daniel Agar
283264603a mavlink: move PING stream to separate file 2020-10-10 19:49:41 -04:00
Daniel Agar
97dc988f86 mavlink: move ORBIT_EXECUTION_STATUS stream to separate file 2020-10-10 19:49:41 -04:00
Daniel Agar
826dfa1941 mavlink: move OBSTACLE_DISTANCE stream to separate file 2020-10-10 19:49:41 -04:00
Daniel Agar
f26d4f2b6b mavlink: stop unnecessarily passing around time 2020-10-09 10:30:30 -04:00
Daniel Agar
97cf714c7a mavlink: move HIGH_LATENCY2 stream to streams folder in a single header 2020-10-09 10:30:30 -04:00
Daniel Agar
94146a7b16 mavlink: move RAW_RPM stream to separate file 2020-10-09 10:30:30 -04:00
Daniel Agar
9c4abf334b mavlink: move ESC_INFO stream to separate file 2020-10-09 10:30:30 -04:00
Daniel Agar
1ddfd61d34 mavlink: move ESC_STATUS stream to separate file 2020-10-09 10:30:30 -04:00
Daniel Agar
b51322e160 mavlink: name existing stream headers consistently and add include guards 2020-10-09 10:30:30 -04:00
Daniel Agar
674cd1e3b5 mavlink: move EXTENDED_SYS_STATE stream to separate file 2020-10-09 10:30:30 -04:00
Silvan Fuhrer
8f858d95e6 Rename equivalent airspeed (EAS) to calibrated airspeed (CAS)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-10-06 09:31:58 +02:00
Jacob Dahl
a24488328f Move GPS blending from ekf2 to sensors module
- new sensors work item that subscribes to N x sensor_gps and publishes vehicle_gps_position
 - blending is now configurable with SENS_GPS_MASK and SENS_GPS_TAU

Co-authored-by: Jacob Crabill <jacob@volans-i.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2020-09-25 23:28:31 -04:00
Daniel Agar
0dc8bb9c86 uORB: increase ORB_MULTI_MAX_INSTANCES 4 -> 10
- put more realistic bounds on maximum number of battery instances, gps, etc
2020-09-24 11:01:28 -04:00
Matthias Grob
bf248746ce mavlink_messages: cast rotation types for assert 2020-09-23 09:08:23 -04:00
Daniel Agar
d5295ef4e1 mavlink: add static asserts to keep MAV_SENSOR_ROTATION in sync with PX4 ROTATION 2020-09-22 11:10:31 -04:00
Ricardo Marques
c15efea429 mavlink: publish ESC_INFO and ESC_STATUS
Signed-off-by: Ricardo Marques <marques.ricardo17@gmail.com>
2020-09-14 09:38:44 -04:00
Morten Fyhn Amundsen
cfe4982023 mavlink_messages: Subscribe to all distance_sensor instances
This will make all distance_sensor messages be published to
mavlink. Previously, if you ran multiple distance_sensor publishers,
typically multiple distance sensors, then you'd only get one of them
on mavlink.

The modifications to MavlinkStreamDistanceSensor are based on
MavlinkStreamBatteryStatus, which already exists with multi-instance
subscription and streaming to mavlink.

Use SubscriptionMultiArray

Co-authored-by: Daniel Agar <daniel@agar.ca>
2020-09-13 12:42:07 -04:00
Daniel Agar
6ff361479c uORB: introduce SubscriptionMultiArray for working with multi-instances 2020-09-02 12:46:47 -04:00
Daniel Agar
57721cad9b mavlink: replace sensor_combined with selected vehicle_imu
- check all ORB_MULTI_MAX_INSTANCES possible instances for future expansion
2020-08-23 17:38:27 -04:00
bazooka joe
190b96a46c SMbus battery driver - a lot of updates and optimizations
- added support for BQ40Z80 based battery
- added performance counter for interface errors
- added SMART_BATTERY_INFO mavlink message
- general code cleanups and optimization
- fixed: void flooding the log in case of interface error
- fixed: using _batt_startup_capacity instead of _batt_capacity for discharged_mah
- update: read manufacture_date
- update: get _cell_count from parameter and not const 4
- update: avoid re-reading data that has already been read and stored on class already
- currently the battery type defined by BAT_SMBUS_MODEL parameter and not by auto detection
2020-08-18 21:41:19 -04:00
Daniel Agar
97fc1db768 vehicle_local_position: rename yaw -> heading and add reset logic
- vehicle_global_position yaw removed (redundant)
2020-08-10 11:42:03 +02:00
Lorenz Meier
3b1be7dcd3 Revert "mavlink: GLOBAL_POSITION_INT send without lat/lon availability"
This reverts commit ad14796b5f.
2020-07-22 10:34:18 -04:00
Daniel Agar
ad14796b5f mavlink: GLOBAL_POSITION_INT send without lat/lon availability
- the altitude and velocity portions of this message are still relevant
without GPS lat/lon
2020-07-17 10:46:06 -04:00
Roman Dvořák
f70b3046e9 mavlink: publish RAW_RPM 2020-07-09 10:35:16 -04:00
Matthias Grob
e9eae1bd76 Refactor: Name manual_control_setpoint the same way everywhere 2020-06-22 12:06:27 -04:00
David Jablonski
62bf0a6cf8 added streams to mavlink messages 2020-06-03 17:57:12 +02:00
David Jablonski
edbe7e3ef0 added FLIGHT_INFORMATION stream 2020-06-03 17:57:12 +02:00
David Jablonski
e1f4a70c0e added AUTOPILOT_VERSION and PROTOCOL_VERSION streams 2020-06-03 17:57:12 +02:00