mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-19 21:59:05 +08:00
Snapdragon RC pwm: Only reserve one MAVLink buffer
This commit is contained in:
parent
001a2c01f0
commit
49f9607289
@ -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
|
||||
|
||||
@ -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[])
|
||||
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…
x
Reference in New Issue
Block a user