Commit 9687e658 authored by samuezih's avatar samuezih

fix receive image datastream bug

parent 5948605c
...@@ -1100,6 +1100,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -1100,6 +1100,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
imageWidth = p.width; imageWidth = p.width;
imageHeight = p.height; imageHeight = p.height;
imageStart = QGC::groundTimeMilliseconds(); imageStart = QGC::groundTimeMilliseconds();
imagePacketsArrived = 0;
} }
break; break;
...@@ -1132,7 +1134,6 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -1132,7 +1134,6 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
if ((imagePacketsArrived >= imagePackets)) if ((imagePacketsArrived >= imagePackets))
{ {
// Restart statemachine // Restart statemachine
imagePacketsArrived = 0;
emit imageReady(this); emit imageReady(this);
//qDebug() << "imageReady emitted. all packets arrived"; //qDebug() << "imageReady emitted. all packets arrived";
} }
......
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