Commit 71aa601b authored by pixhawk's avatar pixhawk

Fixed resize bug in HUD.

parent 880879cb
......@@ -153,6 +153,7 @@ HUD::HUD(int width, int height, QWidget* parent)
connect(refreshTimer, SIGNAL(timeout()), this, SLOT(paintHUD()));
// Resize to correct size and fill with image
resize(this->width(), this->height());
//glDrawPixels(glImage.width(), glImage.height(), GL_RGBA, GL_UNSIGNED_BYTE, glImage.bits());
// Set size once
......
......@@ -248,7 +248,7 @@ void QGCRGBDView::updateData(UASInterface *uas)
{
if (depth[c] != 0)
{
int idx = fminf(depth[c], 10.0f) / 10.0f * 127.0f;
int idx = fminf(depth[c], 7.0f) / 7.0f * 127.0f;
idx = 127 - idx;
pixel[0] = colormapJet[idx][2] * 255.0f;
......
......@@ -1238,7 +1238,7 @@ Pixhawk3DWidget::updateRGBD(double robotX, double robotY, double robotZ)
{
if (depth[c] != 0)
{
int idx = fminf(depth[c], 10.0f) / 10.0f * 127.0f;
int idx = fminf(depth[c], 7.0f) / 7.0f * 127.0f;
idx = 127 - idx;
pixel[0] = colormap_jet[idx][2] * 255.0f;
......
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