Browse Source

Merged

QGC4.4
pixhawk 14 years ago
parent
commit
315dbba9b0
  1. BIN
      images/patterns/abby.jpg
  2. BIN
      images/patterns/cake.jpg
  3. BIN
      images/patterns/cola.jpg
  4. BIN
      images/patterns/flag.jpg
  5. BIN
      images/patterns/mona.jpg
  6. BIN
      images/patterns/sign.jpg
  7. BIN
      images/patterns/supa.png
  8. BIN
      images/patterns/turm.jpg
  9. BIN
      images/patterns/work.jpg
  10. 1
      qgroundcontrol.pri
  11. 4
      src/ui/ObjectDetectionView.cc
  12. 60
      src/ui/RadioCalibration/RadioCalibrationWindow.cc
  13. 2
      src/ui/RadioCalibration/RadioCalibrationWindow.h
  14. 9
      src/ui/map3D/Pixhawk3DWidget.cc

BIN
images/patterns/abby.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

BIN
images/patterns/cake.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
images/patterns/cola.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
images/patterns/flag.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

BIN
images/patterns/mona.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

BIN
images/patterns/sign.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 KiB

BIN
images/patterns/supa.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

BIN
images/patterns/turm.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

BIN
images/patterns/work.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

1
qgroundcontrol.pri

@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@
#
#-------------------------------------------------
#$$BASEDIR/lib/qextserialport/include
# $$BASEDIR/lib/openjaus/libjaus/include \
# $$BASEDIR/lib/openjaus/libopenJaus/include

4
src/ui/ObjectDetectionView.cc

@ -40,8 +40,6 @@ This file is part of the PIXHAWK project @@ -40,8 +40,6 @@ This file is part of the PIXHAWK project
#include <QDebug>
#include <QMap>
#include "MG.h"
ObjectDetectionView::ObjectDetectionView(QString folder, QWidget *parent) :
QWidget(parent),
patternList(),
@ -117,7 +115,7 @@ void ObjectDetectionView::newPattern(int uasId, QString patternPath, float confi @@ -117,7 +115,7 @@ void ObjectDetectionView::newPattern(int uasId, QString patternPath, float confi
m_ui->listWidget->addItem(pattern.name + separator + "(" + QString::number(pattern.count) + ")" + separator + QString::number(pattern.confidence));
// load image
QString filePath = MG::DIR::getSupportFilesDirectory() + "/" + patternFolder + "/" + patternPath.split("/", QString::SkipEmptyParts).last();
QString filePath = patternFolder + "/" + patternPath.split("/", QString::SkipEmptyParts).last();
QPixmap image = QPixmap(filePath);
if (image.width() > image.height())
image = image.scaledToWidth(m_ui->imageLabel->width());

60
src/ui/RadioCalibration/RadioCalibrationWindow.cc

@ -52,6 +52,66 @@ RadioCalibrationWindow::RadioCalibrationWindow(QWidget *parent) : @@ -52,6 +52,66 @@ RadioCalibrationWindow::RadioCalibrationWindow(QWidget *parent) :
setUASId(0);
}
void RadioCalibrationWindow::setChannelRaw(int ch, float raw)
{
/** this expects a particular channel to function mapping
\todo allow run-time channel mapping
*/
switch (ch)
{
case 0:
aileron->channelChanged(raw);
break;
case 1:
elevator->channelChanged(raw);
break;
case 2:
throttle->channelChanged(raw);
break;
case 3:
rudder->channelChanged(raw);
break;
case 4:
gyro->channelChanged(raw);
break;
case 5:
pitch->channelChanged(raw);
break;
}
}
void RadioCalibrationWindow::setChannelScaled(int ch, float normalized)
{
// /** this expects a particular channel to function mapping
// \todo allow run-time channel mapping
// */
// switch (ch)
// {
// case 0:
// aileron->channelChanged(raw);
// break;
// case 1:
// elevator->channelChanged(raw);
// break;
// case 2:
// throttle->channelChanged(raw);
// break;
// case 3:
// rudder->channelChanged(raw);
// break;
// case 4:
// gyro->channelChanged(raw);
// break;
// case 5:
// pitch->channelChanged(raw);
// break;
// }
}
void RadioCalibrationWindow::setChannel(int ch, float raw, float normalized)
{
/** this expects a particular channel to function mapping

2
src/ui/RadioCalibration/RadioCalibrationWindow.h

@ -67,6 +67,8 @@ public: @@ -67,6 +67,8 @@ public:
public slots:
void setChannel(int ch, float raw, float normalized);
void setChannelRaw(int ch, float raw);
void setChannelScaled(int ch, float normalized);
void loadFile();
void saveFile();
void send();

9
src/ui/map3D/Pixhawk3DWidget.cc

@ -393,6 +393,15 @@ Pixhawk3DWidget::findVehicleModels(void) @@ -393,6 +393,15 @@ Pixhawk3DWidget::findVehicleModels(void)
// add Pixhawk Bravo model
nodes.push_back(PixhawkCheetahGeode::instance());
// add sphere of 0.05m radius
osg::ref_ptr<osg::Sphere> sphere = new osg::Sphere(osg::Vec3f(0.0f, 0.0f, 0.0f), 0.05f);
osg::ref_ptr<osg::ShapeDrawable> sphereDrawable = new osg::ShapeDrawable(sphere);
sphereDrawable->setColor(osg::Vec4f(0.5f, 0.0f, 0.5f, 1.0f));
osg::ref_ptr<osg::Geode> sphereGeode = new osg::Geode;
sphereGeode->addDrawable(sphereDrawable);
sphereGeode->setName("Sphere (0.1m)");
nodes.push_back(sphereGeode);
// add all other models in folder
for (int i = 0; i < files.size(); ++i)
{

Loading…
Cancel
Save