diff --git a/qgroundcontrol.pri b/qgroundcontrol.pri
index 818da225bdb02b8b3e0b66a4ff495294734606f1..1638f810b15fba4bbd3c0c5676e51124186cd526 100644
--- a/qgroundcontrol.pri
+++ b/qgroundcontrol.pri
@@ -42,8 +42,8 @@ macx|macx-g++42|macx-g++: {
# COMPILER_VERSION = $$system(gcc -v)
#message(Using compiler $$COMPILER_VERSION)
- CONFIG += x86_64 cocoa phonon
- CONFIG -= x86
+ CONFIG += x86 cocoa phonon
+ CONFIG -= x86_64
#HARDWARE_PLATFORM = $$system(uname -a)
#contains( $$HARDWARE_PLATFORM, "9.6.0" ) || contains( $$HARDWARE_PLATFORM, "9.7.0" ) || contains( $$HARDWARE_PLATFORM, "9.8.0" ) || contains( $$HARDWARE_PLATFORM, "9.9.0" ) {
@@ -94,7 +94,7 @@ macx|macx-g++42|macx-g++: {
QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
# Copy libraries
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/qgroundcontrol.app/Contents/libs
- QMAKE_POST_LINK += && cp -rf $$BASEDIR/lib/mac64/lib/* $$TARGETDIR/qgroundcontrol.app/Contents/libs
+ QMAKE_POST_LINK += && cp -rf $$BASEDIR/lib/mac32/lib/* $$TARGETDIR/qgroundcontrol.app/Contents/libs
# Fix library paths inside executable
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
@@ -164,11 +164,11 @@ macx|macx-g++42|macx-g++: {
# Include OpenSceneGraph libraries
INCLUDEPATH += -framework GLUT \
-framework Cocoa \
- $$BASEDIR/lib/mac64/include
+ $$BASEDIR/lib/mac32/include
LIBS += -framework GLUT \
-framework Cocoa \
- -L$$BASEDIR/lib/mac64/lib \
+ -L$$BASEDIR/lib/mac32/lib \
-lOpenThreads \
-losg \
-losgViewer \
diff --git a/src/ui/HUD.cc b/src/ui/HUD.cc
index 1ee2aae30066bf6b2d3394255a3f2b20be881f88..39e0be4d7e9b94e2bf16507c15d4eb8c0abb2797 100644
--- a/src/ui/HUD.cc
+++ b/src/ui/HUD.cc
@@ -1394,18 +1394,23 @@ void HUD::setPixels(int imgid, const unsigned char* imageData, int length, int s
Q_UNUSED(imgid);
// qDebug() << "at" << __FILE__ << __LINE__ << ": Received startindex" << startIndex << "and length" << length << "(" << startIndex+length << "of" << rawExpectedBytes << "bytes)";
- if (imageStarted) {
+ if (imageStarted)
+ {
//if (rawLastIndex != startIndex) qDebug() << "PACKET LOSS!";
- if (startIndex+length > rawExpectedBytes) {
+ if (startIndex+length > rawExpectedBytes)
+ {
qDebug() << "HUD: OVERFLOW! startIndex:" << startIndex << "length:" << length << "image raw size" << ((receivedWidth * receivedHeight * receivedChannels * receivedDepth) / 8) - 1;
- } else {
+ }
+ else
+ {
memcpy(rawImage+startIndex, imageData, length);
rawLastIndex = startIndex+length;
// Check if we just reached the end of the image
- if (startIndex+length == rawExpectedBytes) {
+ if (startIndex+length == rawExpectedBytes)
+ {
//qDebug() << "HUD: END OF IMAGE REACHED!";
finishImage();
rawLastIndex = 0;
diff --git a/src/ui/WaypointList.cc b/src/ui/WaypointList.cc
index 09db4ec4e11f28537390caf50073a141d8184e2f..8436230ec40ec85f78c17eaa079651154aefc271 100644
--- a/src/ui/WaypointList.cc
+++ b/src/ui/WaypointList.cc
@@ -99,12 +99,11 @@ WaypointList::WaypointList(QWidget *parent, UASInterface* uas) :
// SET UAS AFTER ALL SIGNALS/SLOTS ARE CONNECTED
if (uas)
{
- qDebug() << "setUAS" ;
WPM = uas->getWaypointManager();
+ setUAS(uas);
}
else
{
- qDebug() << "setUAS failed" ;
// Hide buttons, which don't make sense without valid UAS
m_ui->positionAddButton->hide();
m_ui->transmitButton->hide();
@@ -116,8 +115,6 @@ WaypointList::WaypointList(QWidget *parent, UASInterface* uas) :
WPM = new UASWaypointManager(NULL);
}
- setUAS(uas);
-
// STATUS LABEL
updateStatusLabel("");
@@ -154,8 +151,7 @@ void WaypointList::updateAttitude(UASInterface* uas, double roll, double pitch,
void WaypointList::setUAS(UASInterface* uas)
{
- //if (this->uas == NULL && uas != NULL)
- if (this->uas == NULL)
+ if (this->uas == NULL && uas != NULL)
{
this->uas = uas;
diff --git a/src/ui/designer/QGCCommandButton.cc b/src/ui/designer/QGCCommandButton.cc
index c1430175d13993885b558c5b1241dcabdf4809f6..ad50897cbf38969946d84babce5ddb6dfecfb376 100644
--- a/src/ui/designer/QGCCommandButton.cc
+++ b/src/ui/designer/QGCCommandButton.cc
@@ -118,6 +118,9 @@ void QGCCommandButton::startEditMode()
ui->editParam2SpinBox->show();
ui->editParam3SpinBox->show();
ui->editParam4SpinBox->show();
+ ui->editParam5SpinBox->show();
+ ui->editParam6SpinBox->show();
+ ui->editParam7SpinBox->show();
ui->editLine1->show();
ui->editLine2->show();
//setStyleSheet("QGroupBox { border: 1px solid #66666B; border-radius: 3px; padding: 10px 0px 0px 0px; background: #111122; }");
@@ -135,11 +138,15 @@ void QGCCommandButton::endEditMode()
ui->editParamsVisibleCheckBox->hide();
ui->editLine1->hide();
ui->editLine2->hide();
- if (!ui->editParamsVisibleCheckBox->isChecked()) {
+ if (!ui->editParamsVisibleCheckBox->isChecked())
+ {
ui->editParam1SpinBox->hide();
ui->editParam2SpinBox->hide();
ui->editParam3SpinBox->hide();
ui->editParam4SpinBox->hide();
+ ui->editParam5SpinBox->hide();
+ ui->editParam6SpinBox->hide();
+ ui->editParam7SpinBox->hide();
}
ui->commandButton->show();
@@ -155,23 +162,39 @@ void QGCCommandButton::writeSettings(QSettings& settings)
{
qDebug() << "COMMAND BUTTON WRITING SETTINGS";
settings.setValue("TYPE", "COMMANDBUTTON");
- settings.setValue("QGC_ACTION_BUTTON_DESCRIPTION", ui->nameLabel->text());
- settings.setValue("QGC_ACTION_BUTTON_BUTTONTEXT", ui->commandButton->text());
- settings.setValue("QGC_ACTION_BUTTON_ACTIONID", ui->editCommandComboBox->itemData(ui->editCommandComboBox->currentIndex()).toInt());
+ settings.setValue("QGC_COMMAND_BUTTON_DESCRIPTION", ui->nameLabel->text());
+ settings.setValue("QGC_COMMAND_BUTTON_BUTTONTEXT", ui->commandButton->text());
+ settings.setValue("QGC_COMMAND_BUTTON_COMMANDID", ui->editCommandComboBox->itemData(ui->editCommandComboBox->currentIndex()).toInt());
settings.setValue("QGC_COMMAND_BUTTON_PARAMS_VISIBLE", ui->editParamsVisibleCheckBox->isChecked());
+ settings.setValue("QGC_COMMAND_BUTTON_PARAM1", ui->editParam1SpinBox->value());
+ settings.setValue("QGC_COMMAND_BUTTON_PARAM2", ui->editParam2SpinBox->value());
+ settings.setValue("QGC_COMMAND_BUTTON_PARAM3", ui->editParam3SpinBox->value());
+ settings.setValue("QGC_COMMAND_BUTTON_PARAM4", ui->editParam4SpinBox->value());
+ settings.setValue("QGC_COMMAND_BUTTON_PARAM5", ui->editParam5SpinBox->value());
+ settings.setValue("QGC_COMMAND_BUTTON_PARAM6", ui->editParam6SpinBox->value());
+ settings.setValue("QGC_COMMAND_BUTTON_PARAM7", ui->editParam7SpinBox->value());
settings.sync();
}
void QGCCommandButton::readSettings(const QSettings& settings)
{
- ui->editNameLabel->setText(settings.value("QGC_ACTION_BUTTON_DESCRIPTION", "ERROR LOADING BUTTON").toString());
- ui->editButtonName->setText(settings.value("QGC_ACTION_BUTTON_BUTTONTEXT", "UNKNOWN").toString());
- ui->editCommandComboBox->setCurrentIndex(settings.value("QGC_ACTION_BUTTON_ACTIONID", 0).toInt());
+ ui->editNameLabel->setText(settings.value("QGC_COMMAND_BUTTON_DESCRIPTION", "ERROR LOADING BUTTON").toString());
+ ui->editButtonName->setText(settings.value("QGC_COMMAND_BUTTON_BUTTONTEXT", "UNKNOWN").toString());
+ ui->editCommandComboBox->setCurrentIndex(settings.value("QGC_COMMAND_BUTTON_COMMANDID", 0).toInt());
+
+ ui->nameLabel->setText(settings.value("QGC_COMMAND_BUTTON_DESCRIPTION", "ERROR LOADING BUTTON").toString());
+ ui->commandButton->setText(settings.value("QGC_COMMAND_BUTTON_BUTTONTEXT", "UNKNOWN").toString());
+
+ int commandId = settings.value("QGC_COMMAND_BUTTON_COMMANDID", 0).toInt();
- ui->nameLabel->setText(settings.value("QGC_ACTION_BUTTON_DESCRIPTION", "ERROR LOADING BUTTON").toString());
- ui->commandButton->setText(settings.value("QGC_ACTION_BUTTON_BUTTONTEXT", "UNKNOWN").toString());
+ ui->editParam1SpinBox->setValue(settings.value("QGC_COMMAND_BUTTON_PARAM1", 0.0).toDouble());
+ ui->editParam2SpinBox->setValue(settings.value("QGC_COMMAND_BUTTON_PARAM2", 0.0).toDouble());
+ ui->editParam3SpinBox->setValue(settings.value("QGC_COMMAND_BUTTON_PARAM3", 0.0).toDouble());
+ ui->editParam4SpinBox->setValue(settings.value("QGC_COMMAND_BUTTON_PARAM4", 0.0).toDouble());
+ ui->editParam5SpinBox->setValue(settings.value("QGC_COMMAND_BUTTON_PARAM5", 0.0).toDouble());
+ ui->editParam6SpinBox->setValue(settings.value("QGC_COMMAND_BUTTON_PARAM6", 0.0).toDouble());
+ ui->editParam7SpinBox->setValue(settings.value("QGC_COMMAND_BUTTON_PARAM7", 0.0).toDouble());
- int commandId = settings.value("QGC_ACTION_BUTTON_ACTIONID", 0).toInt();
ui->editCommandComboBox->setCurrentIndex(0);
// Find combobox entry for this data
@@ -190,6 +213,9 @@ void QGCCommandButton::readSettings(const QSettings& settings)
ui->editParam2SpinBox->show();
ui->editParam3SpinBox->show();
ui->editParam4SpinBox->show();
+ ui->editParam5SpinBox->show();
+ ui->editParam6SpinBox->show();
+ ui->editParam7SpinBox->show();
}
else
{
@@ -197,6 +223,9 @@ void QGCCommandButton::readSettings(const QSettings& settings)
ui->editParam2SpinBox->hide();
ui->editParam3SpinBox->hide();
ui->editParam4SpinBox->hide();
+ ui->editParam5SpinBox->hide();
+ ui->editParam6SpinBox->hide();
+ ui->editParam7SpinBox->hide();
}
qDebug() << "DONE READING SETTINGS";
}
diff --git a/src/ui/designer/QGCCommandButton.ui b/src/ui/designer/QGCCommandButton.ui
index 5b7e4646c52ea10434fcbf33eaca7744e9ad4eb3..d1b6ec1e7dcc35660c30d9ccbb3a5ff6c64c039a 100644
--- a/src/ui/designer/QGCCommandButton.ui
+++ b/src/ui/designer/QGCCommandButton.ui
@@ -164,6 +164,45 @@
+ -
+
+
+ P5:
+
+
+ -2147483647.000000000000000
+
+
+ 2147483647.000000000000000
+
+
+
+ -
+
+
+ P6:
+
+
+ -2147483647.000000000000000
+
+
+ 2147483647.000000000000000
+
+
+
+ -
+
+
+ P7:
+
+
+ -2147483647.000000000000000
+
+
+ 2147483647.000000000000000
+
+
+
-
diff --git a/src/ui/uas/UASControlWidget.cc b/src/ui/uas/UASControlWidget.cc
index 5040497c4bdcb987a6e5b7834004b35ae7f307fb..5c13e52225e190ed1cb9f15ff2cf1200cb66e445 100644
--- a/src/ui/uas/UASControlWidget.cc
+++ b/src/ui/uas/UASControlWidget.cc
@@ -171,7 +171,9 @@ void UASControlWidget::transmitMode()
if (mav)
{
mav->setMode(uasMode);
- ui.lastActionLabel->setText(QString("Sent new mode cmd to %1").arg(mav->getUASName()));
+ QString mode = ui.modeComboBox->currentText();
+
+ ui.lastActionLabel->setText(QString("Sent new mode %1 to %2").arg(mode).arg(mav->getUASName()));
}
}