Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mavlink/qgroundcontrol
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzMeier committed Mar 16, 2014
2 parents 8d6e0f0 + 6fb31af commit 347af72
Show file tree
Hide file tree
Showing 133 changed files with 797 additions and 74,476 deletions.
482 changes: 303 additions & 179 deletions QGCExternalLibs.pri

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions QGCInstaller.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <[email protected]>
# (c) 2009-2014 QGroundControl Developers
# This file is part of the open groundstation project
# QGroundControl is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# QGroundControl is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with QGroundControl. If not, see <http://www.gnu.org/licenses/>.
# -------------------------------------------------

installer {
MacBuild {
QMAKE_POST_LINK += && macdeployqt $${DESTDIR}/qgroundcontrol.app -dmg
}

WindowsBuild {
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")
}
}
8 changes: 5 additions & 3 deletions QGCSetup.pri
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,11 @@ MacBuild {
}

WindowsBuild {
# Copy dependencies
BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
DESTDIR_WIN = $$replace(DESTDIR,"/","\\")

# Copy dependencies

QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY_DIR "$$(QTDIR)\\plugins" "$$DESTDIR_WIN")

COPY_FILE_DESTDIR = $$DESTDIR_WIN
Expand Down Expand Up @@ -188,9 +189,10 @@ WindowsBuild {

# Copy Visual Studio DLLs
# Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
# I'm not certain of the path for VS2008, so this only works for VS2010.
# This currently only works for VS2010.
win32-msvc2010 {
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(xcopy /D /Y "\"C:\\Program Files \(x86\)\\Microsoft Visual Studio 10.0\\VC\\redist\\x86\\Microsoft.VC100.CRT\\*.dll\"" "$$DESTDIR_WIN\\")
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY "C:\\Windows\\System32\\msvcp100.dll" "$$DESTDIR_WIN\\")
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY "C:\\Windows\\System32\\msvcr100.dll" "$$DESTDIR_WIN\\")
}
}
}
206 changes: 94 additions & 112 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,44 @@ Please make sure to delete your build folder before re-building. Independent of
build system you use (this is not related to Qt or your OS) the dependency checking and
cleaning is based on the current project revision. So if you change the project and don't remove the build folder before your next build, incremental building can leave you with stale object files.

## QGC2.0 Tech Preview
Developers: In order to build the tech preview branch you need to:
## Additional functionality
QGroundcontrol has functionality that is dependent on the operating system and libraries installed by the user. The following sections describe these features, their dependencies, and how to disable/alter them during the build process. These features can be forcibly enabled/disabled by specifying additional values for variables either at the command line when calling `qmake` or in the `user_config.pri`. When calling `qmake` additional variables can be set using the syntax `VARIABLE="SPACE_SEPARATED_VALUES"`, which can be repeated for multiple variables. For example: `qmake DEFINES="DISABLE_QUPGRADE DISABLE_SPEECH" MAVLINK_CONF="sensesoar"` disables the QUpgrade widget, speech functionality, and sets the MAVLink dialect to sensesoar. These values can be more permanently specified by setting them in the `user_config.pri` file in the root directly. Copy the `user_config.pri.dist` file and name the copy `user_config.pri`, uncommenting the lines with the variables to modify and set their values as you desire.

git clone https://github.com/mavlink/qgroundcontrol -b config qgc2
git submodule init
git submodule update
**NOTE:** Any variables specified at the command line call to `qmake` will override those set in `user_config.pri`.

This procedure:
### QUpgrade
QUpgrade is a submodule (a Git feature like a sub-repository) that contains extra functionality. It is compiled in by default if it has initialized and updated. It can be disabled by specifying `DISABLE_QUPGRADE` in the `DEFINES` variable.

* Clones the config branch (which contains QGC2) from github into your qgc2 directory
* initializes all the submodules required for QGC, such as qupdate, the firmware installer
* gets the latest code for all submodules
To include QUpgrade functionality run the following (only needs to be done once after cloning the qggroundcontrol git repository):
* `git submodule init`
* `git submodule update`

The QUpgrade module relies on `libudev` on Linux platforms, so be sure to install the development version of that package.

### Specifying MAVLink dialects
The MAVLink dialect compiled by default by QGC is for the ardupilotmega. This will happen if no other dialects are specified. Setting the `MAVLINK_CONF` variable sets the dialects, with more than one specified in a space-separated list. Note that doing this may result in compilation errors as certain dialects may conflict with each other!

### MAVLink dialect generator
An add-on is available for QGC that provides a UI for generating MAVLink dialects from within QGC. This feature has been deprecated since identical functionality now exists within the MAVLink project itself. Enable this functionality by specifying the `DEFINES` variable `ENABLE_MAVGEN`.

### Opal-RT's RT-LAB simulator
Integration with Opal-RT's RT-LAB simulator can be enabled on Windows by installing RT-LAB 7.2.4. This allows vehicles to be simulated in RT-LAB and communicate directly with QGC on the same computer as if the UAS was actually deployed. This support is enabled by default once the requisite RT-LAB software is installed. Disabling this can be done by adding `DISABLE_RTLAB` to the `DEFINES` variable.

### Speech syntehsis
QGroundcontrol can notify the controller of information via speech synthesis. This requires the `flite` library on Linux. On Mac and Windows support is built in to the OS as of OS X 10.6 (Snow Leopard) and Windows Vista. This support is enabled by default on all platforms if the dependencies are met. Disabling this functionality can be done by adding `DISABLE_SPEECH` to the `DEFINES` variable.

### 3D view
The OpenSceneGraph libraries provide 3D rendering to the map overlays that QGC can provide.

OpenSceneGraph support is built-in to Mac OS X. On Linux it is commonly available through the libopenscenegraph and libopenscenegraph-qt developer packages. Windows support does not currently exist. This functionality with be automatically built if the proper libraries are installed. Disabling this feature can be done by adding `DISABLE_OPEN_SCENE_GRAPH` to the `DEFINES` variable.

### 3D mouse support
Connexion's 3D mice are supported through the 3DxWARE driver available on Linux and Windows. Download and install the driver from 3DConnexion to enable support. This support is enabled by default with driver installation. To disable add `DISABLE_3DMOUSE` to the `DEFINES` variable.

### XBee support
QGroundControl can talk to XBee wireless devices using their proprietary protocol directly on Windows and Linux platforms. This support is not necessary if you're not using XBee devices or aren't using their proprietary protocol. On Windows, the necessary dependencies are included in this repository and no additional steps are required. For Linux, change to the `libs/thirdParty/libxbee` folder and run `make;sudo make install` to install libxbee on your system (uninstalling can be done with a `sudo make uninstall`). `qmake` will automatically detect the library on Linux, so no other work is necessary.

To disable XBee support you may add `DISABLE_XBEE` to the DEFINES argument.

# Build on Mac OSX

Expand All @@ -45,8 +70,8 @@ To build on Mac OSX (10.6 or later):

### Install QT
- - -
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: <http://qt-project.org/doc/qt-4.8/install-mac.html>
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.

### Build QGroundControl
- - -
Expand All @@ -62,120 +87,77 @@ To build on Mac OSX (10.6 or later):

To build on Linux:
- - -
sudo apt-get install phonon libqt4-dev libphonon-dev libphonon4 phonon-backend-gstreamer qtcreator libsdl1.2-dev libudev-dev libflite1 flite1-dev build-essential libopenscenegraph-dev
cd directory
git clone https://github.com/mavlink/qgroundcontrol.git
git submodule init
git submodule update

* go to `libs/thirdParty -> libxbee`
* Create Library -> Readme file in folder
* Ubuntu Application Menu -> Development -> Qt Creator
* QtCreator Menu File -> Open File or Project..
* Open `directory/qgroundcontrol/qgroundcontrol.pro`
* Hit the green play button to compile and launch it

1. Install base dependencies (QT + phonon/webkit, SDL)
* For Ubuntu: `sudo apt-get install libqt4-dev libphonon-dev libphonon4 phonon-backend-gstreamer qtcreator libsdl1.2-dev build-essential libudev-dev`
* For Fedora: `sudo yum install qt qt-creator qt-webkit-devel SDL-devel SDL-static systemd-devel`

