mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
Merge remote-tracking branch 'origin/next' into thread/OP-1119_Flight_Side_Logs_Plugin
Conflicts: ground/uavobjgenerator/generators/gcs/uavobjectgeneratorgcs.cpp
This commit is contained in:
commit
517cf53b76
1
Makefile
1
Makefile
@ -865,6 +865,7 @@ help:
|
||||
@$(ECHO) " mingw_install - Install the MinGW toolchain (Windows only)"
|
||||
@$(ECHO) " python_install - Install the Python interpreter (Windows only)"
|
||||
@$(ECHO) " nsis_install - Install the NSIS Unicode (Windows only)"
|
||||
@$(ECHO) " openssl_install - Install the OpenSSL libraries (Windows only)"
|
||||
@$(ECHO) " uncrustify_install - Install the Uncrustify source code beautifier"
|
||||
@$(ECHO) " doxygen_install - Install the Doxygen documentation generator"
|
||||
@$(ECHO) " gtest_install - Install the GoogleTest framework"
|
||||
|
@ -141,6 +141,14 @@ equals(copydata, 1) {
|
||||
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$(QTMINGW)/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
|
||||
}
|
||||
|
||||
# copy OpenSSL DLLs
|
||||
OPENSSL_DLLS = \
|
||||
ssleay32.dll \
|
||||
libeay32.dll
|
||||
for(dll, OPENSSL_DLLS) {
|
||||
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$(OPENSSL)/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
|
||||
}
|
||||
|
||||
data_copy.target = FORCE
|
||||
QMAKE_EXTRA_TARGETS += data_copy
|
||||
}
|
||||
|
@ -78,6 +78,7 @@ void MyTabbedStackWidget::insertTab(const int index, QWidget *tab, const QIcon &
|
||||
tab->setContentsMargins(0, 0, 0, 0);
|
||||
m_stackWidget->insertWidget(index, tab);
|
||||
QListWidgetItem *item = new QListWidgetItem(icon, label);
|
||||
item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
|
||||
item->setTextAlignment(Qt::AlignHCenter | Qt::AlignBottom);
|
||||
item->setToolTip(label);
|
||||
m_listWidget->insertItem(index, item);
|
||||
|
@ -58,7 +58,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
||||
"Built on %4 at %5<br/>"
|
||||
"Based on Qt %6 (%7 bit)<br/>"
|
||||
"<br/>"
|
||||
"© %8, 2010-%9. All rights reserved.<br/>"
|
||||
"© %8, 2010-%9. All rights reserved.<br/>"
|
||||
).arg(
|
||||
VersionInfo::revision().left(60), // %1
|
||||
VersionInfo::uavoHash().left(8), // %2
|
||||
@ -77,12 +77,12 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
||||
view->setResizeMode(QQuickView::SizeRootObjectToView);
|
||||
view->setSource(QUrl("qrc:/core/qml/AboutDialog.qml"));
|
||||
|
||||
QWidget * container = QWidget::createWindowContainer(view);
|
||||
QWidget *container = QWidget::createWindowContainer(view);
|
||||
container->setMinimumSize(600, 400);
|
||||
container->setMaximumSize(800, 600);
|
||||
container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
QVBoxLayout *lay = new QVBoxLayout();
|
||||
lay->setContentsMargins(0,0,0,0);
|
||||
lay->setContentsMargins(0, 0, 0, 0);
|
||||
setLayout(lay);
|
||||
layout()->addWidget(container);
|
||||
}
|
||||
@ -93,5 +93,4 @@ void AboutDialog::openUrl(const QString &url)
|
||||
}
|
||||
|
||||
AboutDialog::~AboutDialog()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
@ -26,8 +26,7 @@
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class AboutDialog : public QDialog
|
||||
{
|
||||
class AboutDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@ -36,7 +35,6 @@ public:
|
||||
|
||||
public slots:
|
||||
void openUrl(const QString &url);
|
||||
|
||||
};
|
||||
|
||||
#endif // ABOUTDIALOG_H
|
||||
|
@ -23,7 +23,7 @@ PfdQmlGadget::PfdQmlGadget(QString classId, PfdQmlGadgetWidget *widget, QWidget
|
||||
m_widget(widget)
|
||||
{
|
||||
m_container = NULL;
|
||||
m_parent = parent;
|
||||
m_parent = parent;
|
||||
}
|
||||
|
||||
PfdQmlGadget::~PfdQmlGadget()
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
|
||||
QWidget *widget()
|
||||
{
|
||||
if(!m_container){
|
||||
if (!m_container) {
|
||||
m_container = QWidget::createWindowContainer(m_widget, m_parent);
|
||||
m_container->setMinimumSize(64, 64);
|
||||
m_container->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
|
@ -162,7 +162,7 @@ void PfdQmlGadgetWidget::setAltitudeFactor(double factor)
|
||||
|
||||
void PfdQmlGadgetWidget::setOpenGLEnabled(bool arg)
|
||||
{
|
||||
setTerrainEnabled(m_terrainEnabled);
|
||||
setTerrainEnabled(m_terrainEnabled);
|
||||
}
|
||||
|
||||
// Switch between PositionState UAVObject position
|
||||
|
@ -35,7 +35,7 @@ QmlViewGadget::QmlViewGadget(QString classId, QmlViewGadgetWidget *widget, QWidg
|
||||
m_widget(widget)
|
||||
{
|
||||
m_container = NULL;
|
||||
m_parent = parent;
|
||||
m_parent = parent;
|
||||
}
|
||||
|
||||
QmlViewGadget::~QmlViewGadget()
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
|
||||
QWidget *widget()
|
||||
{
|
||||
if(!m_container){
|
||||
if (!m_container) {
|
||||
m_container = QWidget::createWindowContainer(m_widget, m_parent);
|
||||
m_container->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
m_container->setMinimumSize(64, 64);
|
||||
|
@ -21,7 +21,7 @@
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">OpenPilot multirotor configuration</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">OpenPilot Multirotor Configuration</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">This part of the wizard will set up the OpenPilot controller for use with a flying platform utilizing multiple rotors. The wizard supports the most common types of multirotors. Other variants of multirotors can be configured by using custom configuration options in the Configuration plugin in the GCS.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
|
@ -66,7 +66,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>In this step we will set the neutral rate for the motor highlighted in the illustration to the right. <br/>Plase pay attention to the details and in particular the motors position and its rotation direction.</p><p>To find the neutral rate for this engine, press the Start button below and slide the slider to the right until the engine just starts to spin stably. <br/><br/>When done press button again to stop.</p></body></html></string>
|
||||
<string><html><head/><body><p>In this step we will set the neutral rate for the motor highlighted in the illustration to the right. <br/>Please pay attention to the details and in particular the motors position and its rotation direction. Ensure the motors are spinning in the correct direction as shown in the diagram. Swap any 2 motor wires to change the direction of a motor. </p><p>To find the neutral rate for this engine, press the Start button below and slide the slider to the right until the engine just starts to spin stable. <br/><br/>When done press button again to stop.</p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
|
@ -115,6 +115,8 @@ public:
|
||||
{
|
||||
QComboBox *editor = new QComboBox(parent);
|
||||
|
||||
// Setting ClickFocus lets the ComboBox stay open on Mac OSX.
|
||||
editor->setFocusPolicy(Qt::ClickFocus);
|
||||
foreach(QString option, m_enumOptions)
|
||||
editor->addItem(option);
|
||||
return editor;
|
||||
|
@ -100,7 +100,7 @@ int WelcomeMode::priority() const
|
||||
|
||||
QWidget *WelcomeMode::widget()
|
||||
{
|
||||
if(!m_container){
|
||||
if (!m_container) {
|
||||
m_container = QWidget::createWindowContainer(m_d->quickView);
|
||||
m_container->setMinimumSize(64, 64);
|
||||
m_container->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
|
@ -127,9 +127,9 @@ bool UAVObjectGeneratorGCS::process_object(ObjectInfo *info)
|
||||
type = fieldTypeStrCPP[field->type];
|
||||
// Append field
|
||||
if (field->numElements > 1) {
|
||||
//add both field(elementIndex)/setField(elemntIndex,value) and field_element properties
|
||||
//field_element is more convenient if only certain element is used
|
||||
//and much easier to use from the qml side
|
||||
// add both field(elementIndex)/setField(elemntIndex,value) and field_element properties
|
||||
// field_element is more convenient if only certain element is used
|
||||
// and much easier to use from the qml side
|
||||
propertyGetters +=
|
||||
QString(" Q_INVOKABLE %1 get%2(quint32 index) const;\n")
|
||||
.arg(type).arg(field->name);
|
||||
@ -157,42 +157,40 @@ bool UAVObjectGeneratorGCS::process_object(ObjectInfo *info)
|
||||
QString(" void %1Changed(quint32 index, %2 value);\n")
|
||||
.arg(field->name).arg(type);
|
||||
|
||||
if(!field->defaultElementNames) {
|
||||
for (int elementIndex = 0; elementIndex < field->numElements; elementIndex++) {
|
||||
QString elementName = field->elementNames[elementIndex];
|
||||
properties += QString(" Q_PROPERTY(%1 %2 READ get%2 WRITE set%2 NOTIFY %2Changed);\n")
|
||||
.arg(type).arg(field->name+"_"+elementName);
|
||||
propertyGetters +=
|
||||
QString(" Q_INVOKABLE %1 get%2_%3() const;\n")
|
||||
.arg(type).arg(field->name).arg(elementName);
|
||||
propertiesImpl +=
|
||||
QString("%1 %2::get%3_%4() const\n"
|
||||
"{\n"
|
||||
" QMutexLocker locker(mutex);\n"
|
||||
" return data.%3[%5];\n"
|
||||
"}\n")
|
||||
.arg(type).arg(info->name).arg(field->name).arg(elementName).arg(elementIndex);
|
||||
propertySetters +=
|
||||
QString(" void set%1_%2(%3 value);\n")
|
||||
.arg(field->name).arg(elementName).arg(type);
|
||||
propertiesImpl +=
|
||||
QString("void %1::set%2_%3(%4 value)\n"
|
||||
"{\n"
|
||||
" mutex->lock();\n"
|
||||
" bool changed = data.%2[%5] != value;\n"
|
||||
" data.%2[%5] = value;\n"
|
||||
" mutex->unlock();\n"
|
||||
" if (changed) emit %2_%3Changed(value);\n"
|
||||
"}\n\n")
|
||||
.arg(info->name).arg(field->name).arg(elementName).arg(type).arg(elementIndex);
|
||||
propertyNotifications +=
|
||||
QString(" void %1_%2Changed(%3 value);\n")
|
||||
.arg(field->name).arg(elementName).arg(type);
|
||||
propertyNotificationsImpl +=
|
||||
QString(" //if (data.%1[%2] != oldData.%1[%2])\n"
|
||||
" emit %1_%3Changed(data.%1[%2]);\n")
|
||||
.arg(field->name).arg(elementIndex).arg(elementName);
|
||||
}
|
||||
for (int elementIndex = 0; elementIndex < field->numElements; elementIndex++) {
|
||||
QString elementName = field->elementNames[elementIndex];
|
||||
properties += QString(" Q_PROPERTY(%1 %2 READ get%2 WRITE set%2 NOTIFY %2Changed);\n")
|
||||
.arg(type).arg(field->name + "_" + elementName);
|
||||
propertyGetters +=
|
||||
QString(" Q_INVOKABLE %1 get%2_%3() const;\n")
|
||||
.arg(type).arg(field->name).arg(elementName);
|
||||
propertiesImpl +=
|
||||
QString("%1 %2::get%3_%4() const\n"
|
||||
"{\n"
|
||||
" QMutexLocker locker(mutex);\n"
|
||||
" return data.%3[%5];\n"
|
||||
"}\n")
|
||||
.arg(type).arg(info->name).arg(field->name).arg(elementName).arg(elementIndex);
|
||||
propertySetters +=
|
||||
QString(" void set%1_%2(%3 value);\n")
|
||||
.arg(field->name).arg(elementName).arg(type);
|
||||
propertiesImpl +=
|
||||
QString("void %1::set%2_%3(%4 value)\n"
|
||||
"{\n"
|
||||
" mutex->lock();\n"
|
||||
" bool changed = data.%2[%5] != value;\n"
|
||||
" data.%2[%5] = value;\n"
|
||||
" mutex->unlock();\n"
|
||||
" if (changed) emit %2_%3Changed(value);\n"
|
||||
"}\n\n")
|
||||
.arg(info->name).arg(field->name).arg(elementName).arg(type).arg(elementIndex);
|
||||
propertyNotifications +=
|
||||
QString(" void %1_%2Changed(%3 value);\n")
|
||||
.arg(field->name).arg(elementName).arg(type);
|
||||
propertyNotificationsImpl +=
|
||||
QString(" //if (data.%1[%2] != oldData.%1[%2])\n"
|
||||
" emit %1_%3Changed(data.%1[%2]);\n")
|
||||
.arg(field->name).arg(elementIndex).arg(elementName);
|
||||
}
|
||||
} else {
|
||||
properties += QString(" Q_PROPERTY(%1 %2 READ get%2 WRITE set%2 NOTIFY %2Changed);\n")
|
||||
@ -244,7 +242,6 @@ bool UAVObjectGeneratorGCS::process_object(ObjectInfo *info)
|
||||
// Setup element names
|
||||
QString varElemName = info->fields[n]->name + "ElemNames";
|
||||
finit.append(QString(" QStringList %1;\n").arg(varElemName));
|
||||
|
||||
QStringList elemNames = info->fields[n]->elementNames;
|
||||
for (int m = 0; m < elemNames.length(); ++m) {
|
||||
finit.append(QString(" %1.append(\"%2\");\n")
|
||||
|
@ -12,6 +12,7 @@
|
||||
# mingw_install (Windows only - NOT USED for Qt-5.1.x)
|
||||
# python_install (Windows only - NOT USED for Qt-5.1.x)
|
||||
# nsis_install (Windows only)
|
||||
# openssl_install (Windows only)
|
||||
# uncrustify_install
|
||||
# doxygen_install
|
||||
# gtest_install
|
||||
@ -77,6 +78,7 @@ else ifeq ($(UNAME), Windows)
|
||||
ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-windows.tar.bz2
|
||||
QT_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/qt-5.1.1-windows.tar.bz2
|
||||
NSIS_URL := http://wiki.openpilot.org/download/attachments/18612236/nsis-2.46-unicode.tar.bz2
|
||||
OPENSSL_URL := http://wiki.openpilot.org/download/attachments/18612236/openssl-1.0.1e-win32.tar.bz2
|
||||
UNCRUSTIFY_URL := http://wiki.openpilot.org/download/attachments/18612236/uncrustify-0.60-windows.tar.bz2
|
||||
DOXYGEN_URL := http://wiki.openpilot.org/download/attachments/18612236/doxygen-1.8.3.1-windows.tar.bz2
|
||||
endif
|
||||
@ -89,11 +91,13 @@ QT_SDK_DIR := $(TOOLS_DIR)/qt-5.1.1
|
||||
MINGW_DIR := $(QT_SDK_DIR)/Tools/mingw48_32
|
||||
PYTHON_DIR := $(QT_SDK_DIR)/Tools/mingw48_32/opt/bin
|
||||
NSIS_DIR := $(TOOLS_DIR)/nsis-2.46-unicode
|
||||
OPENSSL_DIR := $(TOOLS_DIR)/openssl-1.0.1e-win32
|
||||
UNCRUSTIFY_DIR := $(TOOLS_DIR)/uncrustify-0.60
|
||||
DOXYGEN_DIR := $(TOOLS_DIR)/doxygen-1.8.3.1
|
||||
GTEST_DIR := $(TOOLS_DIR)/gtest-1.6.0
|
||||
|
||||
QT_SDK_PREFIX := $(QT_SDK_DIR)
|
||||
|
||||
##############################
|
||||
#
|
||||
# Build only and all toolchains available for the platform
|
||||
@ -102,7 +106,7 @@ QT_SDK_PREFIX := $(QT_SDK_DIR)
|
||||
|
||||
BUILD_SDK_TARGETS := arm_sdk qt_sdk
|
||||
ifeq ($(UNAME), Windows)
|
||||
BUILD_SDK_TARGETS += mingw python nsis
|
||||
BUILD_SDK_TARGETS += mingw python nsis openssl
|
||||
endif
|
||||
ALL_SDK_TARGETS := $(BUILD_SDK_TARGETS) gtest uncrustify doxygen
|
||||
|
||||
@ -223,6 +227,7 @@ endif
|
||||
# $(2) = string compare operator, e.g. = or !=
|
||||
#
|
||||
##############################
|
||||
|
||||
define MD5_CHECK_TEMPLATE
|
||||
"`test -f \"$(1)\" && $(OPENSSL) dgst -md5 \"$(1)\" | $(CUT) -f2 -d' '`" $(2) "`$(CUT) -f1 -d' ' < \"$(1).md5\"`"
|
||||
endef
|
||||
@ -526,7 +531,7 @@ python_version:
|
||||
|
||||
##############################
|
||||
#
|
||||
# NSIS Unicode
|
||||
# NSIS Unicode (Windows only)
|
||||
#
|
||||
##############################
|
||||
|
||||
@ -548,6 +553,25 @@ nsis_version:
|
||||
|
||||
endif
|
||||
|
||||
##############################
|
||||
#
|
||||
# OpenSSL (Windows only)
|
||||
#
|
||||
##############################
|
||||
|
||||
ifeq ($(UNAME), Windows)
|
||||
|
||||
$(eval $(call TOOL_INSTALL_TEMPLATE,openssl,$(OPENSSL_DIR),$(OPENSSL_URL),$(notdir $(OPENSSL_URL))))
|
||||
|
||||
ifeq ($(shell [ -d "$(OPENSSL_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
export OPENSSL := $(OPENSSL_DIR)
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
# $(info $(EMPTY) WARNING $(call toprel, $(OPENSSL_DIR)) not found (make openssl_install), using system PATH)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
##############################
|
||||
#
|
||||
# Uncrustify
|
||||
|
Loading…
x
Reference in New Issue
Block a user