diff --git a/src/ui/HUD.cc b/src/ui/HUD.cc index 42bca86d58d294839ebdc9c365e5405982e556d2..1ee2aae30066bf6b2d3394255a3f2b20be881f88 100644 --- a/src/ui/HUD.cc +++ b/src/ui/HUD.cc @@ -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 diff --git a/src/ui/QGCRGBDView.cc b/src/ui/QGCRGBDView.cc index 4813b3d0c84a310337afc2262017a9ae70ab7973..de45d8065374e7e9ffc0267024b9cfb490a49405 100644 --- a/src/ui/QGCRGBDView.cc +++ b/src/ui/QGCRGBDView.cc @@ -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; diff --git a/src/ui/map3D/Pixhawk3DWidget.cc b/src/ui/map3D/Pixhawk3DWidget.cc index a13dcc1e6fb59fd381e25c80290b07b71a36f34b..5429c7cb45c16df2d4842eb14a3535943e136058 100644 --- a/src/ui/map3D/Pixhawk3DWidget.cc +++ b/src/ui/map3D/Pixhawk3DWidget.cc @@ -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;