Closed R4057 closed 1 year ago
Can you provide more detailed information of the issue? What you are trying to accomplish, what is failing, etc. I am not sure it is very clear with your previous message. Thanks.
Can you provide more detailed information of the issue? What you are trying to accomplish, what is failing, etc. I am not sure it is very clear with your previous message. Thanks.
on the upper computer I use of "mavlink_parse_char" parses the mavlink message packet come from one-chip computer . When the message packet send by "mavlink_msg_heartbeat_send" that can be successful(return 1), but if the message packet send by "mavlink_msg_global_position_int_send" will be filed(return 0).
If I got it correctly, you are connecting QGC somehow with a companion computer, and for some reason mavlink messaging between both is failing, correct?
If I got it correctly, you are connecting QGC somehow with a companion computer, and for some reason mavlink messaging between both is failing, correct?
Yes, That's true. I can receive the information package, but parsing failed. (Heartbeat packet can be parsed successfully. Others can't succeed )
I understand. I don't think this is the scope of QGC issues. To me it seems you are having trouble working with mavlink itself, so I really think you should ask for help on dedicated mavlink threads.
In QGC you can see lots of examples all around of how to send, and parse mavlink channels.
I think we can close this issue for now.
for (int i = 0; i < 1000; i++) { if (mavlink_parse_char(chan, buffer4[i], &rmsg, &status) == 1) { switch (rmsg.msgid) { case MAVLINK_MSG_ID_HEARTBEAT:{
uint8_t type = mavlink_msg_heartbeat_get_type(&rmsg); recv = ui->plainTextEdit->toPlainText(); recv += "\n";
recv += "心跳包:"; recv += buffer3; ui->plainTextEdit->clear();
ui->plainTextEdit->insertPlainText(recv);
ui->plainTextEdit->moveCursor(QTextCursor::End); switch (type) { case MAV_TYPE_FIXED_WING:{ QString recv1 = ui->plainTextEdit->toPlainText(); recv1 += "\n"; recv1 += " 固定翼 "; ui->plainTextEdit->clear(); ui->plainTextEdit->insertPlainText(recv1); ui->plainTextEdit->moveCursor(QTextCursor::End); break; } case MAV_TYPE_QUADROTOR:{ QString recv1 = ui->plainTextEdit->toPlainText(); recv1 += "\n"; recv1 += " 四旋翼 "; ui->plainTextEdit->clear(); ui->plainTextEdit->insertPlainText(recv1); ui->plainTextEdit->moveCursor(QTextCursor::End); break; } default:{ break; } } break; } case MAVLINK_MSG_ID_GLOBAL_POSITION_INT:{ uint32_t TimeMs = mavlink_msg_global_position_int_get_time_boot_ms(&rmsg); int32_t Lat = mavlink_msg_global_position_int_get_lat(&rmsg); int32_t Lon = mavlink_msg_global