Commit f3bd1452 authored by Helen Oleynikova's avatar Helen Oleynikova

Clean-up for video transmission.

parent 94abcb70
......@@ -1387,15 +1387,12 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
++imagePacketsArrived;
// emit signal if all packets arrived
// && seq >= imagePackets-1
if ((imagePacketsArrived >= imagePackets))
if (imagePacketsArrived >= imagePackets)
{
// Restart statemachine
imagePackets = 0;
imagePacketsArrived = 0;
emit imageReady(this);
//imagePacketsArrived = 0;
//imagePackets = 0;
//qDebug() << "imageReady emitted. all packets arrived";
}
}
......@@ -2205,8 +2202,6 @@ QImage UAS::getImage()
if (!image.loadFromData(imageRecBuffer))
{
qDebug() << __FILE__ << __LINE__ << "Loading data from image buffer failed!";
//imagePacketsArrived = 0;
//imagePackets = 0;
return QImage();
}
}
......@@ -2216,7 +2211,6 @@ QImage UAS::getImage()
imagePackets = 0;
imageRecBuffer.clear();
return image;
}
void UAS::requestImage()
......
......@@ -1376,7 +1376,7 @@ void HUD::copyImage(UASInterface* uas)
{
QImage temp_im = u->getImage();
if (temp_im.byteCount() > 0) {
this->glImage = temp_im;//u->getImage();
this->glImage = temp_im;
}
// Save to directory if logging is enabled
......
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