Commit 0b4c4b5c authored by LM's avatar LM

Reverted to 32bit for OS X to re-enable Google Earth, fixed persistence of command button

parent 14acce6c
...@@ -42,8 +42,8 @@ macx|macx-g++42|macx-g++: { ...@@ -42,8 +42,8 @@ macx|macx-g++42|macx-g++: {
# COMPILER_VERSION = $$system(gcc -v) # COMPILER_VERSION = $$system(gcc -v)
#message(Using compiler $$COMPILER_VERSION) #message(Using compiler $$COMPILER_VERSION)
CONFIG += x86_64 cocoa phonon CONFIG += x86 cocoa phonon
CONFIG -= x86 CONFIG -= x86_64
#HARDWARE_PLATFORM = $$system(uname -a) #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" ) { #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++: { ...@@ -94,7 +94,7 @@ macx|macx-g++42|macx-g++: {
QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/qgroundcontrol.app/Contents/MacOS QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
# Copy libraries # Copy libraries
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/qgroundcontrol.app/Contents/libs 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 # 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 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++: { ...@@ -164,11 +164,11 @@ macx|macx-g++42|macx-g++: {
# Include OpenSceneGraph libraries # Include OpenSceneGraph libraries
INCLUDEPATH += -framework GLUT \ INCLUDEPATH += -framework GLUT \
-framework Cocoa \ -framework Cocoa \
$$BASEDIR/lib/mac64/include $$BASEDIR/lib/mac32/include
LIBS += -framework GLUT \ LIBS += -framework GLUT \
-framework Cocoa \ -framework Cocoa \
-L$$BASEDIR/lib/mac64/lib \ -L$$BASEDIR/lib/mac32/lib \
-lOpenThreads \ -lOpenThreads \
-losg \ -losg \
-losgViewer \ -losgViewer \
......
...@@ -1394,18 +1394,23 @@ void HUD::setPixels(int imgid, const unsigned char* imageData, int length, int s ...@@ -1394,18 +1394,23 @@ void HUD::setPixels(int imgid, const unsigned char* imageData, int length, int s
Q_UNUSED(imgid); Q_UNUSED(imgid);
// qDebug() << "at" << __FILE__ << __LINE__ << ": Received startindex" << startIndex << "and length" << length << "(" << startIndex+length << "of" << rawExpectedBytes << "bytes)"; // 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 (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; qDebug() << "HUD: OVERFLOW! startIndex:" << startIndex << "length:" << length << "image raw size" << ((receivedWidth * receivedHeight * receivedChannels * receivedDepth) / 8) - 1;
} else { }
else
{
memcpy(rawImage+startIndex, imageData, length); memcpy(rawImage+startIndex, imageData, length);
rawLastIndex = startIndex+length; rawLastIndex = startIndex+length;
// Check if we just reached the end of the image // Check if we just reached the end of the image
if (startIndex+length == rawExpectedBytes) { if (startIndex+length == rawExpectedBytes)
{
//qDebug() << "HUD: END OF IMAGE REACHED!"; //qDebug() << "HUD: END OF IMAGE REACHED!";
finishImage(); finishImage();
rawLastIndex = 0; rawLastIndex = 0;
......
...@@ -99,12 +99,11 @@ WaypointList::WaypointList(QWidget *parent, UASInterface* uas) : ...@@ -99,12 +99,11 @@ WaypointList::WaypointList(QWidget *parent, UASInterface* uas) :
// SET UAS AFTER ALL SIGNALS/SLOTS ARE CONNECTED // SET UAS AFTER ALL SIGNALS/SLOTS ARE CONNECTED
if (uas) if (uas)
{ {
qDebug() << "setUAS" ;
WPM = uas->getWaypointManager(); WPM = uas->getWaypointManager();
setUAS(uas);
} }
else else
{ {
qDebug() << "setUAS failed" ;
// Hide buttons, which don't make sense without valid UAS // Hide buttons, which don't make sense without valid UAS
m_ui->positionAddButton->hide(); m_ui->positionAddButton->hide();
m_ui->transmitButton->hide(); m_ui->transmitButton->hide();
...@@ -116,8 +115,6 @@ WaypointList::WaypointList(QWidget *parent, UASInterface* uas) : ...@@ -116,8 +115,6 @@ WaypointList::WaypointList(QWidget *parent, UASInterface* uas) :
WPM = new UASWaypointManager(NULL); WPM = new UASWaypointManager(NULL);
} }
setUAS(uas);
// STATUS LABEL // STATUS LABEL
updateStatusLabel(""); updateStatusLabel("");
...@@ -154,8 +151,7 @@ void WaypointList::updateAttitude(UASInterface* uas, double roll, double pitch, ...@@ -154,8 +151,7 @@ void WaypointList::updateAttitude(UASInterface* uas, double roll, double pitch,
void WaypointList::setUAS(UASInterface* uas) void WaypointList::setUAS(UASInterface* uas)
{ {
//if (this->uas == NULL && uas != NULL) if (this->uas == NULL && uas != NULL)
if (this->uas == NULL)
{ {
this->uas = uas; this->uas = uas;
......
...@@ -118,6 +118,9 @@ void QGCCommandButton::startEditMode() ...@@ -118,6 +118,9 @@ void QGCCommandButton::startEditMode()
ui->editParam2SpinBox->show(); ui->editParam2SpinBox->show();
ui->editParam3SpinBox->show(); ui->editParam3SpinBox->show();
ui->editParam4SpinBox->show(); ui->editParam4SpinBox->show();
ui->editParam5SpinBox->show();
ui->editParam6SpinBox->show();
ui->editParam7SpinBox->show();
ui->editLine1->show(); ui->editLine1->show();
ui->editLine2->show(); ui->editLine2->show();
//setStyleSheet("QGroupBox { border: 1px solid #66666B; border-radius: 3px; padding: 10px 0px 0px 0px; background: #111122; }"); //setStyleSheet("QGroupBox { border: 1px solid #66666B; border-radius: 3px; padding: 10px 0px 0px 0px; background: #111122; }");
...@@ -135,11 +138,15 @@ void QGCCommandButton::endEditMode() ...@@ -135,11 +138,15 @@ void QGCCommandButton::endEditMode()
ui->editParamsVisibleCheckBox->hide(); ui->editParamsVisibleCheckBox->hide();
ui->editLine1->hide(); ui->editLine1->hide();
ui->editLine2->hide(); ui->editLine2->hide();
if (!ui->editParamsVisibleCheckBox->isChecked()) { if (!ui->editParamsVisibleCheckBox->isChecked())
{
ui->editParam1SpinBox->hide(); ui->editParam1SpinBox->hide();
ui->editParam2SpinBox->hide(); ui->editParam2SpinBox->hide();
ui->editParam3SpinBox->hide(); ui->editParam3SpinBox->hide();
ui->editParam4SpinBox->hide(); ui->editParam4SpinBox->hide();
ui->editParam5SpinBox->hide();
ui->editParam6SpinBox->hide();
ui->editParam7SpinBox->hide();
} }
ui->commandButton->show(); ui->commandButton->show();
...@@ -155,23 +162,39 @@ void QGCCommandButton::writeSettings(QSettings& settings) ...@@ -155,23 +162,39 @@ void QGCCommandButton::writeSettings(QSettings& settings)
{ {
qDebug() << "COMMAND BUTTON WRITING SETTINGS"; qDebug() << "COMMAND BUTTON WRITING SETTINGS";
settings.setValue("TYPE", "COMMANDBUTTON"); settings.setValue("TYPE", "COMMANDBUTTON");
settings.setValue("QGC_ACTION_BUTTON_DESCRIPTION", ui->nameLabel->text()); settings.setValue("QGC_COMMAND_BUTTON_DESCRIPTION", ui->nameLabel->text());
settings.setValue("QGC_ACTION_BUTTON_BUTTONTEXT", ui->commandButton->text()); settings.setValue("QGC_COMMAND_BUTTON_BUTTONTEXT", ui->commandButton->text());
settings.setValue("QGC_ACTION_BUTTON_ACTIONID", ui->editCommandComboBox->itemData(ui->editCommandComboBox->currentIndex()).toInt()); 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_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(); settings.sync();
} }
void QGCCommandButton::readSettings(const QSettings& settings) void QGCCommandButton::readSettings(const QSettings& settings)
{ {
ui->editNameLabel->setText(settings.value("QGC_ACTION_BUTTON_DESCRIPTION", "ERROR LOADING BUTTON").toString()); ui->editNameLabel->setText(settings.value("QGC_COMMAND_BUTTON_DESCRIPTION", "ERROR LOADING BUTTON").toString());
ui->editButtonName->setText(settings.value("QGC_ACTION_BUTTON_BUTTONTEXT", "UNKNOWN").toString()); ui->editButtonName->setText(settings.value("QGC_COMMAND_BUTTON_BUTTONTEXT", "UNKNOWN").toString());
ui->editCommandComboBox->setCurrentIndex(settings.value("QGC_ACTION_BUTTON_ACTIONID", 0).toInt()); 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->editParam1SpinBox->setValue(settings.value("QGC_COMMAND_BUTTON_PARAM1", 0.0).toDouble());
ui->commandButton->setText(settings.value("QGC_ACTION_BUTTON_BUTTONTEXT", "UNKNOWN").toString()); 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); ui->editCommandComboBox->setCurrentIndex(0);
// Find combobox entry for this data // Find combobox entry for this data
...@@ -190,6 +213,9 @@ void QGCCommandButton::readSettings(const QSettings& settings) ...@@ -190,6 +213,9 @@ void QGCCommandButton::readSettings(const QSettings& settings)
ui->editParam2SpinBox->show(); ui->editParam2SpinBox->show();
ui->editParam3SpinBox->show(); ui->editParam3SpinBox->show();
ui->editParam4SpinBox->show(); ui->editParam4SpinBox->show();
ui->editParam5SpinBox->show();
ui->editParam6SpinBox->show();
ui->editParam7SpinBox->show();
} }
else else
{ {
...@@ -197,6 +223,9 @@ void QGCCommandButton::readSettings(const QSettings& settings) ...@@ -197,6 +223,9 @@ void QGCCommandButton::readSettings(const QSettings& settings)
ui->editParam2SpinBox->hide(); ui->editParam2SpinBox->hide();
ui->editParam3SpinBox->hide(); ui->editParam3SpinBox->hide();
ui->editParam4SpinBox->hide(); ui->editParam4SpinBox->hide();
ui->editParam5SpinBox->hide();
ui->editParam6SpinBox->hide();
ui->editParam7SpinBox->hide();
} }
qDebug() << "DONE READING SETTINGS"; qDebug() << "DONE READING SETTINGS";
} }
...@@ -164,6 +164,45 @@ ...@@ -164,6 +164,45 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QDoubleSpinBox" name="editParam5SpinBox">
<property name="prefix">
<string>P5: </string>
</property>
<property name="minimum">
<double>-2147483647.000000000000000</double>
</property>
<property name="maximum">
<double>2147483647.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="editParam6SpinBox">
<property name="prefix">
<string>P6: </string>
</property>
<property name="minimum">
<double>-2147483647.000000000000000</double>
</property>
<property name="maximum">
<double>2147483647.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="editParam7SpinBox">
<property name="prefix">
<string>P7: </string>
</property>
<property name="minimum">
<double>-2147483647.000000000000000</double>
</property>
<property name="maximum">
<double>2147483647.000000000000000</double>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="4" column="0" colspan="3"> <item row="4" column="0" colspan="3">
......
...@@ -171,7 +171,9 @@ void UASControlWidget::transmitMode() ...@@ -171,7 +171,9 @@ void UASControlWidget::transmitMode()
if (mav) if (mav)
{ {
mav->setMode(uasMode); 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()));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment