mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-13 20:51:36 +08:00
MAVLink: Update complete app to support MAVLink 1 & MAVLink 2. Add MAV_PROTO_VER param to switch between them
This commit is contained in:
@@ -2084,6 +2084,10 @@ MavlinkReceiver::receive_thread(void *arg)
|
||||
/* if read failed, this loop won't execute */
|
||||
for (ssize_t i = 0; i < nread; i++) {
|
||||
if (mavlink_parse_char(_mavlink->get_channel(), buf[i], &msg, &status)) {
|
||||
|
||||
/* check if we received version 2 */
|
||||
// XXX todo _mavlink->set_proto_version(2);
|
||||
|
||||
/* handle generic messages and commands */
|
||||
handle_message(&msg);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user