diff --git a/images/patterns/abby.jpg b/images/patterns/abby.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b39b9a5e53e0b741934eec8c7d8d5bcf4b88faa7 Binary files /dev/null and b/images/patterns/abby.jpg differ diff --git a/images/patterns/cake.jpg b/images/patterns/cake.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a6ea3434ab67b1a0bd5e045e08d4efef8a796ffa Binary files /dev/null and b/images/patterns/cake.jpg differ diff --git a/images/patterns/cola.jpg b/images/patterns/cola.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2faed5d5235fbbe96b85c4e62a485cb0f2e29f98 Binary files /dev/null and b/images/patterns/cola.jpg differ diff --git a/images/patterns/flag.jpg b/images/patterns/flag.jpg new file mode 100644 index 0000000000000000000000000000000000000000..667a7c18679512186570155a409d3ddc3ca31c9f Binary files /dev/null and b/images/patterns/flag.jpg differ diff --git a/images/patterns/mona.jpg b/images/patterns/mona.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3f440d7f24af41efd3ca47c987c41d6427f92ec0 Binary files /dev/null and b/images/patterns/mona.jpg differ diff --git a/images/patterns/sign.jpg b/images/patterns/sign.jpg new file mode 100644 index 0000000000000000000000000000000000000000..89efc8f9a36d0a1939d93f5b3402191e532168e0 Binary files /dev/null and b/images/patterns/sign.jpg differ diff --git a/images/patterns/supa.png b/images/patterns/supa.png new file mode 100644 index 0000000000000000000000000000000000000000..5d8552f45c2476d8c82aa8feb0740925d66e877e Binary files /dev/null and b/images/patterns/supa.png differ diff --git a/images/patterns/turm.jpg b/images/patterns/turm.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5ccbfe36075278aa3dfe40fd32d6af3739582212 Binary files /dev/null and b/images/patterns/turm.jpg differ diff --git a/images/patterns/work.jpg b/images/patterns/work.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1fa2cb12959351de9649814a0193c1312d938dd1 Binary files /dev/null and b/images/patterns/work.jpg differ diff --git a/qgroundcontrol.pri b/qgroundcontrol.pri index 2b2e46dc3fef245e67bb6fc6756828ec0070251c..c819a50b89dc9d8bd57e032b0433dec72c3ff742 100644 --- a/qgroundcontrol.pri +++ b/qgroundcontrol.pri @@ -23,6 +23,7 @@ # #------------------------------------------------- + #$$BASEDIR/lib/qextserialport/include # $$BASEDIR/lib/openjaus/libjaus/include \ # $$BASEDIR/lib/openjaus/libopenJaus/include diff --git a/src/ui/ObjectDetectionView.cc b/src/ui/ObjectDetectionView.cc index 03d8c007e8a2f6db0c168721ffb3f2d9a0fccd3b..922a1c61562365f7dec4c6acd273f214d6207546 100644 --- a/src/ui/ObjectDetectionView.cc +++ b/src/ui/ObjectDetectionView.cc @@ -40,8 +40,6 @@ This file is part of the PIXHAWK project #include #include -#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 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()); diff --git a/src/ui/RadioCalibration/RadioCalibrationWindow.cc b/src/ui/RadioCalibration/RadioCalibrationWindow.cc index effb3b52ea7013457bf32c3974ab238169c85cc7..4bc42ada8613c1a13c9c5cb2e96609e3f954daa1 100644 --- a/src/ui/RadioCalibration/RadioCalibrationWindow.cc +++ b/src/ui/RadioCalibration/RadioCalibrationWindow.cc @@ -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 diff --git a/src/ui/RadioCalibration/RadioCalibrationWindow.h b/src/ui/RadioCalibration/RadioCalibrationWindow.h index 1ec038c754c062314ec22d29baf0fd228cab6df4..3a3f55310632d49c71a7b1b9b883390a74a1e109 100644 --- a/src/ui/RadioCalibration/RadioCalibrationWindow.h +++ b/src/ui/RadioCalibration/RadioCalibrationWindow.h @@ -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(); diff --git a/src/ui/map3D/Pixhawk3DWidget.cc b/src/ui/map3D/Pixhawk3DWidget.cc index d0a57960ba097791fc07acef4e1e24e40038a719..fb18f3365899cf6632fa80a4457b312cf9f89a6f 100644 --- a/src/ui/map3D/Pixhawk3DWidget.cc +++ b/src/ui/map3D/Pixhawk3DWidget.cc @@ -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 sphere = new osg::Sphere(osg::Vec3f(0.0f, 0.0f, 0.0f), 0.05f); + osg::ref_ptr sphereDrawable = new osg::ShapeDrawable(sphere); + sphereDrawable->setColor(osg::Vec4f(0.5f, 0.0f, 0.5f, 1.0f)); + osg::ref_ptr 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) {