mavlink_parse_char() always returns zero with Cube-Orange

256 views
Skip to first unread message

Johanné Jansen van vuuren

unread,
Dec 10, 2019, 3:51:20 AM12/10/19
to MAVLink
I recently got a Pixhawk Cube-Orange with Here2 GPS and I loaded the apj firmware for Arducopter using Mission Planner (version 1.3.70) and it connects just fine.

Now I've connected the cube to a Raspberry Pi 3B+ and I wanted to test the mavlink interface using this example:


I've cloned that repository onto the Pi which is running Ubuntu Core 18.04 and when I run the script it detects System and Component ID 
but then doesn't detect the Cube's initial position. I've done some debugging and can see that this function:

mavlink_parse_char(MAVLINK_COMM_1, cp, &message, &status);       //Line 133, serial_port.cpp

always returns zero and so the program just stays in a loop waiting for messages to be parsed. The screenshot shows the output of the program
and it just stays like that until I press Ctrl-c to exit.

I'm not sure how to proceed from here or why that function returns zero, would anyone be able to offer some advice?

Thanks!
Johanné

screenshot.jpg

Hamish Willee

unread,
Dec 10, 2019, 6:40:23 PM12/10/19
to MAVLink
Hi Johanné,

A guess. It is waiting on SPECIFIC messages in https://github.com/mavlink/c_uart_interface_example/blob/master/mavlink_control.cpp#L241. These may not be emitted by ArduPilot.

You can check what messages you get using mission planner and then update the code to look for those.

Cheers
Hamish
Reply all
Reply to author
Forward
0 new messages