Commit Graph

1989 Commits

Author SHA1 Message Date
BazookaJoe1900 cc41e5be20 mavlink: stream battery status fields (#13420)
* Implement battery status "charge state" on mavlink battery status message
2019-11-15 09:25:30 -05:00
Claudio Micheli 9364393e9d mavlink_receiver: Reject own autopilot messages for battery status.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-11-14 22:20:22 +01:00
JaeyoungLim 6bd4273b9c mavlink: handle cellular_status messages for logging 2019-11-13 09:19:02 -05:00
Oleg Kalachev 17a84a691f mavlink_receiver: simplify and fix statustext.severity handling 2019-11-11 17:12:37 -05:00
Julian Oes 60343cc168 mavlink: warning for actuator offboard & lockstep
Currently actuator offboard control interferes with SITL lockstep.
Therefore, the least we can do is to warn a user and inform them how to
workaround the issue.
2019-11-06 12:30:30 -05:00
Oleg Kalachev 7b83da708a mavlink_receiver: write STATUSTEXT messages from the same system to log 2019-11-04 15:33:22 -05:00
Jaeyoung-Lim 1951e416b1 Enable rover attitude setpoint 2019-11-03 09:54:22 -05:00
Beat Küng 3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Julian Oes cb03612d99 mavlink: only ignore messages on UDP before init
We should still accept messages arriving over serial.
2019-10-28 11:13:16 -04:00
Julian Oes 08cce4f7f3 mavlink: accept msgs without source initialized
I don't understand why we should wait to parse incoming MAVLink traffic
just because we don't have the source address initialized. We still
check the source address before doing a sendto.

This should fix serial MAVLink communication on FMU5x where both serial
and UDP is available. There the serial connection previously did not
work because nothing was connected over UDP.
2019-10-28 11:13:16 -04:00
Daniel Agar c284198bec clang-tidy: partially fix hicpp-use-override 2019-10-28 10:50:31 -04:00
Daniel Agar 6f1f5e0325 clang-tidy: partially fix readability-redundant-declaration 2019-10-28 10:50:31 -04:00
Daniel Agar a7f330075a clang-tidy: enable hicpp-braces-around-statements and fix 2019-10-28 10:50:31 -04:00
Daniel Agar 744f06cc8f clang-tidy: enable readability-delete-null-pointer and fix 2019-10-28 10:50:31 -04:00
Silvan Fuhrer 99dd229d71 Rally Point: fix typo of save to safe in mission_safe_point_s
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-10-28 09:54:59 +01:00
Julien Lecoeur 8f910f8435 ATTITUDE_QUATERNION: fill repr_offset_q for tailsitters (#13249)
* Conversions lib: add quaternion getter

* vehicle_status: add flag is_vtol_tailsitter

* ATTITUDE_QUATERNION: fill repr_offset_q for tailsitters
2019-10-28 09:27:53 +01:00
Daniel Agar 380cae18d1 clang-tidy: partially fix modernize-use-equals-default 2019-10-27 19:19:07 -04:00
Jaeyoung-Lim 3dc3679f9e Copy fields 2019-10-27 11:47:10 +00:00
Jaeyoung-Lim 58d646e33d Log CPU loads 2019-10-27 11:47:10 +00:00
Jaeyoung-Lim 677c0b4713 Add uorb topic 2019-10-27 11:47:10 +00:00
Jaeyoung-Lim a3bd9ead4c Add message handlers for onboard computer status 2019-10-27 11:47:10 +00:00
Ildar Sadykov 0326a8ec76 mavlink_receiver: Fit in 'flash' region 2019-10-26 18:29:16 +01:00
Ildar Sadykov b29a6b8761 set_attitude_target: get vehicle_status every time. 2019-10-26 18:29:16 +01:00
Ildar Sadykov fc59414a25 set_attitude_target: set rate thrust according to VTOL mode 2019-10-26 18:29:16 +01:00
Ildar Sadykov 948d24c1e3 Apply suggestions from code review
Co-Authored-By: Julien Lecoeur <jlecoeur@users.noreply.github.com>
2019-10-26 18:29:16 +01:00
Ildar Sadykov 65ed068bbd mavlink_receiver: vtol_vehicle_status changed to vehicle_status subscription 2019-10-26 18:29:16 +01:00
Ildar Sadykov d2f0100e5e Removed _is_vtol in MavlinkReceiver class 2019-10-26 18:29:16 +01:00
Ildar Sadykov c8edac0a1d VTOL state check for attitude setpoint publish 2019-10-26 18:29:16 +01:00
Ildar Sadykov 35b0778499 Check system type for SET_ATTITUDE_TARGET attitude publising
Check if system type is VTOL and publish attitude to proper uORB topic
2019-10-26 18:29:16 +01:00
Matthias Grob 9c25b987bc vehicle_local_position_setpoint: make acceleration and jerk arrays 2019-10-24 14:58:57 +02:00
Julian Oes 2fcddd9b8d mavlink: fix uninitialized mavlink warnings 2019-10-17 08:44:53 -04:00
Daniel Agar c51475640e mavlink: only send ATTITUDE/ATTITUDE_QUATERNION msgs on vehicle_attitude update
- fixes #13182
2019-10-14 15:47:22 -04:00
TSC21 10e3bcd138 ulog stream msgs: rename 'sequence' fields as they are protected names in fastrtpsgen 2019-10-14 16:37:17 +01:00
BazookaJoe1900 3007b0876c mavlink: add protection against setting wrong type of parameters 2019-10-14 11:18:08 -04:00
Julian Oes 307dc3e32d mavlink: fix boot complete without lockstep
Without lockstep the actual monotonic clock of the host computer is
used. Therefore, this time is likely much more than 20 seconds and the
check if the boot complete happened in time will fail immediately.

Therefore, it probably makes more sense to count the time from the first
mavlink creation.
2019-10-10 08:58:34 +02:00
mcsauder 6066300757 Set a default signal_quality value in the MavlinkReciever::handle_message_distance_sensor() method. 2019-10-08 21:19:47 +01:00
mcsauder 5ccba5541d Added missing fields and a TODO with commented field to the MavlinkReciever::handle_message_distance_sensor(). 2019-10-08 21:19:47 +01:00
Julian Oes 741f6787a7 mavlink: disable sending RC override
This was added to enable a Pixhawk to be used as an RC input for e.g.
SITL. As far as we're aware of that's not really used. However, sending
this can cause issues if multiple Pixhawks are in the same network.
Also, is uses up some of the MAVLink bandwidth.

Therefore, it's probably best to remove that feature for now.
2019-10-07 09:59:17 -04:00
Daniel Agar c8e59c4e39 parameter_update use uORB::Subscription consistently 2019-09-29 10:49:03 -04:00
garfieldG bbb96cbd0c Mavlink startup script per board
-moved rc.mavlink to the boards optional rc additions (now it's called rc.board_mavlink) to handle board specific mavlink needs (mavlink over usb, ethernet, additional streams, etc.)
-mavlink module will be responsible to usb defaults, therefore less args are needed to be passed to mavlink module if one wants to use mavlink over usb.
-the way to check if connection is usb is by it's designated variable and not by config mode.
2019-09-29 10:46:08 -04:00
Julian Oes ce4290c8d4 mavlink: typo fix att -> act 2019-09-28 16:40:13 -04:00
Julian Oes b0035e5704 mavlink: prevent race if shut down immediately
If we do mavlink stop-all right after mavlink start, we do a perf_free
before actually having stopped the threads accessing the perf counters.
2019-09-28 16:40:13 -04:00
kamilritz 8ce4a15778 Update frame in mavlink receiver odometry to newest mavlink 2019-09-26 14:48:20 -04:00
Daniel Agar 3031f94ded mavlink: optimize normal mode for typical GCS usage over serial radio 2019-09-25 14:08:04 -04:00
Julian Oes 0b368d043f mavlink: always check stream subscriptions (#13018)
This fixes the regression where we saw this in SITL:
ERROR [mavlink] system boot did not complete in 20 seconds

The reason was that the stream subscription requests were not checked
because the while loop was not running yet because mavlink was not
booted completely.
By moving the stream subscription requests into a function we can run
them even if we don't run the rest of the loop.
2019-09-25 14:37:08 +02:00
kritz 7427768e70 ECL reference frame alignment fix (#12771)
* Fix EKF frame alignemen in ECL

* Remove empty lines

* Add initalization for ev_odom

* Only use yaw covariance for angErr

* Improve frame naming in comments

* Use copyTo

* Add aligned as suffix

* Add missing vehicle_visual_odometry_aligned
2019-09-23 14:24:52 -04:00
cclauss c18104d48b Use print() function in both Python 2 and Python 3
Legacy __print__ statements are syntax errors in Python 3 but __print()__ function works as expected in both Python 2 and Python 3.
2019-09-22 13:54:24 -04:00
Daniel Agar fe4f6c186e Mavlink: ifdef networking code 2019-09-21 13:46:01 -04:00
Julian Kent 2d4ecab3b0 Remove unsafe access to .data() and _data in Matrix 2019-09-18 22:01:36 -04:00
Daniel Agar 494f35d5f4 Mavlink: wait for boot complete before sending or receiving anything 2019-09-18 09:07:55 -04:00