Browse Source

Merge branch 'master' of github.com:mavlink/qgroundcontrol into thread_test

QGC4.4
Lorenz Meier 11 years ago
parent
commit
754a3a55ee
  1. 4
      QGCInstaller.pri
  2. 34
      QGCSetup.pri
  3. 1
      README.md
  4. 1
      qgroundcontrol.pro
  5. 2
      src/uas/UAS.h
  6. 12
      src/ui/uas/UASControlWidget.cc

4
QGCInstaller.pri

@ -23,6 +23,10 @@ installer { @@ -23,6 +23,10 @@ installer {
}
WindowsBuild {
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\$${TARGET}.exp")
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\$${TARGET}.ilk")
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\$${TARGET}.lib")
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\$${TARGET}.pdb")
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" /NOCD "\"/XOutFile $${DESTDIR_WIN}\\qgroundcontrol-installer-win32.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi")
}
}

34
QGCSetup.pri

@ -23,28 +23,30 @@ QMAKE_POST_LINK += $$quote(echo "Copying files") @@ -23,28 +23,30 @@ QMAKE_POST_LINK += $$quote(echo "Copying files")
# Copy the application resources to the associated place alongside the application
#
COPY_RESOURCE_LIST = \
$$BASEDIR/files \
$$BASEDIR/qml \
$$BASEDIR/data
WindowsBuild {
DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
COPY_RESOURCE_LIST = $$replace(COPY_RESOURCE_LIST, "/","\\")
CONCATCMD = $$escape_expand(\\n)
}
LinuxBuild {
DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
CONCATCMD = &&
}
MacBuild {
DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR/$${TARGET}.app/Contents/MacOS
CONCATCMD = &&
}
for(COPY_DIR, COPY_RESOURCE_LIST):QMAKE_POST_LINK += $$CONCATCMD $$QMAKE_COPY_DIR $${COPY_DIR} $$DESTDIR_COPY_RESOURCE_LIST
# Windows version of QMAKE_COPY_DIR of course doesn't work the same as Mac/Linux. It will only
# copy the contents of the source directory. It doesn't create the top level source directory
# in the target.
WindowsBuild {
# Make sure to keep both side of this if using the same set of directories
DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
BASEDIR_COPY_RESOURCE_LIST = $$replace(BASEDIR,"/","\\")
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR $$BASEDIR_COPY_RESOURCE_LIST\\files $$DESTDIR_COPY_RESOURCE_LIST\\files
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR $$BASEDIR_COPY_RESOURCE_LIST\\qml $$DESTDIR_COPY_RESOURCE_LIST\\qml
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR $$BASEDIR_COPY_RESOURCE_LIST\\data $$DESTDIR_COPY_RESOURCE_LIST\\data
} else {
# Make sure to keep both side of this if using the same set of directories
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/files $$DESTDIR_COPY_RESOURCE_LIST
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/qml $$DESTDIR_COPY_RESOURCE_LIST
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/data $$DESTDIR_COPY_RESOURCE_LIST
}
#
# Perform platform specific setup
@ -185,8 +187,6 @@ WindowsBuild { @@ -185,8 +187,6 @@ WindowsBuild {
}
ReleaseBuild {
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\$${TARGET}.exp")
# Copy Visual Studio DLLs
# Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
# This currently only works for VS2010.

1
README.md

@ -72,6 +72,7 @@ To build on Mac OSX (10.6 or later): @@ -72,6 +72,7 @@ To build on Mac OSX (10.6 or later):
- - -
1. Download Qt 4.8+ from: <http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-mac-opensource-4.8.5.dmg>
2. Double click the package installer and follow instructions.
3. If you are building on Mavericks or later you will need to modify /Library/Frameworks/QtCore.framework/Versions/4/Headers/qglobal.h to add the new 10.9 os version number. Search for MAC_OS_X_VERSION_10_8 to find the right spot.
### Build QGroundControl
- - -

1
qgroundcontrol.pro

@ -147,6 +147,7 @@ MacBuild | LinuxBuild { @@ -147,6 +147,7 @@ MacBuild | LinuxBuild {
WindowsBuild {
QMAKE_CXXFLAGS_WARN_ON += /W3 \
/wd4996 \ # silence warnings about deprecated strcpy and whatnot
/wd4005 \ # silence warnings about macro redefinition
/wd4290 # ignore exception specifications
WarningsAsErrorsOn {
QMAKE_CXXFLAGS_WARN_ON += /WX

2
src/uas/UAS.h

@ -539,6 +539,8 @@ public: @@ -539,6 +539,8 @@ public:
bool isAuto();
/** @brief Check if vehicle is armed */
bool isArmed() const { return systemIsArmed; }
/** @brief Check if vehicle is in HIL mode */
bool isHilEnabled() const { return hilEnabled; }
/** @brief Get reference to the waypoint manager **/
UASWaypointManager* getWaypointManager() {

12
src/ui/uas/UASControlWidget.cc

@ -230,8 +230,8 @@ void UASControlWidget::setMode(int mode) @@ -230,8 +230,8 @@ void UASControlWidget::setMode(int mode)
void UASControlWidget::transmitMode()
{
UASInterface* uas = UASManager::instance()->getUASForId(this->uasID);
if (uas) {
UASInterface* uas_iface = UASManager::instance()->getUASForId(this->uasID);
if (uas_iface) {
if (modeIdx >= 0 && modeIdx < modesNum) {
struct full_mode_s mode = modesList[modeIdx];
// include armed state
@ -241,6 +241,14 @@ void UASControlWidget::transmitMode() @@ -241,6 +241,14 @@ void UASControlWidget::transmitMode()
mode.baseMode &= ~MAV_MODE_FLAG_SAFETY_ARMED;
}
UAS* uas = dynamic_cast<UAS*>(uas_iface);
if (uas->isHilEnabled()) {
mode.baseMode |= MAV_MODE_FLAG_HIL_ENABLED;
} else {
mode.baseMode &= ~MAV_MODE_FLAG_HIL_ENABLED;
}
uas->setMode(mode.baseMode, mode.customMode);
QString modeText = ui.modeComboBox->currentText();

Loading…
Cancel
Save