Commit 2d1d33f7 authored by pixhawk's avatar pixhawk

added optical flow message display to realtime plot

parent 32ab8e46
......@@ -932,6 +932,18 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit valueChanged(uasId, "servo #8", "us", servos.servo8_raw, time);
}
break;
case MAVLINK_MSG_ID_OPTICAL_FLOW:
{
mavlink_optical_flow_t flow;
mavlink_msg_optical_flow_decode(&message, &flow);
quint64 time = getUnixTime(flow.time);
emit valueChanged(uasId, QString("opt_flow_%1.x").arg(flow.sensor_id), "Pixel", flow.flow_x, time);
emit valueChanged(uasId, QString("opt_flow_%1.y").arg(flow.sensor_id), "Pixel", flow.flow_y, time);
emit valueChanged(uasId, QString("opt_flow_%1.qual").arg(flow.sensor_id), "0-255", flow.quality, time);
}
break;
case MAVLINK_MSG_ID_STATUSTEXT:
{
QByteArray b;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment