From 9dcd6990d3032e06d321394366bdd99554d2fd4a Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Sun, 3 May 2015 23:13:53 +0200 Subject: [PATCH 01/48] OP-1874 - Add notification for Critical alarms, add Attitude, modify alarm repetition rates. reduce rate for Magnetometer, Receiver. Include Attitude. --- flight/modules/Notify/inc/sequences.h | 24 +++++++++++++++++++++--- flight/modules/Notify/notify.c | 10 ++++++---- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/flight/modules/Notify/inc/sequences.h b/flight/modules/Notify/inc/sequences.h index c8b8dca75..3d2d34327 100644 --- a/flight/modules/Notify/inc/sequences.h +++ b/flight/modules/Notify/inc/sequences.h @@ -52,7 +52,8 @@ typedef enum { NOTIFY_SEQUENCE_ALM_CONFIG = 17, NOTIFY_SEQUENCE_ALM_RECEIVER = 18, NOTIFY_SEQUENCE_DISARMED = 19, - NOTIFY_SEQUENCE_NULL = 255, // skips any signalling for this condition + NOTIFY_SEQUENCE_ALM_ATTITUDE = 20, + NOTIFY_SEQUENCE_NULL = 255, // skips any signalling for this condition } NotifySequences; // This structure determine sequences attached to an alarm @@ -60,6 +61,7 @@ typedef struct { uint32_t timeBetweenNotifications; // time in milliseconds to wait between each notification iteration uint8_t alarmIndex; // Index of the alarm, use one of the SYSTEMALARMS_ALARM_XXXXX defines uint8_t warnNotification; // index of the sequence to be used when alarm is in warning status(pick one from NotifySequences enum) + uint8_t criticalNotification; // index of the sequence to be used when alarm is in critical status(pick one from NotifySequences enum) uint8_t errorNotification; // index of the sequence to be used when alarm is in error status(pick one from NotifySequences enum) } AlarmDefinition_t; @@ -156,6 +158,10 @@ const LedSequence_t notifications[] = { { .time_off = 50, .time_on = 50, .color = COLOR_ORANGE, .repeats = 9, }, { .time_off = 500, .time_on = 50, .color = COLOR_ORANGE, .repeats = 1, }, }, }, + [NOTIFY_SEQUENCE_ALM_ATTITUDE] = { .repeats = 10, .steps = { + { .time_off = 0, .time_on = 50, .color = COLOR_RED, .repeats = 1, }, + { .time_off = 0, .time_on = 50, .color = COLOR_BLUE, .repeats = 1, }, + }, }, }; // List of background sequences attached to each flight mode @@ -185,32 +191,44 @@ const AlarmDefinition_t alarmsMap[] = { .timeBetweenNotifications = 10000, .alarmIndex = SYSTEMALARMS_ALARM_GPS, .warnNotification = NOTIFY_SEQUENCE_ALM_WARN_GPS, + .criticalNotification = NOTIFY_SEQUENCE_ALM_ERROR_GPS, .errorNotification = NOTIFY_SEQUENCE_ALM_ERROR_GPS, }, { - .timeBetweenNotifications = 15000, + .timeBetweenNotifications = 5000, .alarmIndex = SYSTEMALARMS_ALARM_MAGNETOMETER, .warnNotification = NOTIFY_SEQUENCE_NULL, + .criticalNotification = NOTIFY_SEQUENCE_ALM_MAG, .errorNotification = NOTIFY_SEQUENCE_ALM_MAG, }, { .timeBetweenNotifications = 15000, .alarmIndex = SYSTEMALARMS_ALARM_BATTERY, .warnNotification = NOTIFY_SEQUENCE_ALM_WARN_BATTERY, + .criticalNotification = NOTIFY_SEQUENCE_ALM_ERROR_BATTERY, .errorNotification = NOTIFY_SEQUENCE_ALM_ERROR_BATTERY, }, { .timeBetweenNotifications = 5000, .alarmIndex = SYSTEMALARMS_ALARM_SYSTEMCONFIGURATION, .warnNotification = NOTIFY_SEQUENCE_NULL, + .criticalNotification = NOTIFY_SEQUENCE_ALM_CONFIG, .errorNotification = NOTIFY_SEQUENCE_ALM_CONFIG, }, { - .timeBetweenNotifications = 5000, + .timeBetweenNotifications = 2000, .alarmIndex = SYSTEMALARMS_ALARM_RECEIVER, .warnNotification = NOTIFY_SEQUENCE_ALM_RECEIVER, + .criticalNotification = NOTIFY_SEQUENCE_ALM_RECEIVER, .errorNotification = NOTIFY_SEQUENCE_ALM_RECEIVER, }, + { + .timeBetweenNotifications = 1000, + .alarmIndex = SYSTEMALARMS_ALARM_ATTITUDE, + .warnNotification = NOTIFY_SEQUENCE_ALM_ATTITUDE, + .criticalNotification = NOTIFY_SEQUENCE_NULL, + .errorNotification = NOTIFY_SEQUENCE_ALM_ATTITUDE, + }, }; const uint8_t alarmsMapSize = NELEMENTS(alarmsMap); diff --git a/flight/modules/Notify/notify.c b/flight/modules/Notify/notify.c index aeb7526bf..ef6aee552 100644 --- a/flight/modules/Notify/notify.c +++ b/flight/modules/Notify/notify.c @@ -49,7 +49,7 @@ typedef struct { static void updatedCb(UAVObjEvent *ev); static void onTimerCb(UAVObjEvent *ev); static void checkAlarm(uint8_t alarm, uint8_t *last_alarm, uint32_t *last_alm_time, - uint8_t warn_sequence, uint8_t error_sequence, + uint8_t warn_sequence, uint8_t critical_sequence, uint8_t error_sequence, uint32_t timeBetweenNotifications); static AlarmStatus_t *alarmStatus; int32_t NotifyInitialize(void) @@ -111,17 +111,19 @@ void onTimerCb(__attribute__((unused)) UAVObjEvent *ev) &alarmStatus[i].lastAlarm, &alarmStatus[i].lastAlarmTime, alarmsMap[i].warnNotification, + alarmsMap[i].criticalNotification, alarmsMap[i].errorNotification, alarmsMap[i].timeBetweenNotifications); } } -void checkAlarm(uint8_t alarm, uint8_t *last_alarm, uint32_t *last_alm_time, uint8_t warn_sequence, uint8_t error_sequence, uint32_t timeBetweenNotifications) +void checkAlarm(uint8_t alarm, uint8_t *last_alarm, uint32_t *last_alm_time, uint8_t warn_sequence, uint8_t critical_sequence, uint8_t error_sequence, uint32_t timeBetweenNotifications) { if (alarm > SYSTEMALARMS_ALARM_OK) { uint32_t current_time = PIOS_DELAY_GetuS(); - if (*last_alarm < alarm || *last_alm_time + timeBetweenNotifications * 1000 < current_time) { - uint8_t sequence = (alarm == SYSTEMALARMS_ALARM_WARNING) ? warn_sequence : error_sequence; + if (*last_alarm < alarm || *last_alm_time + timeBetweenNotifications * 1000 > current_time) { + uint8_t sequence = (alarm == SYSTEMALARMS_ALARM_WARNING) ? warn_sequence : + ((alarm == SYSTEMALARMS_ALARM_CRITICAL) ? critical_sequence : error_sequence); if (sequence != NOTIFY_SEQUENCE_NULL) { PIOS_NOTIFICATION_Default_Ext_Led_Play( ¬ifications[sequence], From e675ae7f7ba3ff5d525caef4c0ce8f098069f712 Mon Sep 17 00:00:00 2001 From: James Duley Date: Thu, 23 Apr 2015 17:51:16 +1200 Subject: [PATCH 02/48] OP-1853 Ground build tidy: remove old qt stuff from translations.pro --- .../translations/translations.pro | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro b/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro index e428c3712..767ad3bb6 100644 --- a/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro +++ b/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro @@ -22,17 +22,14 @@ TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/openpilotgcs_,.ts) MIME_TR_H = $$PWD/mime_tr.h -contains(QT_VERSION, ^4\\.[0-5]\\..*) { - ts.commands = @echo This Qt version is too old for the ts target. Need Qt 4.6+. -} else { - for(dir, $$list($$files($$GCS_SOURCE_TREE/src/plugins/*))):MIMETYPES_FILES += $$files($$dir/*.mimetypes.xml) - MIMETYPES_FILES = \"$$join(MIMETYPES_FILES, \", \")\" - QMAKE_SUBSTITUTES += extract-mimetypes.xq.in - ts.commands += \ - $$XMLPATTERNS -output $$MIME_TR_H $$PWD/extract-mimetypes.xq && \ - (cd $$GCS_SOURCE_TREE && $$LUPDATE src $$MIME_TR_H -ts $$TRANSLATIONS) && \ - $$QMAKE_DEL_FILE $$targetPath($$MIME_TR_H) -} +for(dir, $$list($$files($$GCS_SOURCE_TREE/src/plugins/*))):MIMETYPES_FILES += $$files($$dir/*.mimetypes.xml) +MIMETYPES_FILES = \"$$join(MIMETYPES_FILES, \", \")\" +QMAKE_SUBSTITUTES += extract-mimetypes.xq.in +ts.commands += \ + $$XMLPATTERNS -output $$MIME_TR_H $$PWD/extract-mimetypes.xq && \ + (cd $$GCS_SOURCE_TREE && $$LUPDATE src $$MIME_TR_H -ts $$TRANSLATIONS) && \ + $$QMAKE_DEL_FILE $$targetPath($$MIME_TR_H) + QMAKE_EXTRA_TARGETS += ts TEMPLATE = app From f07dddc9653bd4abe1657743d48e22bf623b7edf Mon Sep 17 00:00:00 2001 From: James Duley Date: Thu, 23 Apr 2015 18:02:03 +1200 Subject: [PATCH 03/48] OP-1853 Ground build tidy: remove old vcproj stuff we don't support and wouldn't work anyway --- ground/openpilotgcs/openpilotgcs.pri | 1 - .../translations/translations.pro | 22 +++++-------------- .../openpilotgcs/src/openpilotgcsplugin.pri | 2 +- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/ground/openpilotgcs/openpilotgcs.pri b/ground/openpilotgcs/openpilotgcs.pri index 3141d1832..7ca4defb6 100644 --- a/ground/openpilotgcs/openpilotgcs.pri +++ b/ground/openpilotgcs/openpilotgcs.pri @@ -168,7 +168,6 @@ macx { MESAWIN_DIR = $$(MESAWIN_DIR) isEmpty(MESAWIN_DIR):MESAWIN_DIR = $${TOOLS_DIR}/mesawin - contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1 GCS_APP_TARGET = openpilotgcs GCS_QT_PLUGINS_PATH = $$GCS_APP_PATH diff --git a/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro b/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro index 767ad3bb6..69923c4fd 100644 --- a/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro +++ b/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro @@ -40,27 +40,15 @@ LIBS = updateqm.input = TRANSLATIONS updateqm.output = $$GCS_DATA_PATH/translations/${QMAKE_FILE_BASE}.qm -isEmpty(vcproj):updateqm.variable_out = PRE_TARGETDEPS +updateqm.variable_out = PRE_TARGETDEPS updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} updateqm.name = LRELEASE ${QMAKE_FILE_IN} updateqm.CONFIG += no_link QMAKE_EXTRA_COMPILERS += updateqm -isEmpty(vcproj) { - QMAKE_LINK = @: IGNORE THIS LINE - OBJECTS_DIR = - win32:CONFIG -= embed_manifest_exe -} else { - CONFIG += console - PHONY_DEPS = . - phony_src.input = PHONY_DEPS - phony_src.output = phony.c - phony_src.variable_out = GENERATED_SOURCES - phony_src.commands = echo int main() { return 0; } > phony.c - phony_src.name = CREATE phony.c - phony_src.CONFIG += combine - QMAKE_EXTRA_COMPILERS += phony_src -} +QMAKE_LINK = @: IGNORE THIS LINE +OBJECTS_DIR = +win32:CONFIG -= embed_manifest_exe qmfiles.files = $$prependAll(LANGUAGES, $$OUT_PWD/openpilotgcs_,.qm) qmfiles.path = /share/openpilotgcs/translations @@ -79,7 +67,7 @@ QT_TRANSLATIONS = $$QtQmExists(LANGUAGES) copyQT_QMs.input = QT_TRANSLATIONS copyQT_QMs.output = $$GCS_DATA_PATH/translations/${QMAKE_FILE_BASE}.qm -isEmpty(vcproj):copyQT_QMs.variable_out = PRE_TARGETDEPS +copyQT_QMs.variable_out = PRE_TARGETDEPS copyQT_QMs.commands = $(COPY_FILE) ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} copyQT_QMs.name = Copy ${QMAKE_FILE_IN} copyQT_QMs.CONFIG += no_link diff --git a/ground/openpilotgcs/src/openpilotgcsplugin.pri b/ground/openpilotgcs/src/openpilotgcsplugin.pri index 2a01ffcc3..8215631d3 100644 --- a/ground/openpilotgcs/src/openpilotgcsplugin.pri +++ b/ground/openpilotgcs/src/openpilotgcsplugin.pri @@ -19,7 +19,7 @@ isEmpty(TARGET) { PLUGINSPECS = $${_PRO_FILE_PWD_}/$${TARGET}.pluginspec copy2build.input = PLUGINSPECS copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripSrcDir} -isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS +copy2build.variable_out = PRE_TARGETDEPS copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} copy2build.name = COPY ${QMAKE_FILE_IN} copy2build.CONFIG += no_link From 7967480c744d6d07ebeaf1190a9dc944a7037937 Mon Sep 17 00:00:00 2001 From: James Duley Date: Thu, 23 Apr 2015 18:02:41 +1200 Subject: [PATCH 04/48] OP-1853 Ground build tidy: remove unneeded line in translations.pro --- .../share/openpilotgcs/translations/translations.pro | 2 -- 1 file changed, 2 deletions(-) diff --git a/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro b/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro index 69923c4fd..1389be5c4 100644 --- a/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro +++ b/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro @@ -16,8 +16,6 @@ LUPDATE = $$targetPath($$[QT_INSTALL_BINS]/lupdate) -locations relative -no-ui-l LRELEASE = $$targetPath($$[QT_INSTALL_BINS]/lrelease) LCONVERT = $$targetPath($$[QT_INSTALL_BINS]/lconvert) -wd = $$replace(GCS_SOURCE_TREE, /, $$QMAKE_DIR_SEP) - TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/openpilotgcs_,.ts) MIME_TR_H = $$PWD/mime_tr.h From 9d31ca939c74990b6eac91bdb3b2be26eb4f7559 Mon Sep 17 00:00:00 2001 From: James Duley Date: Thu, 23 Apr 2015 18:13:44 +1200 Subject: [PATCH 05/48] OP-1853 Ground build tidy: remove targetPath as not needed. Could be replaced with builtin $$shell_path but that appears to be buggy on windows git bash --- ground/openpilotgcs/openpilotgcs.pri | 14 +++++-------- .../translations/translations.pro | 10 ++++----- .../src/libs/version_info/version_info.pro | 2 +- .../src/plugins/coreplugin/authorsdialog.pri | 2 +- .../uavobject-synthetics.pro | 21 +++++++------------ 5 files changed, 20 insertions(+), 29 deletions(-) diff --git a/ground/openpilotgcs/openpilotgcs.pri b/ground/openpilotgcs/openpilotgcs.pri index 7ca4defb6..2decf3df7 100644 --- a/ground/openpilotgcs/openpilotgcs.pri +++ b/ground/openpilotgcs/openpilotgcs.pri @@ -11,10 +11,6 @@ defineReplace(cleanPath) { return($$join(out, /, $$pfx)) } -defineReplace(targetPath) { - return($$replace(1, /, $$QMAKE_DIR_SEP)) -} - defineReplace(addNewline) { return($$escape_expand(\\n\\t)) } @@ -41,8 +37,8 @@ defineTest(addCopyFileTarget) { $${file}.depends = $$src # create directory. Better would be an order only dependency - $${file}.commands = -@$(MKDIR) \"$$targetPath($$dirname(dest))\" $$addNewline() - $${file}.commands += $(COPY_FILE) \"$$targetPath($$src)\" \"$$targetPath($$dest)\" + $${file}.commands = -@$(MKDIR) \"$$dirname(dest)\" $$addNewline() + $${file}.commands += $(COPY_FILE) \"$$src\" \"$$dest\" QMAKE_EXTRA_TARGETS += $$file POST_TARGETDEPS += $$eval($${file}.target) @@ -66,10 +62,10 @@ defineTest(addCopyDirTarget) { # Windows does not update directory timestamp if files are modified win32: $${dir}.depends += FORCE - $${dir}.commands = @rm -rf \"$$targetPath($$dest)\" $$addNewline() + $${dir}.commands = @rm -rf \"$$dest\" $$addNewline() # create directory. Better would be an order only dependency - $${dir}.commands += -@$(MKDIR) \"$$targetPath($$dirname(dest))\" $$addNewline() - $${dir}.commands += $(COPY_DIR) \"$$targetPath($$src)\" \"$$targetPath($$dest)\" + $${dir}.commands += -@$(MKDIR) \"$$dirname(dest)\" $$addNewline() + $${dir}.commands += $(COPY_DIR) \"$$src\" \"$$dest\" QMAKE_EXTRA_TARGETS += $$dir POST_TARGETDEPS += $$eval($${dir}.target) diff --git a/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro b/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro index 1389be5c4..f4c4b2778 100644 --- a/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro +++ b/ground/openpilotgcs/share/openpilotgcs/translations/translations.pro @@ -11,10 +11,10 @@ defineReplace(prependAll) { return($$result) } -XMLPATTERNS = $$targetPath($$[QT_INSTALL_BINS]/xmlpatterns) -LUPDATE = $$targetPath($$[QT_INSTALL_BINS]/lupdate) -locations relative -no-ui-lines -no-sort -LRELEASE = $$targetPath($$[QT_INSTALL_BINS]/lrelease) -LCONVERT = $$targetPath($$[QT_INSTALL_BINS]/lconvert) +XMLPATTERNS = $$[QT_INSTALL_BINS]/xmlpatterns +LUPDATE = $$[QT_INSTALL_BINS]/lupdate -locations relative -no-ui-lines -no-sort +LRELEASE = $$[QT_INSTALL_BINS]/lrelease +LCONVERT = $$[QT_INSTALL_BINS]/lconvert TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/openpilotgcs_,.ts) @@ -26,7 +26,7 @@ QMAKE_SUBSTITUTES += extract-mimetypes.xq.in ts.commands += \ $$XMLPATTERNS -output $$MIME_TR_H $$PWD/extract-mimetypes.xq && \ (cd $$GCS_SOURCE_TREE && $$LUPDATE src $$MIME_TR_H -ts $$TRANSLATIONS) && \ - $$QMAKE_DEL_FILE $$targetPath($$MIME_TR_H) + $$QMAKE_DEL_FILE $$MIME_TR_H QMAKE_EXTRA_TARGETS += ts diff --git a/ground/openpilotgcs/src/libs/version_info/version_info.pro b/ground/openpilotgcs/src/libs/version_info/version_info.pro index 6436e0d36..ab800ef28 100644 --- a/ground/openpilotgcs/src/libs/version_info/version_info.pro +++ b/ground/openpilotgcs/src/libs/version_info/version_info.pro @@ -26,7 +26,7 @@ SOURCES = version_info.cpp # Create custom version_info target which generates a real file version_info.target = $$VERSION_INFO_FILE - version_info.commands = -$(MKDIR) $$targetPath($$VERSION_INFO_DIR) $$addNewline() + version_info.commands = -$(MKDIR) $$VERSION_INFO_DIR $$addNewline() version_info.commands += $$VERSION_INFO_COMMAND \ --path=\"$$ROOT_DIR\" \ --template=\"$$VERSION_INFO_TEMPLATE\" \ diff --git a/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.pri b/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.pri index 96d7457ef..3a002f114 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.pri +++ b/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.pri @@ -20,7 +20,7 @@ include(../../python.pri) # Create custom authors target which generates a real file authors.target = $$AUTHORS_FILE - authors.commands = -$(MKDIR) $$targetPath($$AUTHORS_DIR) $$addNewline() + authors.commands = -$(MKDIR) $$AUTHORS_DIR $$addNewline() authors.commands += $$AUTHORS_COMMAND \ --infile=\"$$AUTHORS_SOURCE\" \ --template=\"$$AUTHORS_TEMPLATE\" \ diff --git a/ground/uavobject-synthetics/uavobject-synthetics.pro b/ground/uavobject-synthetics/uavobject-synthetics.pro index 85e53d139..a482649ac 100644 --- a/ground/uavobject-synthetics/uavobject-synthetics.pro +++ b/ground/uavobject-synthetics/uavobject-synthetics.pro @@ -5,11 +5,6 @@ TEMPLATE = aux -# Some handy defines -defineReplace(targetPath) { - return($$replace(1, /, $$QMAKE_DIR_SEP)) -} - defineReplace(addNewline) { return($$escape_expand(\\n\\t)) } @@ -38,17 +33,17 @@ win32 { # Windows sometimes remembers working directory changed from Makefile, sometimes not. # That's why pushd/popd is used here - to make sure that we know current directory. - uavobjects.commands += -$(MKDIR) $$targetPath(../uavobject-synthetics) $$addNewline() - uavobjects.commands += pushd $$targetPath(../uavobject-synthetics) && - uavobjects.commands += $$targetPath(../uavobjgenerator/$${BUILD_CONFIG}/uavobjgenerator) - uavobjects.commands += $$targetPath(../../shared/uavobjectdefinition) - uavobjects.commands += $$targetPath(../..) && + uavobjects.commands += -$(MKDIR) ../uavobject-synthetics $$addNewline() + uavobjects.commands += pushd ../uavobject-synthetics && + uavobjects.commands += ../uavobjgenerator/$${BUILD_CONFIG}/uavobjgenerator + uavobjects.commands += ../../shared/uavobjectdefinition + uavobjects.commands += ../.. && uavobjects.commands += popd $$addNewline() - uavobjects.commands += -$(MKDIR) $$targetPath(../openpilotgcs) $$addNewline() - uavobjects.commands += pushd $$targetPath(../openpilotgcs) && + uavobjects.commands += -$(MKDIR) ../openpilotgcs $$addNewline() + uavobjects.commands += pushd ../openpilotgcs && uavobjects.commands += $(QMAKE) -spec $$SPEC CONFIG+=$${BUILD_CONFIG} -r - uavobjects.commands += $$targetPath(../../ground/openpilotgcs/)openpilotgcs.pro && + uavobjects.commands += ../../ground/openpilotgcs/openpilotgcs.pro && uavobjects.commands += popd $$addNewline() } From 5a2806c3c0f5021b81fc74bd8e3d939df98d7135 Mon Sep 17 00:00:00 2001 From: James Duley Date: Fri, 24 Apr 2015 16:18:24 +1200 Subject: [PATCH 06/48] OP-1853 Ground build tidy: Remove hardcoded prefix from uavobjgenerator output --- Makefile | 11 +++-- .../flight/uavobjectgeneratorflight.cpp | 2 +- .../generators/gcs/uavobjectgeneratorgcs.cpp | 2 +- .../java/uavobjectgeneratorjava.cpp | 2 +- .../matlab/uavobjectgeneratormatlab.cpp | 2 +- .../python/uavobjectgeneratorpython.cpp | 2 +- .../wireshark/uavobjectgeneratorwireshark.cpp | 2 +- ground/uavobjgenerator/main.cpp | 45 ++++++------------- 8 files changed, 25 insertions(+), 43 deletions(-) diff --git a/Makefile b/Makefile index d9711b0a1..205dba8a5 100644 --- a/Makefile +++ b/Makefile @@ -176,15 +176,14 @@ uavobjects: $(addprefix uavobjects_, $(UAVOBJ_TARGETS)) UAVOBJ_XML_DIR := $(ROOT_DIR)/shared/uavobjectdefinition UAVOBJ_OUT_DIR := $(BUILD_DIR)/uavobject-synthetics -DIRS += $(UAVOBJ_OUT_DIR) - -uavobjects_%: $(UAVOBJ_OUT_DIR) uavobjgenerator - $(V1) ( cd $(UAVOBJ_OUT_DIR) && \ +uavobjects_%: uavobjgenerator + @$(MKDIR) -p $(UAVOBJ_OUT_DIR)/$* + $(V1) ( cd $(UAVOBJ_OUT_DIR)/$* && \ $(UAVOBJGENERATOR) -$* $(UAVOBJ_XML_DIR) $(ROOT_DIR) ; \ ) -uavobjects_test: $(UAVOBJ_OUT_DIR) uavobjgenerator - $(V1) $(UAVOBJGENERATOR) -v -none $(UAVOBJ_XML_DIR) $(ROOT_DIR) +uavobjects_test: uavobjgenerator + $(V1) $(UAVOBJGENERATOR) -v $(UAVOBJ_XML_DIR) $(ROOT_DIR) uavobjects_clean: @$(ECHO) " CLEAN $(call toprel, $(UAVOBJ_OUT_DIR))" diff --git a/ground/uavobjgenerator/generators/flight/uavobjectgeneratorflight.cpp b/ground/uavobjgenerator/generators/flight/uavobjectgeneratorflight.cpp index 81636bf82..4e08017cd 100644 --- a/ground/uavobjgenerator/generators/flight/uavobjectgeneratorflight.cpp +++ b/ground/uavobjgenerator/generators/flight/uavobjectgeneratorflight.cpp @@ -36,7 +36,7 @@ bool UAVObjectGeneratorFlight::generate(UAVObjectParser *parser, QString templat QString flightObjInit, objInc, objFileNames, objNames; qint32 sizeCalc; flightCodePath = QDir(templatepath + QString(FLIGHT_CODE_DIR)); - flightOutputPath = QDir(outputpath + QString("flight")); + flightOutputPath = QDir(outputpath); flightOutputPath.mkpath(flightOutputPath.absolutePath()); flightCodeTemplate = readFile(flightCodePath.absoluteFilePath("uavobject.c.template")); diff --git a/ground/uavobjgenerator/generators/gcs/uavobjectgeneratorgcs.cpp b/ground/uavobjgenerator/generators/gcs/uavobjectgeneratorgcs.cpp index bfb05a36c..e5fc3a354 100644 --- a/ground/uavobjgenerator/generators/gcs/uavobjectgeneratorgcs.cpp +++ b/ground/uavobjgenerator/generators/gcs/uavobjectgeneratorgcs.cpp @@ -36,7 +36,7 @@ bool UAVObjectGeneratorGCS::generate(UAVObjectParser *parser, QString templatepa << "UINT8" << "UINT16" << "UINT32" << "FLOAT32" << "ENUM"; gcsCodePath = QDir(templatepath + QString(GCS_CODE_DIR)); - gcsOutputPath = QDir(outputpath + QString("gcs")); + gcsOutputPath = QDir(outputpath); gcsOutputPath.mkpath(gcsOutputPath.absolutePath()); gcsCodeTemplate = readFile(gcsCodePath.absoluteFilePath("uavobject.cpp.template")); diff --git a/ground/uavobjgenerator/generators/java/uavobjectgeneratorjava.cpp b/ground/uavobjgenerator/generators/java/uavobjectgeneratorjava.cpp index bbd788c1f..b8229feec 100644 --- a/ground/uavobjgenerator/generators/java/uavobjectgeneratorjava.cpp +++ b/ground/uavobjgenerator/generators/java/uavobjectgeneratorjava.cpp @@ -37,7 +37,7 @@ bool UAVObjectGeneratorJava::generate(UAVObjectParser *parser, QString templatep << "UINT8" << "UINT16" << "UINT32" << "FLOAT32" << "ENUM"; javaCodePath = QDir(templatepath + QString(JAVA_TEMPLATE_DIR)); - javaOutputPath = QDir(outputpath + QString("java")); + javaOutputPath = QDir(outputpath); javaOutputPath.mkpath(javaOutputPath.absolutePath()); javaCodeTemplate = readFile(javaCodePath.absoluteFilePath("uavobject.java.template")); diff --git a/ground/uavobjgenerator/generators/matlab/uavobjectgeneratormatlab.cpp b/ground/uavobjgenerator/generators/matlab/uavobjectgeneratormatlab.cpp index e47db4316..3ecaf49a1 100644 --- a/ground/uavobjgenerator/generators/matlab/uavobjectgeneratormatlab.cpp +++ b/ground/uavobjgenerator/generators/matlab/uavobjectgeneratormatlab.cpp @@ -36,7 +36,7 @@ bool UAVObjectGeneratorMatlab::generate(UAVObjectParser *parser, QString templat << "1" << "2" << "4" << "4" << "1"; QDir matlabTemplatePath = QDir(templatepath + QString(MATLAB_CODE_DIR)); - QDir matlabOutputPath = QDir(outputpath + QString("matlab")); + QDir matlabOutputPath = QDir(outputpath); matlabOutputPath.mkpath(matlabOutputPath.absolutePath()); QString matlabCodeTemplate = readFile(matlabTemplatePath.absoluteFilePath("uavobject.m.template")); diff --git a/ground/uavobjgenerator/generators/python/uavobjectgeneratorpython.cpp b/ground/uavobjgenerator/generators/python/uavobjectgeneratorpython.cpp index 2703e59cc..80c3883ba 100644 --- a/ground/uavobjgenerator/generators/python/uavobjectgeneratorpython.cpp +++ b/ground/uavobjgenerator/generators/python/uavobjectgeneratorpython.cpp @@ -31,7 +31,7 @@ bool UAVObjectGeneratorPython::generate(UAVObjectParser *parser, QString templat { // Load template and setup output directory pythonCodePath = QDir(templatepath + QString("flight/modules/FlightPlan/lib")); - pythonOutputPath = QDir(outputpath + QString("python")); + pythonOutputPath = QDir(outputpath); pythonOutputPath.mkpath(pythonOutputPath.absolutePath()); pythonCodeTemplate = readFile(pythonCodePath.absoluteFilePath("uavobject.pyt.template")); if (pythonCodeTemplate.isEmpty()) { diff --git a/ground/uavobjgenerator/generators/wireshark/uavobjectgeneratorwireshark.cpp b/ground/uavobjgenerator/generators/wireshark/uavobjectgeneratorwireshark.cpp index fe6ae4a33..a21067c91 100644 --- a/ground/uavobjgenerator/generators/wireshark/uavobjectgeneratorwireshark.cpp +++ b/ground/uavobjgenerator/generators/wireshark/uavobjectgeneratorwireshark.cpp @@ -37,7 +37,7 @@ bool UAVObjectGeneratorWireshark::generate(UAVObjectParser *parser, QString temp wiresharkCodePath = QDir(templatepath + QString("ground/openpilotgcs/src/plugins/uavobjects/wireshark")); - wiresharkOutputPath = QDir(outputpath + QString("wireshark")); + wiresharkOutputPath = QDir(outputpath); wiresharkOutputPath.mkpath(wiresharkOutputPath.absolutePath()); wiresharkCodeTemplate = readFile(wiresharkCodePath.absoluteFilePath("op-uavobjects/packet-op-uavobjects.c.template")); diff --git a/ground/uavobjgenerator/main.cpp b/ground/uavobjgenerator/main.cpp index 55de04f3d..c568bfc2e 100644 --- a/ground/uavobjgenerator/main.cpp +++ b/ground/uavobjgenerator/main.cpp @@ -47,7 +47,7 @@ using namespace std; */ void usage() { - cout << "Usage: uavobjectgenerator [-gcs] [-flight] [-java] [-python] [-matlab] [-wireshark] [-none] [-v] xml_path template_base [UAVObj1] ... [UAVObjN]" << endl; + cout << "Usage: uavobjectgenerator [language] [-v] xml_path template_base [UAVObj1] ... [UAVObjN]" << endl; cout << "Languages: " << endl; cout << "\t-gcs build groundstation code" << endl; cout << "\t-flight build flight code" << endl; @@ -55,9 +55,8 @@ void usage() cout << "\t-python build python code" << endl; cout << "\t-matlab build matlab code" << endl; cout << "\t-wireshark build wireshark plugin" << endl; - cout << "\tIf no language is specified ( and not -none ) -> all are built." << endl; + cout << "\tIf no language is specified none are built - just parse xmls." << endl; cout << "Misc: " << endl; - cout << "\t-none build no language - just parse xml's" << endl; cout << "\t-h this help" << endl; cout << "\t-v verbose" << endl; cout << "\tinput_path path to UAVObject definition (.xml) files." << endl; @@ -109,9 +108,7 @@ int main(int argc, char *argv[]) bool do_python = (arguments_stringlist.removeAll("-python") > 0); bool do_matlab = (arguments_stringlist.removeAll("-matlab") > 0); bool do_wireshark = (arguments_stringlist.removeAll("-wireshark") > 0); - bool do_none = (arguments_stringlist.removeAll("-none") > 0); // - bool do_all = ((do_gcs || do_flight || do_java || do_python || do_matlab) == false); bool do_allObjects = true; if (arguments_stringlist.length() >= 2) { @@ -205,47 +202,33 @@ int main(int argc, char *argv[]) cout << "used units: " << parser->all_units.join(",").toStdString() << endl; } - if (do_none) { - return RETURN_OK; - } - - // generate flight code if wanted - if (do_flight | do_all) { + if (do_flight) { + // generate flight code if wanted cout << "generating flight code" << endl; UAVObjectGeneratorFlight flightgen; flightgen.generate(parser, templatepath, outputpath); - } - - // generate gcs code if wanted - if (do_gcs | do_all) { + } else if (do_gcs) { + // generate gcs code if wanted cout << "generating gcs code" << endl; UAVObjectGeneratorGCS gcsgen; gcsgen.generate(parser, templatepath, outputpath); - } - - // generate java code if wanted - if (do_java | do_all) { + } else if (do_java) { + // generate java code if wanted cout << "generating java code" << endl; UAVObjectGeneratorJava javagen; javagen.generate(parser, templatepath, outputpath); - } - - // generate python code if wanted - if (do_python | do_all) { + } else if (do_python) { + // generate python code if wanted cout << "generating python code" << endl; UAVObjectGeneratorPython pygen; pygen.generate(parser, templatepath, outputpath); - } - - // generate matlab code if wanted - if (do_matlab | do_all) { + } else if (do_matlab) { + // generate matlab code if wanted cout << "generating matlab code" << endl; UAVObjectGeneratorMatlab matlabgen; matlabgen.generate(parser, templatepath, outputpath); - } - - // generate wireshark plugin if wanted - if (do_wireshark | do_all) { + } else if (do_wireshark) { + // generate wireshark plugin if wanted cout << "generating wireshark code" << endl; UAVObjectGeneratorWireshark wiresharkgen; wiresharkgen.generate(parser, templatepath, outputpath); From 24a270772ef3e43b6ef9ad854622dbdcb0c1157c Mon Sep 17 00:00:00 2001 From: James Duley Date: Sun, 3 May 2015 17:47:52 +1200 Subject: [PATCH 07/48] OP-1853 Ground build tidy: Remove old android line --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 205dba8a5..83399bb55 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,6 @@ DIRS = $(DL_DIR) $(TOOLS_DIR) $(BUILD_DIR) $(PACKAGE_DIR) $(DIST_DIR) # Set up default build configurations (debug | release) GCS_BUILD_CONF := release UAVOGEN_BUILD_CONF := release -ANDROIDGCS_BUILD_CONF := debug GOOGLE_API_VERSION := 14 # Clean out undesirable variables from the environment and command-line From 5ab283677fcc7de6275ebd6daa797f334b498e2c Mon Sep 17 00:00:00 2001 From: James Duley Date: Sun, 3 May 2015 18:04:17 +1200 Subject: [PATCH 08/48] OP-1853 Ground build tidy: Make UAVO_BUILD_CONF use GCS_BUILD_CONF to match qtcreator builds and make things easier later --- Makefile | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 83399bb55..f008fd025 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,6 @@ DIRS = $(DL_DIR) $(TOOLS_DIR) $(BUILD_DIR) $(PACKAGE_DIR) $(DIST_DIR) # Set up default build configurations (debug | release) GCS_BUILD_CONF := release -UAVOGEN_BUILD_CONF := release GOOGLE_API_VERSION := 14 # Clean out undesirable variables from the environment and command-line @@ -124,7 +123,7 @@ else ifeq ($(UNAME), Darwin) UAVOBJGENERATOR = "$(BUILD_DIR)/uavobjgenerator/uavobjgenerator" else ifeq ($(UNAME), Windows) QT_SPEC = win32-g++ - UAVOBJGENERATOR = "$(BUILD_DIR)/uavobjgenerator/$(UAVOGEN_BUILD_CONF)/uavobjgenerator.exe" + UAVOBJGENERATOR = "$(BUILD_DIR)/uavobjgenerator/$(GCS_BUILD_CONF)/uavobjgenerator.exe" endif ############################## @@ -151,12 +150,6 @@ clean: all_clean # ############################## -ifeq ($(V), 1) - UAVOGEN_SILENT := -else - UAVOGEN_SILENT := silent -endif - UAVOBJGENERATOR_DIR = $(BUILD_DIR)/uavobjgenerator DIRS += $(UAVOBJGENERATOR_DIR) @@ -164,7 +157,7 @@ DIRS += $(UAVOBJGENERATOR_DIR) uavobjgenerator: | $(UAVOBJGENERATOR_DIR) $(V1) cd $(UAVOBJGENERATOR_DIR) && \ $(QMAKE) $(ROOT_DIR)/ground/uavobjgenerator/uavobjgenerator.pro \ - -spec $(QT_SPEC) -r CONFIG+=$(UAVOGEN_BUILD_CONF) CONFIG+=$(UAVOGEN_SILENT) && \ + -spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) && \ $(MAKE) --no-print-directory -w UAVOBJ_TARGETS := gcs flight python matlab java wireshark From 90420dd1642cca202c2938b7ee4f9cde71343f11 Mon Sep 17 00:00:00 2001 From: James Duley Date: Sun, 10 May 2015 21:46:00 +1200 Subject: [PATCH 09/48] OP-1853 Ground build tidy: unquote UAVOBJGENERATOR --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f008fd025..d9a92d089 100644 --- a/Makefile +++ b/Makefile @@ -117,13 +117,13 @@ include $(ROOT_DIR)/make/tools.mk # We almost need to consider autoconf/automake instead of this ifeq ($(UNAME), Linux) QT_SPEC = linux-g++ - UAVOBJGENERATOR = "$(BUILD_DIR)/uavobjgenerator/uavobjgenerator" + UAVOBJGENERATOR = $(BUILD_DIR)/uavobjgenerator/uavobjgenerator else ifeq ($(UNAME), Darwin) QT_SPEC = macx-g++ - UAVOBJGENERATOR = "$(BUILD_DIR)/uavobjgenerator/uavobjgenerator" + UAVOBJGENERATOR = $(BUILD_DIR)/uavobjgenerator/uavobjgenerator else ifeq ($(UNAME), Windows) QT_SPEC = win32-g++ - UAVOBJGENERATOR = "$(BUILD_DIR)/uavobjgenerator/$(GCS_BUILD_CONF)/uavobjgenerator.exe" + UAVOBJGENERATOR = $(BUILD_DIR)/uavobjgenerator/$(GCS_BUILD_CONF)/uavobjgenerator.exe endif ############################## From 060d8f1cc14e70a1d0d3d6ccd9dfea63bcfe9e14 Mon Sep 17 00:00:00 2001 From: James Duley Date: Sun, 10 May 2015 21:25:50 +1200 Subject: [PATCH 10/48] OP-1853 Ground build tidy: make non PHONY target UAVOBJGENERATOR --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d9a92d089..119d36027 100644 --- a/Makefile +++ b/Makefile @@ -154,10 +154,10 @@ UAVOBJGENERATOR_DIR = $(BUILD_DIR)/uavobjgenerator DIRS += $(UAVOBJGENERATOR_DIR) .PHONY: uavobjgenerator -uavobjgenerator: | $(UAVOBJGENERATOR_DIR) +uavobjgenerator $(UAVOBJGENERATOR): | $(UAVOBJGENERATOR_DIR) $(V1) cd $(UAVOBJGENERATOR_DIR) && \ - $(QMAKE) $(ROOT_DIR)/ground/uavobjgenerator/uavobjgenerator.pro \ - -spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) && \ + ( [ -f Makefile ] || $(QMAKE) $(ROOT_DIR)/ground/uavobjgenerator/uavobjgenerator.pro \ + -spec $(QT_SPEC) CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) ) && \ $(MAKE) --no-print-directory -w UAVOBJ_TARGETS := gcs flight python matlab java wireshark @@ -168,13 +168,13 @@ uavobjects: $(addprefix uavobjects_, $(UAVOBJ_TARGETS)) UAVOBJ_XML_DIR := $(ROOT_DIR)/shared/uavobjectdefinition UAVOBJ_OUT_DIR := $(BUILD_DIR)/uavobject-synthetics -uavobjects_%: uavobjgenerator +uavobjects_%: $(UAVOBJGENERATOR) @$(MKDIR) -p $(UAVOBJ_OUT_DIR)/$* $(V1) ( cd $(UAVOBJ_OUT_DIR)/$* && \ $(UAVOBJGENERATOR) -$* $(UAVOBJ_XML_DIR) $(ROOT_DIR) ; \ ) -uavobjects_test: uavobjgenerator +uavobjects_test: $(UAVOBJGENERATOR) $(V1) $(UAVOBJGENERATOR) -v $(UAVOBJ_XML_DIR) $(ROOT_DIR) uavobjects_clean: From 2610a4c46339553662ab78ac5d8d35d241b4795b Mon Sep 17 00:00:00 2001 From: James Duley Date: Thu, 23 Apr 2015 15:02:12 +1200 Subject: [PATCH 11/48] OP-1853 Ground build tidy: make the gcs build handle generating its own UAVOs. This removes warnings and better handles dependencies to speed up rebuilds New file uavobjgenerator.pri define a qmake compiler of the uavobjgenerator --- Makefile | 2 +- .../src/plugins/uavobjects/uavobjects.pri | 2 + .../src/plugins/uavobjects/uavobjects.pro | 348 +++++++----------- .../uavobjects/uavobjects_dependencies.pri | 7 - .../plugins/uavobjects/uavobjgenerator.pri | 39 ++ 5 files changed, 168 insertions(+), 230 deletions(-) create mode 100644 ground/openpilotgcs/src/plugins/uavobjects/uavobjgenerator.pri diff --git a/Makefile b/Makefile index 119d36027..256bfff1b 100644 --- a/Makefile +++ b/Makefile @@ -468,7 +468,7 @@ openpilotgcs_qmake $(OPENPILOTGCS_MAKEFILE): | $(OPENPILOTGCS_DIR) -spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) $(GCS_QMAKE_OPTS) .PHONY: openpilotgcs -openpilotgcs: uavobjects_gcs $(OPENPILOTGCS_MAKEFILE) +openpilotgcs: $(UAVOBJGENERATOR) $(OPENPILOTGCS_MAKEFILE) $(V1) $(MAKE) -w -C $(OPENPILOTGCS_DIR)/$(MAKE_DIR); .PHONY: openpilotgcs_clean diff --git a/ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pri b/ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pri index dbe866573..617685dbf 100644 --- a/ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pri +++ b/ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pri @@ -2,5 +2,7 @@ include(uavobjects_dependencies.pri) # Add the include path to the built-in uavobject include files. INCLUDEPATH += $$PWD +# Add the include path to the generated uavobject include files. +INCLUDEPATH += $$shadowed($$PWD) LIBS *= -l$$qtLibraryName(UAVObjects) diff --git a/ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro b/ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro index 0c3eb2e13..54ec84cce 100644 --- a/ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro +++ b/ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro @@ -25,227 +25,131 @@ SOURCES += \ OTHER_FILES += UAVObjects.pluginspec -# Add in all of the synthetic/generated uavobject files -HEADERS += \ - $$UAVOBJECT_SYNTHETICS/statusgrounddrive.h \ - $$UAVOBJECT_SYNTHETICS/statusvtolautotakeoff.h \ - $$UAVOBJECT_SYNTHETICS/pidstatus.h \ - $$UAVOBJECT_SYNTHETICS/statusvtolland.h \ - $$UAVOBJECT_SYNTHETICS/vtolselftuningstats.h \ - $$UAVOBJECT_SYNTHETICS/accelgyrosettings.h \ - $$UAVOBJECT_SYNTHETICS/accessorydesired.h \ - $$UAVOBJECT_SYNTHETICS/barosensor.h \ - $$UAVOBJECT_SYNTHETICS/airspeedsensor.h \ - $$UAVOBJECT_SYNTHETICS/airspeedsettings.h \ - $$UAVOBJECT_SYNTHETICS/airspeedstate.h \ - $$UAVOBJECT_SYNTHETICS/attitudestate.h \ - $$UAVOBJECT_SYNTHETICS/attitudesimulated.h \ - $$UAVOBJECT_SYNTHETICS/altitudeholdsettings.h \ - $$UAVOBJECT_SYNTHETICS/altitudeholdstatus.h \ - $$UAVOBJECT_SYNTHETICS/altitudefiltersettings.h \ - $$UAVOBJECT_SYNTHETICS/debuglogsettings.h \ - $$UAVOBJECT_SYNTHETICS/debuglogcontrol.h \ - $$UAVOBJECT_SYNTHETICS/debuglogstatus.h \ - $$UAVOBJECT_SYNTHETICS/debuglogentry.h \ - $$UAVOBJECT_SYNTHETICS/ekfconfiguration.h \ - $$UAVOBJECT_SYNTHETICS/ekfstatevariance.h \ - $$UAVOBJECT_SYNTHETICS/revocalibration.h \ - $$UAVOBJECT_SYNTHETICS/revosettings.h \ - $$UAVOBJECT_SYNTHETICS/gcstelemetrystats.h \ - $$UAVOBJECT_SYNTHETICS/gyrostate.h \ - $$UAVOBJECT_SYNTHETICS/gyrosensor.h \ - $$UAVOBJECT_SYNTHETICS/accelsensor.h \ - $$UAVOBJECT_SYNTHETICS/accelstate.h \ - $$UAVOBJECT_SYNTHETICS/magsensor.h \ - $$UAVOBJECT_SYNTHETICS/magstate.h \ - $$UAVOBJECT_SYNTHETICS/camerastabsettings.h \ - $$UAVOBJECT_SYNTHETICS/flighttelemetrystats.h \ - $$UAVOBJECT_SYNTHETICS/systemstats.h \ - $$UAVOBJECT_SYNTHETICS/systemalarms.h \ - $$UAVOBJECT_SYNTHETICS/objectpersistence.h \ - $$UAVOBJECT_SYNTHETICS/overosyncstats.h \ - $$UAVOBJECT_SYNTHETICS/overosyncsettings.h \ - $$UAVOBJECT_SYNTHETICS/systemsettings.h \ - $$UAVOBJECT_SYNTHETICS/stabilizationstatus.h \ - $$UAVOBJECT_SYNTHETICS/stabilizationsettings.h \ - $$UAVOBJECT_SYNTHETICS/stabilizationsettingsbank1.h \ - $$UAVOBJECT_SYNTHETICS/stabilizationsettingsbank2.h \ - $$UAVOBJECT_SYNTHETICS/stabilizationsettingsbank3.h \ - $$UAVOBJECT_SYNTHETICS/stabilizationbank.h \ - $$UAVOBJECT_SYNTHETICS/manualcontrolsettings.h \ - $$UAVOBJECT_SYNTHETICS/manualcontrolcommand.h \ - $$UAVOBJECT_SYNTHETICS/flightmodesettings.h \ - $$UAVOBJECT_SYNTHETICS/stabilizationdesired.h \ - $$UAVOBJECT_SYNTHETICS/actuatorsettings.h \ - $$UAVOBJECT_SYNTHETICS/actuatordesired.h \ - $$UAVOBJECT_SYNTHETICS/actuatorcommand.h \ - $$UAVOBJECT_SYNTHETICS/gpspositionsensor.h \ - $$UAVOBJECT_SYNTHETICS/gpstime.h \ - $$UAVOBJECT_SYNTHETICS/gpssatellites.h \ - $$UAVOBJECT_SYNTHETICS/gpssettings.h \ - $$UAVOBJECT_SYNTHETICS/pathaction.h \ - $$UAVOBJECT_SYNTHETICS/pathdesired.h \ - $$UAVOBJECT_SYNTHETICS/pathplan.h \ - $$UAVOBJECT_SYNTHETICS/pathstatus.h \ - $$UAVOBJECT_SYNTHETICS/pathsummary.h \ - $$UAVOBJECT_SYNTHETICS/gpsvelocitysensor.h \ - $$UAVOBJECT_SYNTHETICS/positionstate.h \ - $$UAVOBJECT_SYNTHETICS/flightbatterystate.h \ - $$UAVOBJECT_SYNTHETICS/homelocation.h \ - $$UAVOBJECT_SYNTHETICS/mixersettings.h \ - $$UAVOBJECT_SYNTHETICS/mixerstatus.h \ - $$UAVOBJECT_SYNTHETICS/velocitydesired.h \ - $$UAVOBJECT_SYNTHETICS/velocitystate.h \ - $$UAVOBJECT_SYNTHETICS/groundtruth.h \ - $$UAVOBJECT_SYNTHETICS/fixedwingpathfollowersettings.h \ - $$UAVOBJECT_SYNTHETICS/fixedwingpathfollowerstatus.h \ - $$UAVOBJECT_SYNTHETICS/vtolpathfollowersettings.h \ - $$UAVOBJECT_SYNTHETICS/groundpathfollowersettings.h \ - $$UAVOBJECT_SYNTHETICS/ratedesired.h \ - $$UAVOBJECT_SYNTHETICS/firmwareiapobj.h \ - $$UAVOBJECT_SYNTHETICS/i2cstats.h \ - $$UAVOBJECT_SYNTHETICS/flightbatterysettings.h \ - $$UAVOBJECT_SYNTHETICS/taskinfo.h \ - $$UAVOBJECT_SYNTHETICS/callbackinfo.h \ - $$UAVOBJECT_SYNTHETICS/flightplanstatus.h \ - $$UAVOBJECT_SYNTHETICS/flightplansettings.h \ - $$UAVOBJECT_SYNTHETICS/flightplancontrol.h \ - $$UAVOBJECT_SYNTHETICS/watchdogstatus.h \ - $$UAVOBJECT_SYNTHETICS/nedaccel.h \ - $$UAVOBJECT_SYNTHETICS/sonaraltitude.h \ - $$UAVOBJECT_SYNTHETICS/flightstatus.h \ - $$UAVOBJECT_SYNTHETICS/hwsettings.h \ - $$UAVOBJECT_SYNTHETICS/gcsreceiver.h \ - $$UAVOBJECT_SYNTHETICS/receiveractivity.h \ - $$UAVOBJECT_SYNTHETICS/attitudesettings.h \ - $$UAVOBJECT_SYNTHETICS/txpidsettings.h \ - $$UAVOBJECT_SYNTHETICS/cameradesired.h \ - $$UAVOBJECT_SYNTHETICS/faultsettings.h \ - $$UAVOBJECT_SYNTHETICS/poilearnsettings.h \ - $$UAVOBJECT_SYNTHETICS/poilocation.h \ - $$UAVOBJECT_SYNTHETICS/oplinksettings.h \ - $$UAVOBJECT_SYNTHETICS/oplinkstatus.h \ - $$UAVOBJECT_SYNTHETICS/oplinkreceiver.h \ - $$UAVOBJECT_SYNTHETICS/radiocombridgestats.h \ - $$UAVOBJECT_SYNTHETICS/osdsettings.h \ - $$UAVOBJECT_SYNTHETICS/waypoint.h \ - $$UAVOBJECT_SYNTHETICS/waypointactive.h \ - $$UAVOBJECT_SYNTHETICS/mpu6000settings.h \ - $$UAVOBJECT_SYNTHETICS/takeofflocation.h \ - $$UAVOBJECT_SYNTHETICS/auxmagsensor.h \ - $$UAVOBJECT_SYNTHETICS/auxmagsettings.h \ - $$UAVOBJECT_SYNTHETICS/gpsextendedstatus.h \ - $$UAVOBJECT_SYNTHETICS/perfcounter.h +UAVOBJ_XML_DIR = $${ROOT_DIR}/shared/uavobjectdefinition +UAVOBJ_ROOT_DIR = $${ROOT_DIR} -SOURCES += \ - $$UAVOBJECT_SYNTHETICS/statusgrounddrive.cpp \ - $$UAVOBJECT_SYNTHETICS/statusvtolautotakeoff.cpp \ - $$UAVOBJECT_SYNTHETICS/pidstatus.cpp \ - $$UAVOBJECT_SYNTHETICS/statusvtolland.cpp \ - $$UAVOBJECT_SYNTHETICS/vtolselftuningstats.cpp \ - $$UAVOBJECT_SYNTHETICS/accelgyrosettings.cpp \ - $$UAVOBJECT_SYNTHETICS/accessorydesired.cpp \ - $$UAVOBJECT_SYNTHETICS/barosensor.cpp \ - $$UAVOBJECT_SYNTHETICS/airspeedsensor.cpp \ - $$UAVOBJECT_SYNTHETICS/airspeedsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/airspeedstate.cpp \ - $$UAVOBJECT_SYNTHETICS/attitudestate.cpp \ - $$UAVOBJECT_SYNTHETICS/attitudesimulated.cpp \ - $$UAVOBJECT_SYNTHETICS/altitudeholdsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/altitudeholdstatus.cpp \ - $$UAVOBJECT_SYNTHETICS/debuglogsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/debuglogcontrol.cpp \ - $$UAVOBJECT_SYNTHETICS/debuglogstatus.cpp \ - $$UAVOBJECT_SYNTHETICS/debuglogentry.cpp \ - $$UAVOBJECT_SYNTHETICS/altitudefiltersettings.cpp \ - $$UAVOBJECT_SYNTHETICS/ekfconfiguration.cpp \ - $$UAVOBJECT_SYNTHETICS/ekfstatevariance.cpp \ - $$UAVOBJECT_SYNTHETICS/revocalibration.cpp \ - $$UAVOBJECT_SYNTHETICS/revosettings.cpp \ - $$UAVOBJECT_SYNTHETICS/gcstelemetrystats.cpp \ - $$UAVOBJECT_SYNTHETICS/accelsensor.cpp \ - $$UAVOBJECT_SYNTHETICS/accelstate.cpp \ - $$UAVOBJECT_SYNTHETICS/gyrostate.cpp \ - $$UAVOBJECT_SYNTHETICS/gyrosensor.cpp \ - $$UAVOBJECT_SYNTHETICS/magsensor.cpp \ - $$UAVOBJECT_SYNTHETICS/magstate.cpp \ - $$UAVOBJECT_SYNTHETICS/camerastabsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/flighttelemetrystats.cpp \ - $$UAVOBJECT_SYNTHETICS/systemstats.cpp \ - $$UAVOBJECT_SYNTHETICS/systemalarms.cpp \ - $$UAVOBJECT_SYNTHETICS/objectpersistence.cpp \ - $$UAVOBJECT_SYNTHETICS/overosyncstats.cpp \ - $$UAVOBJECT_SYNTHETICS/overosyncsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/systemsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/stabilizationstatus.cpp \ - $$UAVOBJECT_SYNTHETICS/stabilizationsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/stabilizationsettingsbank1.cpp \ - $$UAVOBJECT_SYNTHETICS/stabilizationsettingsbank2.cpp \ - $$UAVOBJECT_SYNTHETICS/stabilizationsettingsbank3.cpp \ - $$UAVOBJECT_SYNTHETICS/stabilizationbank.cpp \ - $$UAVOBJECT_SYNTHETICS/manualcontrolsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/manualcontrolcommand.cpp \ - $$UAVOBJECT_SYNTHETICS/flightmodesettings.cpp \ - $$UAVOBJECT_SYNTHETICS/stabilizationdesired.cpp \ - $$UAVOBJECT_SYNTHETICS/actuatorsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/actuatordesired.cpp \ - $$UAVOBJECT_SYNTHETICS/actuatorcommand.cpp \ - $$UAVOBJECT_SYNTHETICS/gpspositionsensor.cpp \ - $$UAVOBJECT_SYNTHETICS/gpstime.cpp \ - $$UAVOBJECT_SYNTHETICS/gpssatellites.cpp \ - $$UAVOBJECT_SYNTHETICS/gpssettings.cpp \ - $$UAVOBJECT_SYNTHETICS/pathaction.cpp \ - $$UAVOBJECT_SYNTHETICS/pathdesired.cpp \ - $$UAVOBJECT_SYNTHETICS/pathplan.cpp \ - $$UAVOBJECT_SYNTHETICS/pathstatus.cpp \ - $$UAVOBJECT_SYNTHETICS/pathsummary.cpp \ - $$UAVOBJECT_SYNTHETICS/gpsvelocitysensor.cpp \ - $$UAVOBJECT_SYNTHETICS/positionstate.cpp \ - $$UAVOBJECT_SYNTHETICS/flightbatterystate.cpp \ - $$UAVOBJECT_SYNTHETICS/homelocation.cpp \ - $$UAVOBJECT_SYNTHETICS/mixersettings.cpp \ - $$UAVOBJECT_SYNTHETICS/mixerstatus.cpp \ - $$UAVOBJECT_SYNTHETICS/velocitydesired.cpp \ - $$UAVOBJECT_SYNTHETICS/velocitystate.cpp \ - $$UAVOBJECT_SYNTHETICS/groundtruth.cpp \ - $$UAVOBJECT_SYNTHETICS/fixedwingpathfollowersettings.cpp \ - $$UAVOBJECT_SYNTHETICS/fixedwingpathfollowerstatus.cpp \ - $$UAVOBJECT_SYNTHETICS/vtolpathfollowersettings.cpp \ - $$UAVOBJECT_SYNTHETICS/groundpathfollowersettings.cpp \ - $$UAVOBJECT_SYNTHETICS/ratedesired.cpp \ - $$UAVOBJECT_SYNTHETICS/firmwareiapobj.cpp \ - $$UAVOBJECT_SYNTHETICS/i2cstats.cpp \ - $$UAVOBJECT_SYNTHETICS/flightbatterysettings.cpp \ - $$UAVOBJECT_SYNTHETICS/taskinfo.cpp \ - $$UAVOBJECT_SYNTHETICS/callbackinfo.cpp \ - $$UAVOBJECT_SYNTHETICS/flightplanstatus.cpp \ - $$UAVOBJECT_SYNTHETICS/flightplansettings.cpp \ - $$UAVOBJECT_SYNTHETICS/flightplancontrol.cpp \ - $$UAVOBJECT_SYNTHETICS/watchdogstatus.cpp \ - $$UAVOBJECT_SYNTHETICS/nedaccel.cpp \ - $$UAVOBJECT_SYNTHETICS/sonaraltitude.cpp \ - $$UAVOBJECT_SYNTHETICS/uavobjectsinit.cpp \ - $$UAVOBJECT_SYNTHETICS/flightstatus.cpp \ - $$UAVOBJECT_SYNTHETICS/hwsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/gcsreceiver.cpp \ - $$UAVOBJECT_SYNTHETICS/receiveractivity.cpp \ - $$UAVOBJECT_SYNTHETICS/attitudesettings.cpp \ - $$UAVOBJECT_SYNTHETICS/txpidsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/cameradesired.cpp \ - $$UAVOBJECT_SYNTHETICS/faultsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/poilearnsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/poilocation.cpp \ - $$UAVOBJECT_SYNTHETICS/oplinksettings.cpp \ - $$UAVOBJECT_SYNTHETICS/oplinkstatus.cpp \ - $$UAVOBJECT_SYNTHETICS/oplinkreceiver.cpp \ - $$UAVOBJECT_SYNTHETICS/radiocombridgestats.cpp \ - $$UAVOBJECT_SYNTHETICS/osdsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/waypoint.cpp \ - $$UAVOBJECT_SYNTHETICS/waypointactive.cpp \ - $$UAVOBJECT_SYNTHETICS/mpu6000settings.cpp \ - $$UAVOBJECT_SYNTHETICS/takeofflocation.cpp \ - $$UAVOBJECT_SYNTHETICS/auxmagsensor.cpp \ - $$UAVOBJECT_SYNTHETICS/auxmagsettings.cpp \ - $$UAVOBJECT_SYNTHETICS/gpsextendedstatus.cpp \ - $$UAVOBJECT_SYNTHETICS/perfcounter.cpp +CONFIG(debug, debug|release) { + BUILD_CONF = debug +} else { + BUILD_CONF = release +} +win32 { + UAVOBJGENERATOR = ../../../../uavobjgenerator/$${BUILD_CONF}/uavobjgenerator.exe +} else { + UAVOBJGENERATOR = ../../../../uavobjgenerator/uavobjgenerator +} + +# Add in all of the uavobjects +UAVOBJS = \ + $${UAVOBJ_XML_DIR}/statusgrounddrive.xml \ + $${UAVOBJ_XML_DIR}/statusvtolautotakeoff.xml \ + $${UAVOBJ_XML_DIR}/pidstatus.xml \ + $${UAVOBJ_XML_DIR}/statusvtolland.xml \ + $${UAVOBJ_XML_DIR}/vtolselftuningstats.xml \ + $${UAVOBJ_XML_DIR}/accelgyrosettings.xml \ + $${UAVOBJ_XML_DIR}/accessorydesired.xml \ + $${UAVOBJ_XML_DIR}/barosensor.xml \ + $${UAVOBJ_XML_DIR}/airspeedsensor.xml \ + $${UAVOBJ_XML_DIR}/airspeedsettings.xml \ + $${UAVOBJ_XML_DIR}/airspeedstate.xml \ + $${UAVOBJ_XML_DIR}/attitudestate.xml \ + $${UAVOBJ_XML_DIR}/attitudesimulated.xml \ + $${UAVOBJ_XML_DIR}/altitudeholdsettings.xml \ + $${UAVOBJ_XML_DIR}/altitudeholdstatus.xml \ + $${UAVOBJ_XML_DIR}/altitudefiltersettings.xml \ + $${UAVOBJ_XML_DIR}/debuglogsettings.xml \ + $${UAVOBJ_XML_DIR}/debuglogcontrol.xml \ + $${UAVOBJ_XML_DIR}/debuglogstatus.xml \ + $${UAVOBJ_XML_DIR}/debuglogentry.xml \ + $${UAVOBJ_XML_DIR}/ekfconfiguration.xml \ + $${UAVOBJ_XML_DIR}/ekfstatevariance.xml \ + $${UAVOBJ_XML_DIR}/revocalibration.xml \ + $${UAVOBJ_XML_DIR}/revosettings.xml \ + $${UAVOBJ_XML_DIR}/gcstelemetrystats.xml \ + $${UAVOBJ_XML_DIR}/gyrostate.xml \ + $${UAVOBJ_XML_DIR}/gyrosensor.xml \ + $${UAVOBJ_XML_DIR}/accelsensor.xml \ + $${UAVOBJ_XML_DIR}/accelstate.xml \ + $${UAVOBJ_XML_DIR}/magsensor.xml \ + $${UAVOBJ_XML_DIR}/magstate.xml \ + $${UAVOBJ_XML_DIR}/camerastabsettings.xml \ + $${UAVOBJ_XML_DIR}/flighttelemetrystats.xml \ + $${UAVOBJ_XML_DIR}/systemstats.xml \ + $${UAVOBJ_XML_DIR}/systemalarms.xml \ + $${UAVOBJ_XML_DIR}/objectpersistence.xml \ + $${UAVOBJ_XML_DIR}/overosyncstats.xml \ + $${UAVOBJ_XML_DIR}/overosyncsettings.xml \ + $${UAVOBJ_XML_DIR}/systemsettings.xml \ + $${UAVOBJ_XML_DIR}/stabilizationstatus.xml \ + $${UAVOBJ_XML_DIR}/stabilizationsettings.xml \ + $${UAVOBJ_XML_DIR}/stabilizationsettingsbank1.xml \ + $${UAVOBJ_XML_DIR}/stabilizationsettingsbank2.xml \ + $${UAVOBJ_XML_DIR}/stabilizationsettingsbank3.xml \ + $${UAVOBJ_XML_DIR}/stabilizationbank.xml \ + $${UAVOBJ_XML_DIR}/manualcontrolsettings.xml \ + $${UAVOBJ_XML_DIR}/manualcontrolcommand.xml \ + $${UAVOBJ_XML_DIR}/flightmodesettings.xml \ + $${UAVOBJ_XML_DIR}/stabilizationdesired.xml \ + $${UAVOBJ_XML_DIR}/actuatorsettings.xml \ + $${UAVOBJ_XML_DIR}/actuatordesired.xml \ + $${UAVOBJ_XML_DIR}/actuatorcommand.xml \ + $${UAVOBJ_XML_DIR}/gpspositionsensor.xml \ + $${UAVOBJ_XML_DIR}/gpstime.xml \ + $${UAVOBJ_XML_DIR}/gpssatellites.xml \ + $${UAVOBJ_XML_DIR}/gpssettings.xml \ + $${UAVOBJ_XML_DIR}/pathaction.xml \ + $${UAVOBJ_XML_DIR}/pathdesired.xml \ + $${UAVOBJ_XML_DIR}/pathplan.xml \ + $${UAVOBJ_XML_DIR}/pathstatus.xml \ + $${UAVOBJ_XML_DIR}/pathsummary.xml \ + $${UAVOBJ_XML_DIR}/gpsvelocitysensor.xml \ + $${UAVOBJ_XML_DIR}/positionstate.xml \ + $${UAVOBJ_XML_DIR}/flightbatterystate.xml \ + $${UAVOBJ_XML_DIR}/homelocation.xml \ + $${UAVOBJ_XML_DIR}/mixersettings.xml \ + $${UAVOBJ_XML_DIR}/mixerstatus.xml \ + $${UAVOBJ_XML_DIR}/velocitydesired.xml \ + $${UAVOBJ_XML_DIR}/velocitystate.xml \ + $${UAVOBJ_XML_DIR}/groundtruth.xml \ + $${UAVOBJ_XML_DIR}/fixedwingpathfollowersettings.xml \ + $${UAVOBJ_XML_DIR}/fixedwingpathfollowerstatus.xml \ + $${UAVOBJ_XML_DIR}/vtolpathfollowersettings.xml \ + $${UAVOBJ_XML_DIR}/groundpathfollowersettings.xml \ + $${UAVOBJ_XML_DIR}/ratedesired.xml \ + $${UAVOBJ_XML_DIR}/firmwareiapobj.xml \ + $${UAVOBJ_XML_DIR}/i2cstats.xml \ + $${UAVOBJ_XML_DIR}/flightbatterysettings.xml \ + $${UAVOBJ_XML_DIR}/taskinfo.xml \ + $${UAVOBJ_XML_DIR}/callbackinfo.xml \ + $${UAVOBJ_XML_DIR}/flightplanstatus.xml \ + $${UAVOBJ_XML_DIR}/flightplansettings.xml \ + $${UAVOBJ_XML_DIR}/flightplancontrol.xml \ + $${UAVOBJ_XML_DIR}/watchdogstatus.xml \ + $${UAVOBJ_XML_DIR}/nedaccel.xml \ + $${UAVOBJ_XML_DIR}/sonaraltitude.xml \ + $${UAVOBJ_XML_DIR}/flightstatus.xml \ + $${UAVOBJ_XML_DIR}/hwsettings.xml \ + $${UAVOBJ_XML_DIR}/gcsreceiver.xml \ + $${UAVOBJ_XML_DIR}/receiveractivity.xml \ + $${UAVOBJ_XML_DIR}/attitudesettings.xml \ + $${UAVOBJ_XML_DIR}/txpidsettings.xml \ + $${UAVOBJ_XML_DIR}/cameradesired.xml \ + $${UAVOBJ_XML_DIR}/faultsettings.xml \ + $${UAVOBJ_XML_DIR}/poilearnsettings.xml \ + $${UAVOBJ_XML_DIR}/poilocation.xml \ + $${UAVOBJ_XML_DIR}/oplinksettings.xml \ + $${UAVOBJ_XML_DIR}/oplinkstatus.xml \ + $${UAVOBJ_XML_DIR}/oplinkreceiver.xml \ + $${UAVOBJ_XML_DIR}/radiocombridgestats.xml \ + $${UAVOBJ_XML_DIR}/osdsettings.xml \ + $${UAVOBJ_XML_DIR}/waypoint.xml \ + $${UAVOBJ_XML_DIR}/waypointactive.xml \ + $${UAVOBJ_XML_DIR}/mpu6000settings.xml \ + $${UAVOBJ_XML_DIR}/takeofflocation.xml \ + $${UAVOBJ_XML_DIR}/auxmagsensor.xml \ + $${UAVOBJ_XML_DIR}/auxmagsettings.xml \ + $${UAVOBJ_XML_DIR}/gpsextendedstatus.xml \ + $${UAVOBJ_XML_DIR}/perfcounter.xml + +include(uavobjgenerator.pri) diff --git a/ground/openpilotgcs/src/plugins/uavobjects/uavobjects_dependencies.pri b/ground/openpilotgcs/src/plugins/uavobjects/uavobjects_dependencies.pri index 9cf42e484..7f369f632 100644 --- a/ground/openpilotgcs/src/plugins/uavobjects/uavobjects_dependencies.pri +++ b/ground/openpilotgcs/src/plugins/uavobjects/uavobjects_dependencies.pri @@ -1,9 +1,2 @@ include(../../plugins/coreplugin/coreplugin.pri) include(../../libs/utils/utils.pri) - -# Provide the path to the auto-generated uavobject source files for the GCS. -UAVOBJECT_SYNTHETICS=$${GCS_BUILD_TREE}/../uavobject-synthetics/gcs -#message(UAVOBJECT_SYNTHETICS is $$UAVOBJECT_SYNTHETICS) - -# Add the include path to the auto-generated uavobject include files. -INCLUDEPATH += $$UAVOBJECT_SYNTHETICS diff --git a/ground/openpilotgcs/src/plugins/uavobjects/uavobjgenerator.pri b/ground/openpilotgcs/src/plugins/uavobjects/uavobjgenerator.pri new file mode 100644 index 000000000..e1e935c5e --- /dev/null +++ b/ground/openpilotgcs/src/plugins/uavobjects/uavobjgenerator.pri @@ -0,0 +1,39 @@ +UAVOBJ_INIT_CPP = uavobjectsinit.cpp +UAVOBJ_INIT_CPP_TEMPLATE = $${UAVOBJ_INIT_CPP}.template + +uavobjgenerator.input = UAVOBJS +uavobjgenerator.commands = $$shell_path($${UAVOBJGENERATOR}) -gcs $${UAVOBJ_XML_DIR} $${UAVOBJ_ROOT_DIR} ${QMAKE_FILE_BASE} +silent:uavobjgenerator.commands = @echo uavobjgenerator -gcs && $${uavobjgenerator.commands} +uavobjgenerator_header.depends = $${UAVOBJ_INIT_CPP_TEMPLATE} +uavobjgenerator.output = $${UAVOBJ_INIT_CPP} +uavobjgenerator.variable_out = SOURCES +uavobjgenerator.CONFIG += combine + +QMAKE_EXTRA_COMPILERS += uavobjgenerator + +uavobjgenerator_header.input = UAVOBJS +# We don't want any commands here because uavobjgenerator also creates .cpp, but if command is empty no rules are created +uavobjgenerator_header.commands = $$escape_expand(\\n) +uavobjgenerator_header.depends = $${UAVOBJ_INIT_CPP} +uavobjgenerator_header.output = ${QMAKE_FILE_BASE}.h # Actually generated by uavobjgenerator for this depends +uavobjgenerator_header.variable_out = UAVOBJS_HEADERS + +QMAKE_EXTRA_COMPILERS += uavobjgenerator_header + +uavobjgenerator_source.input = UAVOBJS +# We don't want any commands here because uavobjgenerator also creates .cpp, but if command is empty no rules are created +uavobjgenerator_source.commands = $$escape_expand(\\n) +uavobjgenerator_source.depends = $${UAVOBJ_INIT_CPP} +uavobjgenerator_source.output = ${QMAKE_FILE_BASE}.cpp # Actually generated by uavobjgenerator for this depends +uavobjgenerator_source.variable_out = SOURCES + +QMAKE_EXTRA_COMPILERS += uavobjgenerator_source + +# Do our own moc without moc_verify because the files aren't generated when verified +load(moc) +uavobjgenerator_moc.commands = $$moc_header.commands +uavobjgenerator_moc.output = $$moc_header.output +uavobjgenerator_moc.input = UAVOBJS_HEADERS +uavobjgenerator_moc.variable_out = GENERATED_SOURCES + +QMAKE_EXTRA_COMPILERS += uavobjgenerator_moc From d7cdc540b06f504dd0f3b56df4ce7e085d2e7fed Mon Sep 17 00:00:00 2001 From: James Duley Date: Fri, 24 Apr 2015 23:52:06 +1200 Subject: [PATCH 12/48] OP-1853 Ground build tidy: removed now unneeded uavobject-synthetics.pro --- ground/ground.pro | 14 +--- .../uavobject-synthetics.pro | 64 ------------------- 2 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 ground/uavobject-synthetics/uavobject-synthetics.pro diff --git a/ground/ground.pro b/ground/ground.pro index c3d463f52..1d8f02235 100644 --- a/ground/ground.pro +++ b/ground/ground.pro @@ -19,13 +19,6 @@ # Release builds may fail because it seems that qt-creator does not # define QTMINGW variable used to copy MinGW DLLs in release builds. # -# There is a minor problem with dependencies. qmake needs synthetic -# files when it generates GCS Makefiles. But we do not have -# uavobjgenerator built yet. So we use the following trick: at make -# stage in uavobject-synthetics we rerun qmake for openpilotgcs.pro -# and regenerate GCS Makefiles using just built synthetic files. -# It takes some extra time but solves the dependency problem. -# # Please note that this meta-project is only intended to be used by # qt-creator users. Top level Makefile handles all dependencies itself # and does not use ground.pro. @@ -38,16 +31,11 @@ TEMPLATE = subdirs SUBDIRS = \ sub_openpilotgcs \ - sub_uavobject-synthetics \ sub_uavobjgenerator # uavobjgenerator sub_uavobjgenerator.subdir = uavobjgenerator -# uavobject-synthetics -sub_uavobject-synthetics.subdir = uavobject-synthetics -sub_uavobject-synthetics.depends = sub_uavobjgenerator - # openpilotgcs sub_openpilotgcs.subdir = openpilotgcs -sub_openpilotgcs.depends = sub_uavobject-synthetics +sub_openpilotgcs.depends = sub_uavobjgenerator diff --git a/ground/uavobject-synthetics/uavobject-synthetics.pro b/ground/uavobject-synthetics/uavobject-synthetics.pro deleted file mode 100644 index a482649ac..000000000 --- a/ground/uavobject-synthetics/uavobject-synthetics.pro +++ /dev/null @@ -1,64 +0,0 @@ -# -# Qmake project for UAVObjects generation. -# Copyright (c) 2009-2013, The OpenPilot Team, http://www.openpilot.org -# - -TEMPLATE = aux - -defineReplace(addNewline) { - return($$escape_expand(\\n\\t)) -} - -# QMAKESPEC should be defined by qmake but sometimes it is not -isEmpty(QMAKESPEC) { - win32:SPEC = win32-g++ - macx-g++:SPEC = macx-g++ - linux-g++:SPEC = linux-g++ - linux-g++-32:SPEC = linux-g++ - linux-g++-64:SPEC = linux-g++-64 -} else { - SPEC = $$QMAKESPEC -} - -# Some platform-dependent options -win32|unix { - CONFIG(release, debug|release) { - BUILD_CONFIG = release - } else { - BUILD_CONFIG = debug - } -} - -win32 { - # Windows sometimes remembers working directory changed from Makefile, sometimes not. - # That's why pushd/popd is used here - to make sure that we know current directory. - - uavobjects.commands += -$(MKDIR) ../uavobject-synthetics $$addNewline() - uavobjects.commands += pushd ../uavobject-synthetics && - uavobjects.commands += ../uavobjgenerator/$${BUILD_CONFIG}/uavobjgenerator - uavobjects.commands += ../../shared/uavobjectdefinition - uavobjects.commands += ../.. && - uavobjects.commands += popd $$addNewline() - - uavobjects.commands += -$(MKDIR) ../openpilotgcs $$addNewline() - uavobjects.commands += pushd ../openpilotgcs && - uavobjects.commands += $(QMAKE) -spec $$SPEC CONFIG+=$${BUILD_CONFIG} -r - uavobjects.commands += ../../ground/openpilotgcs/openpilotgcs.pro && - uavobjects.commands += popd $$addNewline() -} - -!win32 { - uavobjects.commands += $(MKDIR) -p ../uavobject-synthetics $$addNewline() - uavobjects.commands += cd ../uavobject-synthetics && - uavobjects.commands += ../uavobjgenerator/uavobjgenerator - uavobjects.commands += ../../shared/uavobjectdefinition ../.. && - - uavobjects.commands += $(MKDIR) -p ../openpilotgcs $$addNewline() - uavobjects.commands += cd ../openpilotgcs && - uavobjects.commands += $(QMAKE) ../../ground/openpilotgcs/openpilotgcs.pro - uavobjects.commands += -spec $$SPEC CONFIG+=$${BUILD_CONFIG} -r $$addNewline() -} - -uavobjects.depends = FORCE -QMAKE_EXTRA_TARGETS += uavobjects -PRE_TARGETDEPS += uavobjects From f5160f64b05518b563d3a250f6f79f2958e0a1a7 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Wed, 13 May 2015 23:38:58 +0200 Subject: [PATCH 13/48] OP-1887 New panel behavior, open/close animation --- .../share/openpilotgcs/pfd/default/Panels.qml | 712 ++++++++++-------- .../share/openpilotgcs/pfd/default/pfd.svg | 631 +++++++++------- 2 files changed, 743 insertions(+), 600 deletions(-) diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml index 297924e15..1b9ab0049 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml @@ -6,7 +6,7 @@ Item { property real est_flight_time: Math.round(FlightBatteryState.EstimatedFlightTime) property real est_time_h: (est_flight_time > 0 ? Math.floor(est_flight_time / 3600) : 0 ) - property real est_time_m: (est_flight_time > 0 ? Math.floor((est_flight_time - est_time_h*3600)/60) : 0) + property real est_time_m: (est_flight_time > 0 ? Math.floor((est_flight_time - est_time_h*3600)/60) : 0) property real est_time_s: (est_flight_time > 0 ? Math.floor(est_flight_time - est_time_h*3600 - est_time_m*60) : 0) function formatTime(time) { @@ -23,25 +23,30 @@ Item { // property bool show_panels: false - property bool hide_display_rc: false - property bool hide_display_bat: false - property bool hide_display_oplm: false + property bool display_rc: false + property bool display_bat: false + property bool display_oplm: false + property bool display_sys: false function close_panels(){ if (show_panels == true) show_panels = false; + else + show_panels = true; } function hide_display_rcinput(){ show_panels = true; + display_oplm = false rc_input_bg.z = 10 battery_bg.z = -1 oplm_bg.z = -1 - system_bg.z = -1 + system_bg.z = -1 } function hide_display_battery(){ show_panels = true; + display_oplm = false rc_input_bg.z = 10 battery_bg.z = 20 oplm_bg.z = -1 @@ -50,6 +55,7 @@ Item { function hide_display_oplink(){ show_panels = true; + display_oplm = true rc_input_bg.z = 10 battery_bg.z = 20 oplm_bg.z = 30 @@ -58,13 +64,14 @@ Item { function hide_display_system(){ show_panels = true; + display_oplm = false rc_input_bg.z = 10 battery_bg.z = 20 oplm_bg.z = 30 system_bg.z = 40 } - // Uninitialised, Ok, Warning, Critical, Error + // Uninitialised, Ok, Warning, Critical, Error property variant batColors : ["#2c2929", "green", "orange", "red", "red"] property real smeter_angle @@ -86,16 +93,16 @@ Item { // Hack : check if telemetry is active. Works with real link and log replay - function telemetry_check(){ + function telemetry_check() { telemetry_sum = OPLinkStatus.RXRate + OPLinkStatus.RXRate - - if (telemetry_sum != telemetry_sum_old || OPLinkStatus.LinkState == 4){ + + if (telemetry_sum != telemetry_sum_old || OPLinkStatus.LinkState == 4) { telemetry_link = 1 } else { telemetry_link = 0 } telemetry_sum_old = telemetry_sum - } + } Timer { id: telemetry_activity @@ -163,11 +170,22 @@ Item { } // End Functions - // + // // Start Drawing // - // Close panel + // Animation properties + // + + property double offset_value: close_bg.width * 0.85 + + property int anim_type: Easing.InOutExpo //Easing.InOutSine Easing.InOutElastic + property real anim_amplitude: 1.2 + property real anim_period: 2 + property int duration_value: 1600 + + // + // Close - Open panel // SvgElementImage { @@ -176,18 +194,42 @@ Item { sceneSize: panels.sceneSize y: Math.floor(scaledBounds.y * sceneItem.height) - states: State { + + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: close_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (close_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: close_bg; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } } - - transitions: Transition { - SequentialAnimation { + + transitions: Transition { + SequentialAnimation { id: close_anim - PropertyAnimation { property: "x"; duration: 800 } + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } } - } + } + } + + SvgElementImage { + id: panel_open_icon + elementName: "panel-open-icon" + sceneSize: panels.sceneSize + y: Math.floor(scaledBounds.y * sceneItem.height) + z: close_bg.z+1 + opacity: show_panels == true ? 0 : 1 + + states: State { + name: "fading" + when: show_panels == true + PropertyChanges { target: panel_open_icon; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + PropertyChanges { target: panel_open_icon; opacity: 0; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + PropertyAnimation { property: "opacity"; duration: 500; } + } + } } SvgElementImage { @@ -195,25 +237,26 @@ Item { elementName: "close-panel-mousearea" sceneSize: panels.sceneSize y: Math.floor(scaledBounds.y * sceneItem.height) + z: close_bg.z+100 - MouseArea { - id: hidedisp_close; - anchors.fill: parent; - cursorShape: show_panels == true ? Qt.WhatsThisCursor : Qt.ArrowCursor + MouseArea { + id: hidedisp_close; + anchors.fill: parent; + cursorShape: Qt.PointingHandCursor onClicked: close_panels() } - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: close_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) - (close_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: close_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } } // @@ -227,18 +270,18 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: 10 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: rc_input_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: rc_input_bg; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + id: rc_input_anim + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - id: rc_input_anim - PropertyAnimation { property: "x"; duration: 800 } - } - } } SvgElementImage { @@ -248,17 +291,17 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: rc_input_bg.z+1 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: rc_input_labels; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: rc_input_labels; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } } - } + } } SvgElementImage { @@ -268,24 +311,24 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: rc_input_bg.z+1 - MouseArea { - id: hidedisp_rcinput; - anchors.fill: parent; - cursorShape: hide_display_bat == false && hide_display_oplm == false ? Qt.WhatsThisCursor : Qt.ArrowCursor - onClicked: hide_display_bat == false && hide_display_oplm == false ? hide_display_rcinput() : 0 + MouseArea { + id: hidedisp_rcinput; + anchors.fill: parent; + cursorShape: Qt.PointingHandCursor + onClicked: hide_display_rcinput() } - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: rc_input_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: rc_input_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } } - } + } } SvgElementImage { @@ -293,7 +336,7 @@ Item { elementName: "rc-throttle" sceneSize: panels.sceneSize z: rc_input_bg.z+2 - + width: scaledBounds.width * sceneItem.width height: (scaledBounds.height * sceneItem.height) * (ManualControlCommand.Throttle) @@ -301,18 +344,18 @@ Item { y: (scaledBounds.y * sceneItem.height) - rc_throttle.height + (scaledBounds.height * sceneItem.height) smooth: true - - states: State { + + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: rc_throttle; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: rc_throttle; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } } - } + } } SvgElementImage { @@ -320,7 +363,7 @@ Item { elementName: "rc-stick" sceneSize: panels.sceneSize z: rc_input_bg.z+3 - + width: scaledBounds.width * sceneItem.width height: scaledBounds.height * sceneItem.height @@ -328,7 +371,7 @@ Item { y: (scaledBounds.y * sceneItem.height) + (ManualControlCommand.Pitch * rc_stick.width * 2.5) smooth: true - + //rotate it around his center transform: Rotation { angle: ManualControlCommand.Yaw * 90 @@ -336,17 +379,17 @@ Item { origin.x : rc_stick.width / 2 } - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: rc_stick; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: rc_stick; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } } - } + } } // @@ -360,17 +403,17 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: 20 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: battery_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: battery_bg; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } } - } + } } SvgElementPositionItem { @@ -378,22 +421,22 @@ Item { sceneSize: panels.sceneSize elementName: "battery-volt-text" z: battery_bg.z+1 - + width: scaledBounds.width * sceneItem.width height: scaledBounds.height * sceneItem.height y: scaledBounds.y * sceneItem.height - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: battery_volt; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: battery_volt; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } Rectangle { anchors.fill: parent @@ -424,17 +467,17 @@ Item { height: scaledBounds.height * sceneItem.height y: scaledBounds.y * sceneItem.height - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: battery_amp; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: battery_amp; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } Rectangle { anchors.fill: parent @@ -465,17 +508,17 @@ Item { height: scaledBounds.height * sceneItem.height y: scaledBounds.y * sceneItem.height - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: battery_milliamp; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: battery_milliamp; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } Rectangle { anchors.fill: parent @@ -517,17 +560,17 @@ Item { height: scaledBounds.height * sceneItem.height y: scaledBounds.y * sceneItem.height - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: battery_estimated_flight_time; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: battery_estimated_flight_time; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } Rectangle { anchors.fill: parent @@ -567,17 +610,17 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: battery_bg.z+5 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: battery_labels; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: battery_labels; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } } SvgElementImage { @@ -587,24 +630,24 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: battery_bg.z+6 - MouseArea { - id: hidedisp_battery; - anchors.fill: parent; - cursorShape: Qt.WhatsThisCursor + MouseArea { + id: hidedisp_battery; + anchors.fill: parent; + cursorShape: Qt.PointingHandCursor onClicked: hide_display_battery() } - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: battery_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: battery_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } } // @@ -618,17 +661,17 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: 30 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: oplm_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: oplm_bg; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } } - } + } } SvgElementImage { @@ -638,17 +681,17 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: oplm_bg.z+1 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: smeter_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: smeter_bg; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } } SvgElementImage { @@ -658,17 +701,17 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: oplm_bg.z+2 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: smeter_scale; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: smeter_scale; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } } SvgElementImage { @@ -678,41 +721,44 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: oplm_bg.z+3 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: smeter_needle; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: smeter_needle; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } transform: Rotation { angle: smeter_angle.toFixed(1) - origin.y : smeter_needle.height - } + origin.y : smeter_needle.height + } } SvgElementImage { id: smeter_mask elementName: "smeter-mask" sceneSize: panels.sceneSize - y: Math.floor(scaledBounds.y * sceneItem.height) + //y: Math.floor(scaledBounds.y * sceneItem.height) + width: smeter_scale.width * 1.09 + //anchors.horizontalCenter: smeter_scale + z: oplm_bg.z+4 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: smeter_mask; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: smeter_mask; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } } @@ -721,18 +767,20 @@ Item { elementName: "oplm-button-bg" sceneSize: panels.sceneSize y: Math.floor(scaledBounds.y * sceneItem.height) + width: smeter_mask.width + z: oplm_bg.z+5 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: oplm_button_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: oplm_button_bg; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } } @@ -746,7 +794,7 @@ Item { property variant button_color: "button"+index+"_color" id: idButton_oplm - + elementName: "oplm-button-" + index sceneSize: panels.sceneSize @@ -759,23 +807,24 @@ Item { opacity: smeter_filter == index ? 0.5 : 0 } - MouseArea { - id: idButton_oplm_mousearea; - anchors.fill: parent; - cursorShape: Qt.PointingHandCursor + MouseArea { + id: idButton_oplm_mousearea; + anchors.fill: parent; + visible: display_oplm == true ? 1 : 0 + cursorShape: display_oplm == true ? Qt.PointingHandCursor : Qt.ArrowCursor onClicked: select_oplm(index) } - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: idButton_oplm; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: idButton_oplm; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } } } @@ -786,17 +835,18 @@ Item { sceneSize: panels.sceneSize y: Math.floor(scaledBounds.y * sceneItem.height) z: oplm_bg.z+6 - states: State { + + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: oplm_id_label; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: oplm_id_label; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } } SvgElementPositionItem { @@ -809,17 +859,17 @@ Item { height: scaledBounds.height * sceneItem.height y: scaledBounds.y * sceneItem.height - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: oplm_id_text; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: oplm_id_text; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } Text { text: oplm_pair_id > 0 ? oplm_pair_id.toString(16) : "-- -- -- --" @@ -841,24 +891,24 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: oplm_bg.z - MouseArea { - id: hidedisp_oplm; - anchors.fill: parent; - cursorShape: Qt.WhatsThisCursor + MouseArea { + id: hidedisp_oplm; + anchors.fill: parent; + cursorShape: Qt.PointingHandCursor onClicked: hide_display_oplink() } - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: oplm_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: oplm_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } } // @@ -872,18 +922,18 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: 40 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: system_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (system_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: system_bg; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + id: system_anim + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - id: system_anim - PropertyAnimation { property: "x"; duration: 800 } - } - } } SvgElementPositionItem { @@ -893,21 +943,21 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: system_bg.z+1 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: system_frametype; x: Math.floor(scaledBounds.x * sceneItem.width) - (system_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: system_frametype; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } Text { text: ["FixedWing", "FixedWingElevon", "FixedWingVtail", "VTOL", "HeliCP", "QuadX", "QuadP", - "Hexa+", "Octo+", "Custom", "HexaX", "HexaH", "OctoV", "OctoCoaxP", "OctoCoaxX", "OctoX", "HexaCoax", + "QuadH", "Hexa+", "Octo+", "Custom", "HexaX", "HexaH", "OctoV", "OctoCoaxP", "OctoCoaxX", "OctoX", "HexaCoax", "Tricopter", "GroundVehicleCar", "GroundVehicleDiff", "GroundVehicleMoto"][SystemSettings.AirframeType] anchors.right: parent.right color: "white" @@ -916,7 +966,7 @@ Item { pixelSize: Math.floor(parent.height * 1.4) weight: Font.DemiBold } - } + } } SvgElementPositionItem { @@ -926,17 +976,17 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: system_bg.z+1 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: system_cpuloadtemp; x: Math.floor(scaledBounds.x * sceneItem.width) - (system_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: system_cpuloadtemp; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } Text { // Coptercontrol detect with mem free : Only display Cpu load, no temperature available. @@ -949,7 +999,7 @@ Item { pixelSize: Math.floor(parent.height * 1.4) weight: Font.DemiBold } - } + } } SvgElementPositionItem { @@ -959,17 +1009,17 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: system_bg.z+1 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: system_memfree; x: Math.floor(scaledBounds.x * sceneItem.width) - (system_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: system_memfree; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } Text { text: SystemStats.HeapRemaining > 1024 ? memory_free.toFixed(2) +"Kb" : memory_free +"bytes" @@ -980,7 +1030,7 @@ Item { pixelSize: Math.floor(parent.height * 1.4) weight: Font.DemiBold } - } + } } SvgElementPositionItem { @@ -990,17 +1040,17 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: system_bg.z+1 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: system_fusion_algo; x: Math.floor(scaledBounds.x * sceneItem.width) - (system_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: system_fusion_algo; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } Text { text: ["None", "Basic (No Nav)", "CompMag", "Comp+Mag+GPS", "EKFIndoor", "GPS Nav (INS13)"][RevoSettings.FusionAlgorithm] @@ -1011,7 +1061,7 @@ Item { pixelSize: Math.floor(parent.height * 1.35) weight: Font.DemiBold } - } + } } SvgElementPositionItem { @@ -1021,17 +1071,17 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: system_bg.z+1 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: system_mag_used; x: Math.floor(scaledBounds.x * sceneItem.width) - (system_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: system_mag_used; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } Text { text: ["Invalid", "OnBoard", "External"][MagState.Source] @@ -1042,7 +1092,7 @@ Item { pixelSize: Math.floor(parent.height * 1.4) weight: Font.DemiBold } - } + } } SvgElementPositionItem { @@ -1052,17 +1102,17 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: system_bg.z+1 - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: system_gpstype; x: Math.floor(scaledBounds.x * sceneItem.width) - (system_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: system_gpstype; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } Text { text: ["Unknown", "NMEA", "UBX", "UBX7", "UBX8"][GPSPositionSensor.SensorType] @@ -1073,7 +1123,7 @@ Item { pixelSize: Math.floor(parent.height * 1.4) weight: Font.DemiBold } - } + } } SvgElementImage { @@ -1083,23 +1133,23 @@ Item { y: Math.floor(scaledBounds.y * sceneItem.height) z: system_bg.z+1 - MouseArea { - id: hidedisp_system; - anchors.fill: parent; - cursorShape: Qt.WhatsThisCursor + MouseArea { + id: hidedisp_system; + anchors.fill: parent; + cursorShape: Qt.PointingHandCursor onClicked: hide_display_system() } - states: State { + states: State { name: "fading" - when: show_panels !== true - PropertyChanges { target: system_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) - (system_bg.width * 0.85); } + when: show_panels == true + PropertyChanges { target: system_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) + offset_value; } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; easing.type: anim_type; easing.amplitude: anim_amplitude; easing.period: anim_period; duration: duration_value } + } } - - transitions: Transition { - SequentialAnimation { - PropertyAnimation { property: "x"; duration: 800 } - } - } } } diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg index 0c38221fd..5e5847221 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg @@ -15,7 +15,7 @@ height="480" id="svg2" version="1.1" - inkscape:version="0.48.5 r10040" + inkscape:version="0.91 r13725" sodipodi:docname="pfd.svg" inkscape:export-filename="/Users/muralha/Desktop/new PFD ideas/pfd/test2.png" inkscape:export-xdpi="72" @@ -320,6 +320,35 @@ x2="187.44969" y2="378.5622" gradientUnits="userSpaceOnUse" /> + + + + + + + inkscape:snap-bbox-edge-midpoints="false" + inkscape:snap-smooth-nodes="false"> image/svg+xml - + @@ -449,14 +479,12 @@ id="layer14" inkscape:label="pitch" style="display:inline" - transform="translate(0,-4)" - sodipodi:insensitive="true"> + transform="translate(0,-4)"> + style="display:inline"> + style="display:inline"> + transform="translate(89.22403,-4)"> @@ -1200,17 +1234,17 @@ id="home-eta-label" transform="matrix(1,0,0,1.0973877,0,-46.442937)"> @@ -1220,22 +1254,22 @@ id="home-distance-label" transform="matrix(1,0,0,1.0577142,0,-27.456636)"> @@ -1244,29 +1278,29 @@ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans" id="home-label"> @@ -1295,49 +1329,48 @@ inkscape:groupmode="layer" id="layer26" inkscape:label="home-eta-text" - style="display:inline" - sodipodi:insensitive="true"> + style="display:inline"> + transform="matrix(1,0,0,0.99160769,88.8,-1.9353412)"> @@ -1347,44 +1380,43 @@ inkscape:groupmode="layer" id="layer27" inkscape:label="home-distance-text" - style="display:inline" - sodipodi:insensitive="true"> + style="display:inline"> + transform="matrix(1,0,0,0.99160769,88.8,-1.9024413)"> @@ -1394,24 +1426,23 @@ inkscape:groupmode="layer" id="layer28" inkscape:label="home-heading-text" - style="display:inline" - sodipodi:insensitive="true"> + style="display:inline"> + transform="matrix(1,0,0,0.99160769,104.08151,-2.0115413)"> @@ -1422,8 +1453,7 @@ inkscape:groupmode="layer" id="layer95" inkscape:label="close-panel" - style="display:none" - sodipodi:insensitive="true"> + style="display:inline"> + + + + + + + + + + + - + + inkscape:label="close-panel-mousearea" + style="display:inline">