From 07c61b8d0522bd9be6f8aae139c1c6edf28deac8 Mon Sep 17 00:00:00 2001 From: pixhawk Date: Fri, 27 May 2011 20:50:46 +0200 Subject: [PATCH] bugfixes for image transmission --- src/uas/UAS.cc | 2 ++ src/ui/HUD.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 76a04112a..a77411a05 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -1327,6 +1327,8 @@ QImage UAS::getImage() { #ifdef MAVLINK_ENABLED_PIXHAWK image.loadFromData(imageRecBuffer); + // Restart statemachine + imagePacketsArrived = 0; return image; #endif diff --git a/src/ui/HUD.cc b/src/ui/HUD.cc index 989833276..2f6eb2da9 100644 --- a/src/ui/HUD.cc +++ b/src/ui/HUD.cc @@ -165,7 +165,7 @@ HUD::HUD(int width, int height, QWidget* parent) // Refresh timer refreshTimer->setInterval(updateInterval); - imageTimer->setInterval(1); + imageTimer->setInterval(250); //connect(refreshTimer, SIGNAL(timeout()), this, SLOT(update())); connect(refreshTimer, SIGNAL(timeout()), this, SLOT(paintHUD())); connect(imageTimer, SIGNAL(timeout()), this, SLOT(requestNewImage())); -- 2.22.0