Browse Source

Snapdragon RC pwm: Only reserve one MAVLink buffer

sbg
Lorenz Meier 9 years ago
parent
commit
49f9607289
  1. 1
      src/drivers/snapdragon_rc_pwm/CMakeLists.txt
  2. 3
      src/drivers/snapdragon_rc_pwm/snapdragon_rc_pwm.cpp

1
src/drivers/snapdragon_rc_pwm/CMakeLists.txt

@ -35,6 +35,7 @@ px4_add_module( @@ -35,6 +35,7 @@ px4_add_module(
MAIN snapdragon_rc_pwm
COMPILE_FLAGS
-Os
-DMAVLINK_COMM_NUM_BUFFERS=1
SRCS
snapdragon_rc_pwm.cpp
DEPENDS

3
src/drivers/snapdragon_rc_pwm/snapdragon_rc_pwm.cpp

@ -52,6 +52,7 @@ @@ -52,6 +52,7 @@
#include <termios.h>
#include <uORB/topics/input_rc.h>
#include <uORB/topics/actuator_controls.h>
#include <v1.0/mavlink_types.h>
#include <v1.0/common/mavlink.h>
@ -155,7 +156,7 @@ void task_main(int argc, char *argv[]) @@ -155,7 +156,7 @@ void task_main(int argc, char *argv[])
mavlink_message_t msg;
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, &serial_status)) {
// have a message, handle it
handle_message(&msg);
}

Loading…
Cancel
Save