From 5198fc39e82c060687978d042203b33da2ad8995 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 29 May 2016 14:19:08 +0200 Subject: [PATCH] PWM out: Fix usage of MAVLink buffer --- src/drivers/pwm_out_rc_in/pwm_out_rc_in.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/drivers/pwm_out_rc_in/pwm_out_rc_in.cpp b/src/drivers/pwm_out_rc_in/pwm_out_rc_in.cpp index 4b2b68775a..ffecef0915 100644 --- a/src/drivers/pwm_out_rc_in/pwm_out_rc_in.cpp +++ b/src/drivers/pwm_out_rc_in/pwm_out_rc_in.cpp @@ -303,8 +303,9 @@ void serial_callback(void *context, char *buffer, size_t num_bytes) mavlink_message_t msg; for (int i = 0; i < num_bytes; ++i) { - // TODO FIXME: we don't know if MAVLINK_COMM_1 is already taken. - if (mavlink_parse_char(MAVLINK_COMM_1, buffer[i], &msg, &serial_status)) { + // The MAVLink app doesn't use the internal buffer functions + // and hence the first port can be used here. + if (mavlink_parse_char(MAVLINK_COMM_0, buffer[i], &msg, &serial_status)) { // have a message, handle it if (msg.msgid == MAVLINK_MSG_ID_RC_CHANNELS) { // we should publish but would be great if this works