2. **[OPTIONAL]** Install additional libraries
* For text-to-speech (flite)
* For Ubuntu: `sudo apt-get install libflite1 flite1-dev`
* For Fedora: `sudo yum install flite-devel`
* For 3D flight view (openscenegraph)
* For Ubuntu: `sudo apt-get install libopenscenegraph-dev`
* For Fedora: `sudo yum install OpenSceneGraph-qt-devel`

3. Clone the repository
1. `cd PROJECTS_DIRECTORY`
2. git clone https://github.com/mavlink/qgroundcontrol.git
3. **[OPTIONAL]** For QUpgrade integration:
1. `cd qgroundcontrol`
2. `git submodule init`
3. `git submodule update`

4. **[OPTIONAL]** Build and install XBee support:
1. ` cd libs/thirdParty/libxbee`
2. `make`
3. `sudo make install`

5. Build QGroundControl:
1. Go back to root qgroundcontrol directory
2. `qmake`
3. `make`
* To enable parallel compilation add the `-j` argument with the number of cores you have. So on a quad-core processor: `make -j4`

6. Run qgroundcontrol
1. `./release/qgroundcontrol`

# Build on Windows
- - -

__GNU GCC / MINGW IS UNTESTED, COULD WORK WITH
VISUAL STUDIO 2008 / 2010 EXPRESS EDITION (FREE!)__

Steps for Visual Studio 2008 / 2010:
Steps for Visual Studio 2010:

Windows XP/7:
1. Download and install Visual Studio 2010 Express Edition (free) from here: <http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx>. Make sure to install VS 2010 SP1 as well to fix a linking error. Download from here: <http://www.microsoft.com/en-us/download/details.aspx?id=23691>.

1. Download and install the Qt libraries for Windows from https://qt.nokia.com/downloads/ (the Visual Studio 2008 or 2010 version as appropriate)

2. Download and install Visual Studio 2008 or 2010 Express Edition (free) from https://www.microsoft.com/visualstudio. If using Visual Studio 2010, make sure you are running at least SP1. There is a linking error you'll encounter otherwise that will prevent compilation.
2. Download and install the Qt libraries for Windows (VS 2010 version) from here: <http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-win-opensource-4.8.5-vs2010.exe>

3. Go to the QGroundControl folder and then to thirdParty/libxbee and build it following the instructions in win32.README

4. Open the Qt Command Prompt program (should be in the Start Menu), navigate to the source folder of QGroundControl and create the Visual Studio project by typing `qmake -tp vc qgroundcontrol.pro`

5. Now start Visual Studio and load the qgroundcontrol.vcproj if using Visual Studio 2008 or qgroundcontrol.vcxproj if using Visual Studio 2010
5. Now start Visual Studio 2010 and load qgroundcontrol.vcxproj.

6. Compile and edit in Visual Studio. If you need to add new files, add them to qgroundcontrol.pro and re-run `qmake -tp vc qgroundcontrol.pro`

7. If you already have VS 2008 that works as well. Download the appropriate Qt from here: <http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-win-opensource-4.8.5-vs2008.exe>. And use qgroundcontrol.vcproj instead.


## Repository Layout
qgroundcontrol:
demo-log.txt
license.txt
qgcunittest.pro - For the unit tests.
qgcunittest.pro.user
qgcvideo.pro
qgroundcontrol.pri - Used by qgroundcontrol.pro
qgroundcontrol.pro - Project opened in QT to run qgc.
qgroundcontrol.pro.user
qgroundcontrol.qrc - Holds many images.
qgroundcontrol.rc - line of code to point toward the images
qserialport.pri - generated by qmake.
testlog.txt - sample log file
testlog2.txt - sample log file
user_config.pri.dist - Custom message specs to be added here.
data:
Maps from yahoo and kinect and earth.
deploy:
Install and uninstall for win32.
Create a debian packet.
Create .DMG file for publishing for mac.
Audio test on mac.
doc:
Doxyfile is in this directory and information for creating html documentation for qgc.
files:
Has the audio for the vehicle and data output.
ardupilotmega:
widgets and tool tips for pilot heading for the fixed wing.
tooltips for quadrotor
flightgear:
Aircraft:
Different types of planes and one jeep.
Protocol:
The protocol for the fixed_wings and quadrotor and quadhil.holds info about the fixed wing yaw, roll etc.
Quadrotor:
Again holds info about yaw, roll etc.
Pixhawk:
Widgets for hexarotor. Widgets and tooltips for quadrotor.
vehicles:
different vehicles. Seems to hold the different kinds of aircrafts as well as files for audio and the hexarotor and quadrotor.
widgets:
Has a lot of widgets defined for buttons and sliders.

