Commit 94f9e534 authored by Lorenz Meier's avatar Lorenz Meier

Switched to 64 bit for Mac as default, fixed various compile warnings, now down to < 10 warnings

parent f40d2066
......@@ -42,8 +42,8 @@ macx {
# COMPILER_VERSION = $$system(gcc -v)
#message(Using compiler $$COMPILER_VERSION)
CONFIG += x86 cocoa phonon
CONFIG -= x86_64
CONFIG += x86_64 cocoa phonon
CONFIG -= x86
#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" ) {
......@@ -65,11 +65,10 @@ macx {
# debug {
#QMAKE_CXXFLAGS += -finstrument-functions
#LIBS += -lSaturn
CONFIG += console
# }
#}
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
#DESTDIR = $$BASEDIR/bin/mac
INCLUDEPATH += -framework SDL
......@@ -103,7 +102,7 @@ macx {
DEFINES += QGC_OSG_ENABLED
# Include OpenSceneGraph libraries
INCLUDEPATH += -framework GLUT \
-framework Carbon \
-framework Cocoa \
-framework OpenThreads \
-framework osg \
-framework osgViewer \
......@@ -113,7 +112,7 @@ macx {
-framework osgWidget
LIBS += -framework GLUT \
-framework Carbon \
-framework Cocoa \
-framework OpenThreads \
-framework osg \
-framework osgViewer \
......@@ -123,37 +122,13 @@ macx {
-framework osgWidget
}
exists(/usr/include/osgEarth) {
message("Building support for osgEarth")
DEPENDENCIES_PRESENT += osgearth
# Include osgEarth libraries
INCLUDEPATH += -framework GDAL \
$$IN_PWD/lib/mac32-gcc/include \
-framework GEOS \
-framework SQLite3 \
-framework osgFX \
-framework osgTerrain
LIBS += -framework GDAL \
-framework GEOS \
-framework SQLite3 \
-framework osgFX \
-framework osgTerrain
DEFINES += QGC_OSGEARTH_ENABLED
}
exists(/opt/local/include/libfreenect) {
exists(/opt/local/include/libfreenect)|exists(/usr/local/include/libfreenect) {
message("Building support for libfreenect")
DEPENDENCIES_PRESENT += libfreenect
# Include libfreenect libraries
LIBS += -lfreenect
DEFINES += QGC_LIBFREENECT_ENABLED
}
# osg/osgEarth dynamic casts might fail without this compiler option.
# see http://osgearth.org/wiki/FAQ for details.
#QMAKE_CXXFLAGS += -Wl,-E
}
# GNU/Linux
......
......@@ -303,12 +303,12 @@ void MAVLinkSimulationMAV::mainloop()
timer25Hz--;
}
static unsigned chan_counts[MAVLINK_COMM_NUM_BUFFERS];
//static unsigned chan_counts[MAVLINK_COMM_NUM_BUFFERS];
static const unsigned message_lengths[] = MAVLINK_MESSAGE_LENGTHS;
static unsigned error_count;
//static unsigned error_count;
static const mavlink_message_info_t message_info[256] = MAVLINK_MESSAGE_INFO;
mavlink_message_info_t message_info[256] = MAVLINK_MESSAGE_INFO;
static void print_one_field(const mavlink_message_t *msg, const mavlink_field_info_t *f, int idx)
{
......
......@@ -33,7 +33,18 @@
namespace mapcontrol
{
OPMapWidget::OPMapWidget(QWidget *parent, Configuration *config):QGraphicsView(parent),configuration(config),UAV(0),GPS(0),Home(0),followmouse(true),compass(0),showuav(false),showhome(false),showDiag(false),diagGraphItem(0),diagTimer(0)
OPMapWidget::OPMapWidget(QWidget *parent, Configuration *config) : QGraphicsView(parent),
configuration(config),
UAV(0),
GPS(0),
Home(0),
followmouse(true),
compass(0),
showuav(false),
showhome(false),
diagTimer(0),
showDiag(false),
diagGraphItem(0)
{
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
core=new internals::Core;
......@@ -277,6 +288,7 @@ namespace mapcontrol
}
void OPMapWidget::WPCreate(int id, WayPointItem* item)
{
Q_UNUSED(id);
static internals::PointLatLng lastPos;
ConnectWP(item);
......
......@@ -29,14 +29,14 @@ namespace mapcontrol
{
WayPointItem::WayPointItem(const internals::PointLatLng &coord,double const& altitude, MapGraphicItem *map) :
map(map),
autoreachedEnabled(true),
coord(coord),
reached(false),
description(""),
shownumber(true),
isDragging(false),
altitude(altitude),
heading(0),
autoreachedEnabled(true)
heading(0)
{
text=0;
numberI=0;
......@@ -53,13 +53,13 @@ namespace mapcontrol
RefreshPos();
}
WayPointItem::WayPointItem(const internals::PointLatLng &coord,double const& altitude, const QString &description, MapGraphicItem *map) :
map(map),
coord(coord),
reached(false),
description(description),
shownumber(true),
isDragging(false),
altitude(altitude),
map(map),
heading(0)
{
text=0;
......
......@@ -63,7 +63,7 @@ bool XmlConfig::readXmlFile(QIODevice &device, QSettings::SettingsMap &map)
.arg(errorLine)
.arg(errorColumn)
.arg(errorStr);
qFatal(err.toLatin1().data());
qFatal("%s", err.toLatin1().data());
return false;
}
root = domDoc.documentElement();
......
......@@ -45,8 +45,8 @@ UASWaypointManager::UASWaypointManager(UAS* _uas)
current_state(WP_IDLE),
current_partner_systemid(0),
current_partner_compid(0),
protocol_timer(this),
currentWaypointEditable(NULL)
currentWaypointEditable(NULL),
protocol_timer(this)
{
if (uas)
{
......@@ -112,7 +112,14 @@ void UASWaypointManager::handleLocalPositionChanged(UASInterface* mav, double x,
void UASWaypointManager::handleGlobalPositionChanged(UASInterface* mav, double lat, double lon, double alt, quint64 time)
{
Q_UNUSED(mav);
Q_UNUSED(time);
if (waypointsEditable.count() > 0 && currentWaypointEditable && (currentWaypointEditable->getFrame() == MAV_FRAME_GLOBAL || currentWaypointEditable->getFrame() == MAV_FRAME_GLOBAL_RELATIVE_ALT))
{
// TODO FIXME Calculate distance
double dist = 0;
emit waypointDistanceChanged(dist);
}
}
void UASWaypointManager::handleWaypointCount(quint8 systemId, quint8 compId, quint16 count)
......@@ -240,6 +247,7 @@ void UASWaypointManager::handleWaypointReached(quint8 systemId, quint8 compId, m
void UASWaypointManager::handleWaypointCurrent(quint8 systemId, quint8 compId, mavlink_mission_current_t *wpc)
{
Q_UNUSED(compId);
if (!uas) return;
if (systemId == uasid) {
// FIXME Petri
......
......@@ -100,11 +100,12 @@ HSIDisplay::HSIDisplay(QWidget *parent) :
mavInitialized(false),
bottomMargin(10.0f),
topMargin(12.0f),
userSetPointSet(false),
dragStarted(false),
leftDragStarted(false),
mouseHasMoved(false),
actionPending(false)
actionPending(false),
userSetPointSet(false),
userXYSetPointSet(false)
{
refreshTimer->setInterval(updateInterval);
......
......@@ -88,11 +88,11 @@ MainWindow* MainWindow::instance(QSplashScreen* screen)
MainWindow::MainWindow(QWidget *parent):
QMainWindow(parent),
currentView(VIEW_UNCONNECTED),
currentStyle(QGC_MAINWINDOW_STYLE_INDOOR),
aboutToCloseFlag(false),
changingViewsFlag(false),
styleFileName(QCoreApplication::applicationDirPath() + "/style-indoor.css"),
autoReconnect(false),
currentStyle(QGC_MAINWINDOW_STYLE_INDOOR),
centerStackActionGroup(this),
lowPowerMode(false)
{
......
......@@ -279,6 +279,7 @@ protected:
/** @brief Keeps track of the current view */
VIEW_SECTIONS currentView;
QGC_MAINWINDOW_STYLE currentStyle;
bool aboutToCloseFlag;
bool changingViewsFlag;
......@@ -371,7 +372,6 @@ protected:
QTimer* videoTimer;
QString styleFileName;
bool autoReconnect;
QGC_MAINWINDOW_STYLE currentStyle;
Qt::WindowStates windowStateVal;
bool lowPowerMode; ///< If enabled, QGC reduces the update rates of all widgets
QGCFlightGearLink* fgLink;
......
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