Rebase changes on upstream master

This brings in many of the changes from the PX4 fork on ATLFLight.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2016-01-18 23:16:31 -08:00
committed by Julian Oes
parent 2938d23c6c
commit 014f15d8b0
28 changed files with 254 additions and 172 deletions
+11 -4
View File
@@ -530,8 +530,13 @@ void Simulator::pollForMAVLinkMessages(bool publish)
pthread_create(&sender_thread, &sender_thread_attr, Simulator::sending_trampoline, NULL);
pthread_attr_destroy(&sender_thread_attr);
mavlink_status_t udp_status = {};
mavlink_status_t serial_status = {};
// set the threads name
#ifdef __PX4_DARWIN
pthread_setname_np("sim_rcv");
#else
pthread_setname_np(pthread_self(), "sim_rcv");
#endif
bool sim_delay = false;
@@ -575,9 +580,10 @@ void Simulator::pollForMAVLinkMessages(bool publish)
if (len > 0) {
mavlink_message_t msg;
mavlink_status_t status;
for (int i = 0; i < len; i++) {
if (mavlink_parse_char(MAVLINK_COMM_0, _buf[i], &msg, &udp_status)) {
if (mavlink_parse_char(MAVLINK_COMM_0, _buf[i], &msg, &status)) {
// have a message, handle it
handle_message(&msg, publish);
}
@@ -591,9 +597,10 @@ void Simulator::pollForMAVLinkMessages(bool publish)
if (len > 0) {
mavlink_message_t msg;
mavlink_status_t status;
for (int i = 0; i < len; ++i) {
if (mavlink_parse_char(MAVLINK_COMM_1, serial_buf[i], &msg, &serial_status)) {
if (mavlink_parse_char(MAVLINK_COMM_0, serial_buf[i], &msg, &status)) {
// have a message, handle it
handle_message(&msg, true);
}