diff --git a/qgroundcontrol.pri b/qgroundcontrol.pri index de49b3d6adbd68795c9827b374023de9cbc7348d..4c316105e69b3af8bb371a852c4a75831215b2b6 100644 --- a/qgroundcontrol.pri +++ b/qgroundcontrol.pri @@ -209,7 +209,8 @@ linux-g++ { QMAKE_POST_LINK += && cp -rf $$BASEDIR/models $$DESTDIR QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$DESTDIR QMAKE_POST_LINK += && mkdir -p $$DESTDIR/images - QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/Vera.ttf $$DESTDIR/images/Vera.ttf + QMAKE_POST_LINK += && cp -f $$BASEDIR/images/Vera.ttf $$DESTDIR/images/Vera.ttf + QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/patterns $$DESTDIR/images # osg/osgEarth dynamic casts might fail without this compiler option. # see http://osgearth.org/wiki/FAQ for details. @@ -278,7 +279,8 @@ linux-g++-64 { QMAKE_POST_LINK += && cp -rf $$BASEDIR/models $$DESTDIR QMAKE_POST_LINK += && cp -rf $$BASEDIR/data $$DESTDIR QMAKE_POST_LINK += && mkdir -p $$DESTDIR/images - QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/Vera.ttf $$DESTDIR/images/Vera.ttf + QMAKE_POST_LINK += && cp -f $$BASEDIR/images/Vera.ttf $$DESTDIR/images/Vera.ttf + QMAKE_POST_LINK += && cp -rf $$BASEDIR/images/patterns $$DESTDIR/images # osg/osgEarth dynamic casts might fail without this compiler option. # see http://osgearth.org/wiki/FAQ for details. 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();