|
|
@ -138,8 +138,8 @@ HUD::HUD(int width, int height, QWidget* parent) |
|
|
|
hudInstrumentsEnabled(true), |
|
|
|
hudInstrumentsEnabled(true), |
|
|
|
videoEnabled(false), |
|
|
|
videoEnabled(false), |
|
|
|
xImageFactor(1.0), |
|
|
|
xImageFactor(1.0), |
|
|
|
yImageFactor(1.0) |
|
|
|
yImageFactor(1.0), |
|
|
|
imageRequested(false), |
|
|
|
imageRequested(false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Set auto fill to false
|
|
|
|
// Set auto fill to false
|
|
|
|
setAutoFillBackground(false); |
|
|
|
setAutoFillBackground(false); |
|
|
@ -168,7 +168,7 @@ HUD::HUD(int width, int height, QWidget* parent) |
|
|
|
imageTimer->setInterval(250); |
|
|
|
imageTimer->setInterval(250); |
|
|
|
//connect(refreshTimer, SIGNAL(timeout()), this, SLOT(update()));
|
|
|
|
//connect(refreshTimer, SIGNAL(timeout()), this, SLOT(update()));
|
|
|
|
connect(refreshTimer, SIGNAL(timeout()), this, SLOT(paintHUD())); |
|
|
|
connect(refreshTimer, SIGNAL(timeout()), this, SLOT(paintHUD())); |
|
|
|
connect(imageTimer, SIGNAL(timeout()), this, SLOT(requestNewImage())); |
|
|
|
// connect(imageTimer, SIGNAL(timeout()), this, SLOT(requestNewImage())); TODO
|
|
|
|
|
|
|
|
|
|
|
|
// Resize to correct size and fill with image
|
|
|
|
// Resize to correct size and fill with image
|
|
|
|
//glDrawPixels(glImage.width(), glImage.height(), GL_RGBA, GL_UNSIGNED_BYTE, glImage.bits());
|
|
|
|
//glDrawPixels(glImage.width(), glImage.height(), GL_RGBA, GL_UNSIGNED_BYTE, glImage.bits());
|
|
|
@ -1635,14 +1635,15 @@ void HUD::setPixels(int imgid, const unsigned char* imageData, int length, int s |
|
|
|
|
|
|
|
|
|
|
|
void HUD::requestNewImage() |
|
|
|
void HUD::requestNewImage() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!imageRequested) |
|
|
|
qDebug() << "HUD::requestNewImage()"; |
|
|
|
{ |
|
|
|
// if (!imageRequested)
|
|
|
|
this->u->requestImage(); |
|
|
|
// {
|
|
|
|
imageRequested = true; |
|
|
|
// this->u->requestImage();
|
|
|
|
} |
|
|
|
// imageRequested = true;
|
|
|
|
else |
|
|
|
// }
|
|
|
|
{ |
|
|
|
// else
|
|
|
|
|
|
|
|
// {
|
|
|
|
this->glImage = this->u->getImage(); |
|
|
|
this->glImage = this->u->getImage(); |
|
|
|
imageRequested = false; |
|
|
|
// imageRequested = false;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|