mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
Merge branch 'next' into m-thread/LP-16_Vehicle_Templates_Enhancements
This commit is contained in:
commit
ba8b01cc6b
2
Makefile
2
Makefile
@ -23,7 +23,7 @@
|
||||
# Lower level makefiles assume that these variables are defined. To ensure
|
||||
# that a special magic variable is exported here. It must be checked for
|
||||
# existance by each sub-make.
|
||||
export OPENPILOT_IS_COOL := Fuck Yeah!
|
||||
export TOP_LEVEL_MAKEFILE := TRUE
|
||||
|
||||
# It is possible to set OPENPILOT_DL_DIR and/or OPENPILOT_TOOLS_DIR environment
|
||||
# variables to override local tools download and installation directorys. So the
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#####
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#####
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#####
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#####
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -233,3 +233,13 @@ win32 {
|
||||
# The ((packet)) pragma is used in uav metadata struct and other places
|
||||
QMAKE_CXXFLAGS += -mno-ms-bitfields
|
||||
}
|
||||
|
||||
# Stricter warnigs turned on for OS X.
|
||||
macx {
|
||||
CONFIG += warn_on
|
||||
!warn_off {
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Werror
|
||||
QMAKE_CFLAGS_WARN_ON += -Werror
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-gnu-static-float-init
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ win32 {
|
||||
INSTALLS += target
|
||||
} else:macx {
|
||||
LIBS += -framework CoreFoundation
|
||||
ICON = openpilotgcs.icns
|
||||
ICON = librepilotgcs.icns
|
||||
QMAKE_INFO_PLIST = Info.plist
|
||||
FILETYPES.files = profile.icns prifile.icns
|
||||
FILETYPES.path = Contents/Resources
|
||||
|
@ -38,7 +38,7 @@ GCSSplashScreen::GCSSplashScreen() :
|
||||
m_pixmap = new QPixmap(":/app/splash.png");
|
||||
|
||||
m_painter = new QPainter(m_pixmap);
|
||||
m_painter->setPen(Qt::lightGray);
|
||||
m_painter->setPen(Qt::darkGray);
|
||||
QFont font("Tahoma", 8);
|
||||
m_painter->setFont(font);
|
||||
|
||||
@ -46,10 +46,10 @@ GCSSplashScreen::GCSSplashScreen() :
|
||||
QString(" ") + VersionInfo::year() +
|
||||
QString(tr(" The LibrePilot Project - All Rights Reserved")));
|
||||
|
||||
m_painter->drawText(405, 180, QString(CopyrightSymbol) +
|
||||
m_painter->drawText(405, 182, QString(CopyrightSymbol) +
|
||||
QString(tr(" 2010-2015 The OpenPilot Project - All Rights Reserved")));
|
||||
|
||||
m_painter->drawText(406, 183, 310, 100, Qt::TextWordWrap | Qt::AlignTop | Qt::AlignLeft,
|
||||
m_painter->drawText(406, 186, 310, 100, Qt::TextWordWrap | Qt::AlignTop | Qt::AlignLeft,
|
||||
QString(tr("GCS Revision - ")) + VersionInfo::revision());
|
||||
setPixmap(*m_pixmap);
|
||||
}
|
||||
@ -65,7 +65,7 @@ void GCSSplashScreen::drawMessageText(const QString &message)
|
||||
progressPainter.setPen(Qt::yellow);
|
||||
QFont font("Tahoma", 13);
|
||||
progressPainter.setFont(font);
|
||||
progressPainter.drawText(300, 385, message);
|
||||
progressPainter.drawText(300, 380, message);
|
||||
setPixmap(pix);
|
||||
}
|
||||
|
||||
|
BIN
ground/openpilotgcs/src/app/librepilotgcs.icns
Normal file
BIN
ground/openpilotgcs/src/app/librepilotgcs.icns
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 26 KiB |
@ -2,7 +2,8 @@
|
||||
******************************************************************************
|
||||
*
|
||||
* @file main.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @author The LibrePilot Team http://www.librepilot.org Copyright (C) 2015.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
|
||||
* @brief
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
@ -27,6 +28,9 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
The GCS application name is defined in the top level makefile - GCS_BIG_NAME / GCS_SMALL_NAME, and
|
||||
set for the build in ../../openpilotgcs.pri and ./app.pro
|
||||
|
||||
The GCS locale is set to the system locale by default unless the "hidden" setting General/Locale has a value.
|
||||
The user can not change General/Locale from the Options dialog.
|
||||
|
||||
@ -42,10 +46,10 @@
|
||||
You can combine it with the -config-file=<file> command line argument to quickly switch between multiple settings files.
|
||||
|
||||
[code]
|
||||
openpilotgcs -reset -config-file ./MyOpenPilotGCS.xml
|
||||
gcs -reset -config-file ./MyGCS.xml
|
||||
[/code]
|
||||
|
||||
Relative paths are relative to <install dir>/share/openpilotgcs/configurations/
|
||||
Relative paths are relative to <install dir>/share/$(GCS_SMALL_NAME)/configurations/
|
||||
|
||||
The specified file will be used to load the factory defaults from but only when the user settings are empty.
|
||||
If the user settings are not empty the file will not be used.
|
||||
@ -55,7 +59,7 @@
|
||||
Quickly switch configurations
|
||||
|
||||
[code]
|
||||
openpilotgcs -reset -config-file <relative or absolute path>
|
||||
gcs -reset -config-file <relative or absolute path>
|
||||
[/code]
|
||||
|
||||
Configuring GCS from installer
|
||||
@ -65,14 +69,14 @@
|
||||
If the user chooses to start GCS at the end of the installer:
|
||||
|
||||
[code]
|
||||
openpilotgcs -D General/OverrideLanguage=de
|
||||
gcs -D General/OverrideLanguage=de
|
||||
[/code]
|
||||
|
||||
If the user chooses not to start GCS at the end of the installer, you still need to configure GCS.
|
||||
In that case you can use -exit-after-config
|
||||
|
||||
[code]
|
||||
openpilotgcs -D General/OverrideLanguage=de -exit-after-config
|
||||
gcs -D General/OverrideLanguage=de -exit-after-config
|
||||
[/code]
|
||||
|
||||
*/
|
||||
@ -301,6 +305,7 @@ inline QStringList getPluginPaths()
|
||||
QStringList rc;
|
||||
|
||||
QString pluginPath = QApplication::applicationDirPath();
|
||||
|
||||
pluginPath += QLatin1Char('/');
|
||||
pluginPath += QLatin1String(PLUGIN_REL_PATH);
|
||||
rc.push_back(pluginPath);
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "port.h"
|
||||
#include "delay.h"
|
||||
#include <QDebug>
|
||||
port::port(QString name, bool debug) : mstatus(port::closed), debug(debug)
|
||||
port::port(QString name, bool debug) : debug(debug), mstatus(port::closed)
|
||||
{
|
||||
timer.start();
|
||||
sport = new QSerialPort();
|
||||
|
@ -191,9 +191,9 @@ int main(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
} else if (!description.isEmpty()) {
|
||||
retstatus = dfu.UploadDescription(description);
|
||||
if (retstatus != OP_DFU::Last_operation_Success) {
|
||||
standardOutput << "Upload failed with code:" << retstatus << endl;
|
||||
OP_DFU::Status status = dfu.UploadDescription(description);
|
||||
if (status != OP_DFU::Last_operation_Success) {
|
||||
standardOutput << "Upload failed with code:" << status << endl;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -206,10 +206,9 @@ int main(int argc, char *argv[])
|
||||
standardOutput << "ERROR device not readable\n" << endl;
|
||||
return false;
|
||||
}
|
||||
qint32 size = ((OP_DFU::device)dfu.devices[device]).SizeOfCode;
|
||||
QByteArray fw;
|
||||
dfu.DownloadFirmware(&fw, 0);
|
||||
bool ret = dfu.SaveByteArrayToFile(file.toLatin1(), fw);
|
||||
bool ret = dfu.SaveByteArrayToFile(file.toLatin1(), fw);
|
||||
return ret;
|
||||
} else if (action == OP_DFU::actionCompareCrc) {
|
||||
dfu.CompareFirmware(file.toLatin1(), OP_DFU::crccompare, device);
|
||||
|
@ -346,7 +346,7 @@ OP_DFU::Status DFUObject::UploadDescription(QVariant desc)
|
||||
cout << "Starting uploading description\n";
|
||||
QByteArray array;
|
||||
|
||||
if (desc.type() == QMetaType::QString) {
|
||||
if (desc.type() == QVariant::String) {
|
||||
QString description = desc.toString();
|
||||
if (description.length() % 4 != 0) {
|
||||
int pad = description.length() / 4;
|
||||
@ -357,7 +357,7 @@ OP_DFU::Status DFUObject::UploadDescription(QVariant desc)
|
||||
description.append(padding);
|
||||
}
|
||||
array = description.toLatin1();
|
||||
} else if (desc.type() == QMetaType::QByteArray) {
|
||||
} else if (desc.type() == QVariant::ByteArray) {
|
||||
array = desc.toByteArray();
|
||||
}
|
||||
|
||||
@ -1110,6 +1110,10 @@ int DFUObject::receiveData(void *data, int size)
|
||||
if (time.elapsed() > 10000) {
|
||||
qDebug() << "____timeout";
|
||||
}
|
||||
if (x > size - 1) {
|
||||
qDebug() << "Error buffer overrun";
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
@ -8,3 +8,10 @@ UI_DIR = uics
|
||||
MOC_DIR = mocs
|
||||
OBJECTS_DIR = objs
|
||||
INCLUDEPATH +=../../../../libs/
|
||||
|
||||
# Stricter warnings turned on for OS X.
|
||||
macx {
|
||||
CONFIG += warn_on
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Werror
|
||||
QMAKE_CFLAGS_WARN_ON += -Werror
|
||||
}
|
||||
|
@ -486,6 +486,8 @@ QString UrlFactory::MakeReverseGeocoderUrl(internals::PointLatLng &pt, const QSt
|
||||
{
|
||||
#ifdef DEBUG_URLFACTORY
|
||||
qDebug() << "Language: " << language;
|
||||
#else
|
||||
Q_UNUSED(language);
|
||||
#endif
|
||||
// CSV output has been depreciated. API key is no longer needed.
|
||||
return QString("http://maps.googleapis.com/maps/api/geocode/xml?latlng=%1,%2").arg(QString::number(pt.Lat())).arg(QString::number(pt.Lng()));
|
||||
|
@ -17,9 +17,6 @@ include( qwtconfig.pri )
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
# disable all warnings (no need for warnings as qwt sources are imported)
|
||||
CONFIG += warn_off
|
||||
|
||||
SUBDIRS = \
|
||||
src \
|
||||
# textengines \
|
||||
|
@ -35,6 +35,9 @@ DEFINES += QWT_LIBRARY
|
||||
#
|
||||
include(../../../openpilotgcslibrary.pri)
|
||||
|
||||
# disable all warnings (no need for warnings as qwt sources are imported)
|
||||
CONFIG += warn_off
|
||||
|
||||
contains(QWT_CONFIG, QwtDll) {
|
||||
|
||||
CONFIG += dll
|
||||
|
@ -41,6 +41,7 @@ namespace Utils {
|
||||
QString GetDataPath()
|
||||
{
|
||||
QString dataPath = QApplication::applicationDirPath();
|
||||
|
||||
dataPath += QLatin1Char('/');
|
||||
dataPath += QLatin1String(DATA_REL_PATH);
|
||||
dataPath += QLatin1Char('/');
|
||||
|
@ -787,7 +787,7 @@ QString ConfigMultiRotorWidget::updateConfigObjectsFromWidgets()
|
||||
|
||||
// Tricopter : Yaw mix slider value applies to servo (was fixed)
|
||||
// Get absolute MixerValueYaw, no servo reverse when Reverse All Motors is checked
|
||||
setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_YAW, abs(getMixerValue(mixer, "MixerValueYaw")) * 1.27);
|
||||
setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_YAW, abs(int(getMixerValue(mixer, "MixerValueYaw"))) * 1.27);
|
||||
}
|
||||
|
||||
m_aircraft->mrStatusLabel->setText(tr("Configuration OK"));
|
||||
|
@ -129,7 +129,7 @@ const char *const GO_FORWARD = "GCS.GoForward";
|
||||
const char *const GOTOPREVIOUSGROUP = "GCS.GotoPreviousTabGroup";
|
||||
const char *const GOTONEXTGROUP = "GCS.GotoNextTabGroup";
|
||||
const char *const WINDOWSLIST = "GCS.WindowsList";
|
||||
const char *const ABOUT_LIBREPILOTGCS = "GCS.AboutLibrePilotGCS";
|
||||
const char *const ABOUT_LIBREPILOTGCS = "GCS.AboutLibrePilotGCS";
|
||||
const char *const ABOUT_PLUGINS = "GCS.AboutPlugins";
|
||||
const char *const ABOUT_AUTHORS = "GCS.AboutAuthors";
|
||||
const char *const ABOUT_QT = "GCS.AboutQt";
|
||||
@ -212,7 +212,7 @@ const char *const ICON_PLUGIN = ":/core/images/pluginicon.png";
|
||||
const char *const ICON_EXIT = ":/core/images/exiticon.png";
|
||||
const char *const ICON_OPTIONS = ":/core/images/optionsicon.png";
|
||||
const char *const ICON_HELP = ":/core/images/helpicon.png";
|
||||
const char *const ICON_LIBREPILOT = ":/core/images/librepiloticon.png";
|
||||
const char *const ICON_LIBREPILOT = ":/core/images/librepiloticon.png";
|
||||
|
||||
|
||||
// wizard kind
|
||||
|
@ -279,7 +279,7 @@ bool GeneralSettings::useExpertMode() const
|
||||
return m_useExpertMode;
|
||||
}
|
||||
|
||||
bool GeneralSettings::setCollectUsageData(bool collect)
|
||||
void GeneralSettings::setCollectUsageData(bool collect)
|
||||
{
|
||||
if (collect && collect != m_collectUsageData) {
|
||||
setShowUsageDataDisclaimer(true);
|
||||
@ -287,7 +287,7 @@ bool GeneralSettings::setCollectUsageData(bool collect)
|
||||
m_collectUsageData = collect;
|
||||
}
|
||||
|
||||
bool GeneralSettings::setShowUsageDataDisclaimer(bool show)
|
||||
void GeneralSettings::setShowUsageDataDisclaimer(bool show)
|
||||
{
|
||||
m_showUsageDataDisclaimer = show;
|
||||
}
|
||||
|
@ -63,8 +63,8 @@ public:
|
||||
void readSettings(QSettings *qs);
|
||||
void saveSettings(QSettings *qs);
|
||||
bool useExpertMode() const;
|
||||
bool setCollectUsageData(bool collect);
|
||||
bool setShowUsageDataDisclaimer(bool show);
|
||||
void setCollectUsageData(bool collect);
|
||||
void setShowUsageDataDisclaimer(bool show);
|
||||
void setLastUsageHash(QString hash);
|
||||
|
||||
private slots:
|
||||
|
@ -289,6 +289,7 @@ QString MainWindow::loadStyleSheet(QString fileName)
|
||||
QString style;
|
||||
// ...to open the file
|
||||
QFile file(Utils::GetDataPath() + QString("stylesheets/") + fileName);
|
||||
|
||||
qDebug() << "Loading style sheet file" << file.fileName();
|
||||
if (file.open(QFile::ReadOnly)) {
|
||||
// QTextStream...
|
||||
|
@ -71,11 +71,6 @@ using namespace Utils;
|
||||
|
||||
enum { debugUAVGadgetManager = 0 };
|
||||
|
||||
static inline ExtensionSystem::PluginManager *pluginManager()
|
||||
{
|
||||
return ExtensionSystem::PluginManager::instance();
|
||||
}
|
||||
|
||||
// ===================UAVGadgetManager=====================
|
||||
|
||||
UAVGadgetManager::UAVGadgetManager(ICore *core, QString name, QIcon icon, int priority, QString uniqueName, QWidget *parent) :
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "dialgadgetwidget.h"
|
||||
#include <utils/stylehelper.h>
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <QtOpenGL/QGLWidget>
|
||||
#include <QDebug>
|
||||
|
||||
@ -558,7 +559,7 @@ void DialGadgetWidget::rotateNeedles()
|
||||
int dialRun = 3;
|
||||
if (n2enabled) {
|
||||
double needle2Diff;
|
||||
if (abs((needle2Value - needle2Target) * 10) > 5 && beSmooth) {
|
||||
if (beSmooth && fabs(needle2Value - needle2Target) > 0.5) {
|
||||
needle2Diff = (needle2Target - needle2Value) / 5;
|
||||
} else {
|
||||
needle2Diff = needle2Target - needle2Value;
|
||||
@ -590,7 +591,7 @@ void DialGadgetWidget::rotateNeedles()
|
||||
|
||||
// We assume that needle1 always exists!
|
||||
double needle1Diff;
|
||||
if ((abs((needle1Value - needle1Target) * 10) > 5) && beSmooth) {
|
||||
if (beSmooth && fabs(needle1Value - needle1Target) > 0.5) {
|
||||
needle1Diff = (needle1Target - needle1Value) / 5;
|
||||
} else {
|
||||
needle1Diff = needle1Target - needle1Value;
|
||||
@ -614,7 +615,7 @@ void DialGadgetWidget::rotateNeedles()
|
||||
|
||||
if (n3enabled) {
|
||||
double needle3Diff;
|
||||
if ((abs((needle3Value - needle3Target) * 10) > 5) && beSmooth) {
|
||||
if (beSmooth && fabs(needle3Value - needle3Target) > 0.5) {
|
||||
needle3Diff = (needle3Target - needle3Value) / 5;
|
||||
} else {
|
||||
needle3Diff = needle3Target - needle3Value;
|
||||
|
@ -426,7 +426,7 @@ void LineardialGadgetWidget::moveIndex()
|
||||
dialTimer.stop();
|
||||
return;
|
||||
}
|
||||
if ((abs((indexValue - indexTarget) * 10) > 3)) {
|
||||
if ((abs(int((indexValue - indexTarget) * 10)) > 3)) {
|
||||
indexValue += (indexTarget - indexValue) / 5;
|
||||
} else {
|
||||
indexValue = indexTarget;
|
||||
|
@ -252,7 +252,7 @@ static int get_string_property(IOHIDDeviceRef device, CFStringRef prop, wchar_t
|
||||
len * sizeof(wchar_t),
|
||||
&used_buf_len);
|
||||
|
||||
if (chars_copied == len)
|
||||
if ((size_t)chars_copied == len)
|
||||
buf[len] = 0; /* len is decremented above */
|
||||
else
|
||||
buf[chars_copied] = 0;
|
||||
@ -292,7 +292,7 @@ static int get_string_property_utf8(IOHIDDeviceRef device, CFStringRef prop, cha
|
||||
len,
|
||||
&used_buf_len);
|
||||
|
||||
if (used_buf_len == len)
|
||||
if ((size_t)used_buf_len == len)
|
||||
buf[len] = 0; /* len is decremented above */
|
||||
else
|
||||
buf[used_buf_len] = 0;
|
||||
|
@ -46,6 +46,10 @@ macx {
|
||||
hidapi/mac/hid.c
|
||||
|
||||
LIBS += -framework CoreFoundation -framework IOKit
|
||||
|
||||
# hid.c has too many warnings about unused paramters.
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
|
||||
QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter
|
||||
}
|
||||
|
||||
linux {
|
||||
|
@ -156,6 +156,9 @@ void opmap_edit_waypoint_dialog::setupModeWidgets()
|
||||
ui->dsb_modeParam3->setVisible(false);
|
||||
ui->dsb_modeParam4->setVisible(false);
|
||||
break;
|
||||
case MapDataDelegate::MODE_AUTOTAKEOFF:
|
||||
// FIXME: Do nothing?
|
||||
break;
|
||||
}
|
||||
}
|
||||
void opmap_edit_waypoint_dialog::setupConditionWidgets()
|
||||
|
@ -45,7 +45,7 @@ void OPMapGadget::saveDefaultLocation(double lng, double lat, double zoom)
|
||||
m_config->setLatitude(lat);
|
||||
m_config->setLongitude(lng);
|
||||
m_config->setZoom(zoom);
|
||||
m_config->saveConfig();
|
||||
m_config->save();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,23 +105,13 @@ IUAVGadgetConfiguration *OPMapGadgetConfiguration::clone()
|
||||
|
||||
return m;
|
||||
}
|
||||
void OPMapGadgetConfiguration::saveConfig() const
|
||||
void OPMapGadgetConfiguration::save() const
|
||||
{
|
||||
if (!m_settings) {
|
||||
return;
|
||||
}
|
||||
m_settings->setValue("mapProvider", m_mapProvider);
|
||||
m_settings->setValue("defaultZoom", m_defaultZoom);
|
||||
m_settings->setValue("defaultLatitude", m_defaultLatitude);
|
||||
m_settings->setValue("defaultLongitude", m_defaultLongitude);
|
||||
m_settings->setValue("useOpenGL", m_useOpenGL);
|
||||
m_settings->setValue("showTileGridLines", m_showTileGridLines);
|
||||
m_settings->setValue("accessMode", m_accessMode);
|
||||
m_settings->setValue("useMemoryCache", m_useMemoryCache);
|
||||
m_settings->setValue("uavSymbol", m_uavSymbol);
|
||||
m_settings->setValue("cacheLocation", Utils::RemoveStoragePath(m_cacheLocation));
|
||||
m_settings->setValue("maxUpdateRate", m_maxUpdateRate);
|
||||
m_settings->setValue("overlayOpacity", m_opacity);
|
||||
|
||||
saveConfig(m_settings);
|
||||
}
|
||||
void OPMapGadgetConfiguration::saveConfig(QSettings *qSettings) const
|
||||
{
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
{
|
||||
return m_opacity;
|
||||
}
|
||||
void saveConfig() const;
|
||||
void save() const;
|
||||
public slots:
|
||||
void setMapProvider(QString provider)
|
||||
{
|
||||
|
@ -390,7 +390,8 @@ void ScopeGadgetWidget::addCurvePlot(QString objectName, QString fieldPlusSubFie
|
||||
plotData = new SequentialPlotData(object, field, element, scaleFactor,
|
||||
meanSamples, mathFunction, m_plotDataSize,
|
||||
pen, antialiased);
|
||||
} else if (m_plotType == ChronoPlot) {
|
||||
} else {
|
||||
Q_ASSERT(m_plotType == ChronoPlot);
|
||||
plotData = new ChronoPlotData(object, field, element, scaleFactor,
|
||||
meanSamples, mathFunction, m_plotDataSize,
|
||||
pen, antialiased);
|
||||
|
@ -100,6 +100,7 @@ bool VehicleConfigurationHelper::setupHardwareSettings(bool save)
|
||||
|
||||
bool VehicleConfigurationHelper::isApplicable(UAVObject *dataObj)
|
||||
{
|
||||
Q_UNUSED(dataObj);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
const char *VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME = "fixedwing";
|
||||
const char *VehicleTemplateExportDialog::EXPORT_MULTI_NAME = "multirotor";
|
||||
const char *VehicleTemplateExportDialog::EXPORT_HELI_NAME = "helicopter";
|
||||
const char *VehicleTemplateExportDialog::EXPORT_HELI_NAME = "helicopter";
|
||||
const char *VehicleTemplateExportDialog::EXPORT_SURFACE_NAME = "surface";
|
||||
const char *VehicleTemplateExportDialog::EXPORT_CUSTOM_NAME = "custom";
|
||||
|
||||
|
@ -164,16 +164,16 @@ void UsageTrackerPlugin::collectUsageParameters(QMap<QString, QString> ¶mete
|
||||
parameters["board_type"] = "0x" + QString::number(boardModel, 16).toLower();
|
||||
parameters["board_serial"] = utilMngr->getBoardCPUSerial().toHex();
|
||||
parameters["bl_version"] = QString::number(utilMngr->getBootloaderRevision());
|
||||
parameters["fw_tag"] = devDesc.gitTag;
|
||||
parameters["fw_hash"] = devDesc.gitHash;
|
||||
parameters["fw_tag"] = devDesc.gitTag;
|
||||
parameters["fw_hash"] = devDesc.gitHash;
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
|
||||
parameters["os_version"] = QSysInfo::prettyProductName() + " " + QSysInfo::currentCpuArchitecture();
|
||||
parameters["os_version"] = QSysInfo::prettyProductName() + " " + QSysInfo::currentCpuArchitecture();
|
||||
#else
|
||||
parameters["os_version"] = "none";
|
||||
parameters["os_version"] = "none";
|
||||
#endif
|
||||
parameters["os_threads"] = QString::number(QThread::idealThreadCount());
|
||||
parameters["os_timezone"] = QTimeZone::systemTimeZoneId();
|
||||
parameters["gcs_version"] = VersionInfo::revision();
|
||||
parameters["os_threads"] = QString::number(QThread::idealThreadCount());
|
||||
parameters["os_timezone"] = QTimeZone::systemTimeZoneId();
|
||||
parameters["gcs_version"] = VersionInfo::revision();
|
||||
|
||||
// Configuration parameters
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error $(notdir $(lastword $(MAKEFILE_LIST))) should be included by the top level Makefile)
|
||||
endif
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# MacOSX-specific packaging script
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Linux-specific packaging script
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
@ -102,8 +102,9 @@ install:
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/bin/$(GCS_SMALL_NAME) $(DESTDIR)$(bindir)
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/lib/$(GCS_SMALL_NAME) $(DESTDIR)$(libdir)
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/share/$(GCS_SMALL_NAME) $(DESTDIR)$(datadir)
|
||||
$(V1) $(INSTALL) -T $(ROOT_DIR)/package/linux/openpilot.desktop $(DESTDIR)$(datadir)/applications/$(ORG_SMALL_NAME).desktop
|
||||
$(V1) sed -i -e 's/openpilotgcs/$(GCS_SMALL_NAME)/g;s/OpenPilot GCS/$(GCS_BIG_NAME)/g' $(DESTDIR)$(datadir)/applications/$(ORG_SMALL_NAME).desktop
|
||||
$(V1) $(INSTALL) -T $(ROOT_DIR)/package/linux/gcs.desktop $(DESTDIR)$(datadir)/applications/$(ORG_SMALL_NAME).desktop
|
||||
$(V1) sed -i -e 's/gcs/$(GCS_SMALL_NAME)/g;s/GCS/$(GCS_BIG_NAME)/g;s/org/$(ORG_SMALL_NAME)/g;s/ORG/$(ORG_BIG_NAME)/g' $(DESTDIR)$(datadir)/applications/$(ORG_SMALL_NAME).desktop
|
||||
|
||||
$(V1) $(INSTALL) -T $(ROOT_DIR)/package/linux/openpilot.png $(DESTDIR)$(datadir)/pixmaps/$(ORG_SMALL_NAME).png
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Windows-specific packaging script
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
|
11
package/linux/gcs.desktop
Normal file
11
package/linux/gcs.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Version=0.1.0
|
||||
Encoding=UTF-8
|
||||
Name=GCS
|
||||
Exec=gcs
|
||||
TryExec=gcs
|
||||
Comment=Configure, Tune, Diagnose, Track, & Upgrade FW for ORG solutions
|
||||
Terminal=false
|
||||
Categories=Utility;Robotics;Engineering;
|
||||
Icon=org
|
||||
Type=Application
|
@ -1,11 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Version=0.1.0
|
||||
Encoding=UTF-8
|
||||
Name=OpenPilot GCS
|
||||
Exec=openpilotgcs
|
||||
TryExec=openpilotgcs
|
||||
Comment=Configure, Tune, Diagnose, Track, & Upgrade FW for OpenPilot solutions
|
||||
Terminal=false
|
||||
Categories=Utility;Robotics;Engineering;
|
||||
Icon=openpilot
|
||||
Type=Application
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 50 KiB |
@ -39,7 +39,7 @@ cp "${ROOT_DIR}/GPLv3.txt" "${SRC_DIR}/Docs/"
|
||||
--background "${ROOT_DIR}/package/osx/background.png" \
|
||||
--window-size 600 500 \
|
||||
--icon-size 60 \
|
||||
--icon "Getting Started.webloc" 100 380 \
|
||||
--icon "Getting Started.webloc" 110 380 \
|
||||
--hide-extension "Getting Started.webloc" \
|
||||
--icon "Docs" 250 380 \
|
||||
--icon "WHATSNEW.txt" 400 380 \
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 26 KiB |
Loading…
x
Reference in New Issue
Block a user