images:
For the UI. Has a bunch of different images such as images for applications or actions or buttons.
lib:
SDL is located in this direcotry.
Msinttypes:
Defines intteger types for microsoft visual studio.
sdl:
Information about the library and to run the library on different platforms.
mavlink:
The files for the library mavlink.
qgcunittest:
Has the unittests for qgc
settings:
Parameter lists for alpha, bravo and charlie. Data for stereo, waypoints and radio calibration.
src:
Code for QGCCore, audio output, configuration, waypoints, main and log compressor.
apps
Code for mavlink generation and for a video application.
comm
Code for linking to simulation, mavlink, udp, xbee, opal, flight gear and interface.
Has other libraries. Qwt is in directory named lib. The other libraries are in libs.
lib
qwt library
libs
eigen, opmapcontrol, qestserialport, qtconcurrent, utils.
input
joystick and freenect code.
plugins
Qt project for PIXHAWK plugins.
uas
Ardu pilot, UAS, mavlink factory, uas manager, interface, waypoint manager and slugs.
ui
Has code for data plots, waypoint lists and window congfiguration. All of the ui code.
thirdParty:
Library called lxbee.
Library called QSerialPort.
The following describes the directory structure and important files in the QGroundControl repository

Folders:

* data - Miscellaneous support files.
* deploy - Contains scripts for packaging QGC for all supported systems.
* doc - Output directory for generated Doxygen documentation. See README contained within for details.
* files - Contains miscellaneous data including vehicle models and autopilot-specific data files.
* images - UI images.
* libs - Library dependencies for QGC.
* qupgrade - Source file for the qupgrade, a firmware flashing utility for the APM. Compiled into QGC by default.
* qml - QML source files for the project.
* src - Source code for QGroundControl. Split into subfolders for communications, user interface, autopilot-specific files, etc.
* tools - Additional tools for developers.

Important files:

* qgroundcontrol.pro - Primary project file for building QGC. Open this in qtcreator or pass this to qmake on the command line to build QGC.
* qgcvideo.pro - Builds a standalone executable for viewing UDP video streams from a vehicle.
15 changes: 0 additions & 15 deletions deploy/mac_create_dmg.sh

This file was deleted.

6 changes: 2 additions & 4 deletions deploy/qgroundcontrol_installer.nsi
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Name "QGroundcontrol"

OutFile "qgroundcontrol-installer-win32.exe"

InstallDir $PROGRAMFILES\qgroundcontrol

Page license
Expand All @@ -11,12 +9,12 @@ Page instfiles
UninstPage uninstConfirm
UninstPage instfiles

LicenseData ..\license.txt
LicenseData license.txt

Section ""

SetOutPath $INSTDIR
File /r ..\release\*.*
File /r release\*.*
WriteUninstaller $INSTDIR\QGroundControl_uninstall.exe
SectionEnd

Expand Down
12 changes: 9 additions & 3 deletions libs/opmapcontrol/src/mapwidget/mapripper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "mapripper.h"

#include <qtimer.h>

namespace mapcontrol
{

Expand Down Expand Up @@ -53,12 +56,15 @@ namespace mapcontrol
{
++zoom;
QMessageBox msgBox;
msgBox.setText(QString("Continue Ripping at zoom level %1?").arg(zoom));
msgBox.setText(tr("Continue Ripping at zoom level %1? (Continuing automatically after 3s)").arg(zoom));
// msgBox.setInformativeText("Do you want to save your changes?");
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::Yes);
int ret = msgBox.exec();
if(ret==QMessageBox::Yes)
QTimer::singleShot(3000, &msgBox, SLOT(accept()));
msgBox.exec();
int ret = msgBox.result();

if(ret==QMessageBox::Yes || ret == 1)
{
points.clear();
points=core->Projection()->GetAreaTileList(area,zoom,0);
Expand Down
Loading

0 comments on commit 347af72

Please sign in to comment.