1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into dsmx_stuff

This commit is contained in:
sambas 2011-08-07 09:51:41 +03:00
commit 1d99d8a0d6
26 changed files with 66 additions and 65 deletions

View File

@ -19,6 +19,19 @@ defineReplace(addNewline) {
return($$escape_expand(\\n\\t)) return($$escape_expand(\\n\\t))
} }
defineReplace(qtLibraryName) {
unset(LIBRARY_NAME)
LIBRARY_NAME = $$1
CONFIG(debug, debug|release) {
!debug_and_release|build_pass {
mac:RET = $$member(LIBRARY_NAME, 0)_debug
else:win32:RET = $$member(LIBRARY_NAME, 0)d
}
}
isEmpty(RET):RET = $$LIBRARY_NAME
return($$RET)
}
# For use in custom compilers which just copy files # For use in custom compilers which just copy files
win32:i_flag = i win32:i_flag = i
defineReplace(stripSrcDir) { defineReplace(stripSrcDir) {

View File

@ -11,16 +11,15 @@ SOURCES += main.cpp
include(../rpath.pri) include(../rpath.pri)
include(../libs/utils/utils.pri) include(../libs/utils/utils.pri)
win32 { LIBS *= -l$$qtLibraryName(ExtensionSystem) -l$$qtLibraryName(Aggregation)
CONFIG(debug, debug|release):LIBS *= -lExtensionSystemd -lAggregationd -lQExtSerialPortd
else:LIBS *= -lExtensionSystem -lAggregation -lQExtSerialPort
win32 {
# CONFIG(debug, debug|release):LIBS *= -lExtensionSystemd -lAggregationd -lQExtSerialPortd
# else:LIBS *= -lExtensionSystem -lAggregation -lQExtSerialPort
RC_FILE = openpilotgcs.rc RC_FILE = openpilotgcs.rc
target.path = /bin target.path = /bin
INSTALLS += target INSTALLS += target
} else:macx { } else:macx {
CONFIG(debug, debug|release):LIBS *= -lExtensionSystem_debug -lAggregation_debug
else:LIBS *= -lExtensionSystem -lAggregation
LIBS += -framework CoreFoundation LIBS += -framework CoreFoundation
ICON = openpilotgcs.icns ICON = openpilotgcs.icns
QMAKE_INFO_PLIST = Info.plist QMAKE_INFO_PLIST = Info.plist
@ -28,8 +27,6 @@ win32 {
FILETYPES.path = Contents/Resources FILETYPES.path = Contents/Resources
QMAKE_BUNDLE_DATA += FILETYPES QMAKE_BUNDLE_DATA += FILETYPES
} else { } else {
LIBS *= -lExtensionSystem -lAggregation
target.path = /bin target.path = /bin
INSTALLS += target INSTALLS += target
} }

View File

@ -1 +1 @@
LIBS *= -l$$qtLibraryTarget(Aggregation) LIBS *= -l$$qtLibraryName(Aggregation)

View File

@ -1,3 +1,3 @@
include(extensionsystem_dependencies.pri) include(extensionsystem_dependencies.pri)
LIBS *= -l$$qtLibraryTarget(ExtensionSystem) LIBS *= -l$$qtLibraryName(ExtensionSystem)

View File

@ -1,2 +1,2 @@
QT += opengl QT += opengl
LIBS += -l$$qtLibraryTarget(GLC_lib) LIBS *= -l$$qtLibraryName(GLC_lib)

View File

@ -1,4 +1,4 @@
LIBS += -l$$qtLibraryTarget(QxtCore) LIBS *= -l$$qtLibraryName(QxtCore)
INCLUDEPATH += \ INCLUDEPATH += \
$$GCS_SOURCE_TREE/src/libs/libqxt/src/core $$GCS_SOURCE_TREE/src/libs/libqxt/src/core

View File

@ -1 +1 @@
LIBS *= -l$$qtLibraryTarget(opmapwidget) LIBS *= -l$$qtLibraryName(opmapwidget)

View File

@ -1,2 +1,2 @@
LIBS += -l$$qtLibraryTarget(QExtSerialPort) LIBS *= -l$$qtLibraryName(QExtSerialPort)

View File

@ -1 +1 @@
LIBS *= -l$$qtLibraryTarget(QScienceSpinBox) LIBS *= -l$$qtLibraryName(QScienceSpinBox)

View File

@ -1 +1 @@
LIBS *= -l$$qtLibraryTarget(QtConcurrent) LIBS *= -l$$qtLibraryName(QtConcurrent)

View File

@ -1,2 +1,2 @@
LIBS += -l$$qtLibraryTarget(Qwt) LIBS *= -l$$qtLibraryName(Qwt)

View File

@ -1 +1 @@
LIBS += -l$$qtLibraryTarget(sdlgamepad) LIBS *= -l$$qtLibraryName(sdlgamepad)

View File

@ -1,9 +1 @@
macx { LIBS *= -l$$qtLibraryName(Utils)
CONFIG(debug, debug|release):LIBS *= -lUtils_debug
else:LIBS *= -lUtils
} else:win32 {
CONFIG(debug, debug|release):LIBS *= -lUtilsd
else:LIBS *= -lUtils
} else {
LIBS += -l$$qtLibraryTarget(Utils)
}

View File

@ -8,7 +8,7 @@ DESTDIR = $$GCS_LIBRARY_PATH
include(rpath.pri) include(rpath.pri)
TARGET = $$qtLibraryTarget($$TARGET) TARGET = $$qtLibraryName($$TARGET)
contains(QT_CONFIG, reduce_exports):CONFIG += hGCS_symbols contains(QT_CONFIG, reduce_exports):CONFIG += hGCS_symbols

View File

@ -23,7 +23,7 @@ copy2build.name = COPY ${QMAKE_FILE_IN}
copy2build.CONFIG += no_link copy2build.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += copy2build QMAKE_EXTRA_COMPILERS += copy2build
TARGET = $$qtLibraryTarget($$TARGET) TARGET = $$qtLibraryName($$TARGET)
macx { macx {
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/$${PROVIDER}/ QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/$${PROVIDER}/

View File

@ -1,2 +1,2 @@
include(coreplugin_dependencies.pri) include(coreplugin_dependencies.pri)
LIBS *= -l$$qtLibraryTarget(Core) LIBS *= -l$$qtLibraryName(Core)

View File

@ -478,13 +478,13 @@ void DialGadgetWidget::setDialFont(QString fontProps)
// this enables smooth rotation in rotateNeedles below // this enables smooth rotation in rotateNeedles below
void DialGadgetWidget::setNeedle1(double value) { void DialGadgetWidget::setNeedle1(double value) {
if (rotateN1) { if (rotateN1) {
needle1Target = 360*(value*n1Factor-n1MinValue)/(n1MaxValue-n1MinValue); needle1Target = 360*(value*n1Factor)/(n1MaxValue-n1MinValue);
} }
if (horizN1) { if (horizN1) {
needle1Target = (value*n1Factor-n1MinValue)/(n1MaxValue-n1MinValue); needle1Target = (value*n1Factor)/(n1MaxValue-n1MinValue);
} }
if (vertN1) { if (vertN1) {
needle1Target = (value*n1Factor-n1MinValue)/(n1MaxValue-n1MinValue); needle1Target = (value*n1Factor)/(n1MaxValue-n1MinValue);
} }
if (!dialTimer.isActive()) if (!dialTimer.isActive())
dialTimer.start(); dialTimer.start();
@ -497,13 +497,13 @@ void DialGadgetWidget::setNeedle1(double value) {
void DialGadgetWidget::setNeedle2(double value) { void DialGadgetWidget::setNeedle2(double value) {
if (rotateN2) { if (rotateN2) {
needle2Target = 360*(value*n2Factor-n2MinValue)/(n2MaxValue-n2MinValue); needle2Target = 360*(value*n2Factor)/(n2MaxValue-n2MinValue);
} }
if (horizN2) { if (horizN2) {
needle2Target = (value*n2Factor-n2MinValue)/(n2MaxValue-n2MinValue); needle2Target = (value*n2Factor)/(n2MaxValue-n2MinValue);
} }
if (vertN2) { if (vertN2) {
needle2Target = (value*n2Factor-n2MinValue)/(n2MaxValue-n2MinValue); needle2Target = (value*n2Factor)/(n2MaxValue-n2MinValue);
} }
if (!dialTimer.isActive()) if (!dialTimer.isActive())
dialTimer.start(); dialTimer.start();
@ -517,13 +517,13 @@ void DialGadgetWidget::setNeedle2(double value) {
void DialGadgetWidget::setNeedle3(double value) { void DialGadgetWidget::setNeedle3(double value) {
if (rotateN3) { if (rotateN3) {
needle3Target = 360*(value*n3Factor-n3MinValue)/(n3MaxValue-n3MinValue); needle3Target = 360*(value*n3Factor)/(n3MaxValue-n3MinValue);
} }
if (horizN3) { if (horizN3) {
needle3Target = (value*n3Factor-n3MinValue)/(n3MaxValue-n3MinValue); needle3Target = (value*n3Factor)/(n3MaxValue-n3MinValue);
} }
if (vertN3) { if (vertN3) {
needle3Target = (value*n3Factor-n3MinValue)/(n3MaxValue-n3MinValue); needle3Target = (value*n3Factor)/(n3MaxValue-n3MinValue);
} }
if (!dialTimer.isActive()) if (!dialTimer.isActive())
dialTimer.start(); dialTimer.start();

View File

@ -1,3 +1,3 @@
include(ipconnection_dependencies.pri) include(ipconnection_dependencies.pri)
LIBS *= -l$$qtLibraryTarget(IPconnection) LIBS *= -l$$qtLibraryName(IPconnection)

View File

@ -76,11 +76,10 @@ QIODevice* LoggingConnection::openDevice(const QString &deviceName)
if (logFile.isOpen()){ if (logFile.isOpen()){
logFile.close(); logFile.close();
} }
QFileDialog * fd = new QFileDialog(); QString fileName = QFileDialog::getOpenFileName(NULL, tr("Open file"), QString(""), tr("OpenPilot Log (*.opl)"));
fd->setAcceptMode(QFileDialog::AcceptOpen); if (!fileName.isNull()) {
fd->setNameFilter("OpenPilot Log (*.opl)"); startReplay(fileName);
connect(fd, SIGNAL(fileSelected(QString)), this, SLOT(startReplay(QString))); }
fd->exec();
return &logFile; return &logFile;
} }

View File

@ -1,3 +1,3 @@
include(rawhid_dependencies.pri) include(rawhid_dependencies.pri)
LIBS *= -l$$qtLibraryTarget(RawHID) LIBS *= -l$$qtLibraryName(RawHID)

View File

@ -1,3 +1,3 @@
include(scope_dependencies.pri) include(scope_dependencies.pri)
LIBS *= -l$$qtLibraryTarget(ScopeGadget) LIBS *= -l$$qtLibraryName(ScopeGadget)

View File

@ -1,3 +1,3 @@
include(serial_dependencies.pri) include(serial_dependencies.pri)
LIBS *= -l$$qtLibraryTarget(Serial) LIBS *= -l$$qtLibraryName(Serial)

View File

@ -3,4 +3,4 @@ include(uavobjects_dependencies.pri)
# Add the include path to the built-in uavobject include files. # Add the include path to the built-in uavobject include files.
INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD
LIBS *= -l$$qtLibraryTarget(UAVObjects) LIBS *= -l$$qtLibraryName(UAVObjects)

View File

@ -3,4 +3,4 @@ include(uavobjectutil_dependencies.pri)
# Add the include path to the built-in uavobject include files. # Add the include path to the built-in uavobject include files.
INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD
LIBS *= -l$$qtLibraryTarget(UAVObjectUtil) LIBS *= -l$$qtLibraryName(UAVObjectUtil)

View File

@ -1,3 +1,3 @@
include(uavtalk_dependencies.pri) include(uavtalk_dependencies.pri)
LIBS *= -l$$qtLibraryTarget(UAVTalk) LIBS *= -l$$qtLibraryName(UAVTalk)

View File

@ -1,3 +1,3 @@
include(welcome_dependencies.pri) include(welcome_dependencies.pri)
LIBS *= -l$$qtLibraryTarget(Welcome) LIBS *= -l$$qtLibraryName(Welcome)