From 9a882811a275ecc55e507bfc04ac46dfbc805cb8 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Mon, 1 Aug 2011 12:40:45 +0300 Subject: [PATCH 1/5] packaging: put only CC firmware into the distributable package All firmware still will be built, but only CC firmware is packaged to prevent abuse of bootloader updaters etc. --- package/osx/package | 3 ++- package/winx86/openpilotgcs.nsi | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package/osx/package b/package/osx/package index a12e7e9fe..9a8108015 100755 --- a/package/osx/package +++ b/package/osx/package @@ -20,7 +20,8 @@ device=$(hdiutil attach "${TEMP_FILE}" | \ # packaging goes here cp -r "${APP_PATH}" "/Volumes/${VOL_NAME}" -cp -r "${FW_DIR}" "/Volumes/${VOL_NAME}/firmware" +#cp -r "${FW_DIR}" "/Volumes/${VOL_NAME}/firmware" +cp "${FW_DIR}/fw_coptercontrol-${PACKAGE_LBL}.opfw" "/Volumes/${VOL_NAME}/firmware" "${ROOT_DIR}/package/osx/libraries" \ "/Volumes/${VOL_NAME}/OpenPilot GCS.app" || exit 1 diff --git a/package/winx86/openpilotgcs.nsi b/package/winx86/openpilotgcs.nsi index 9a61e4f96..e5f9eddb6 100644 --- a/package/winx86/openpilotgcs.nsi +++ b/package/winx86/openpilotgcs.nsi @@ -185,8 +185,10 @@ Section "Localization" InSecLocalization SectionEnd Section "Firmware" InSecFirmware - SetOutPath "$INSTDIR\firmware\${FIRMWARE_DIR}" - File /r "${PACKAGE_DIR}\${FIRMWARE_DIR}\*" +; SetOutPath "$INSTDIR\firmware\${FIRMWARE_DIR}" +; File /r "${PACKAGE_DIR}\${FIRMWARE_DIR}\*" + SetOutPath "$INSTDIR\firmware" + File /r "${PACKAGE_DIR}\${FIRMWARE_DIR}\fw_coptercontrol-${PACKAGE_LBL}.opfw" SectionEnd Section "Shortcuts" InSecShortcuts From a641cd79566c00ea9ecbcd0a9b0cd210c469d243 Mon Sep 17 00:00:00 2001 From: Stacey Sheldon Date: Wed, 3 Aug 2011 00:00:50 -0400 Subject: [PATCH 2/5] uavobj: shrink metadata struct to save RAM This update saves 448 bytes of RAM with the current crop of UAVObjects. It reduces a 19 byte struct to 8 bytes. Note: This also introduces a limit of 65.534s for the update periods. --- flight/UAVObjects/inc/uavobjectmanager.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/flight/UAVObjects/inc/uavobjectmanager.h b/flight/UAVObjects/inc/uavobjectmanager.h index ac5d34b5c..600522420 100644 --- a/flight/UAVObjects/inc/uavobjectmanager.h +++ b/flight/UAVObjects/inc/uavobjectmanager.h @@ -59,16 +59,20 @@ typedef enum { * properties for each object and can be used by multiple modules (e.g. telemetry and logger) */ typedef struct { - uint8_t access; /** Defines the access level for the local transactions (readonly and readwrite) */ - uint8_t gcsAccess; /** Defines the access level for the local GCS transactions (readonly and readwrite), not used in the flight s/w */ - uint8_t telemetryAcked; /** Defines if an ack is required for the transactions of this object (1:acked, 0:not acked) */ - uint8_t telemetryUpdateMode; /** Update mode used by the telemetry module (UAVObjUpdateMode) */ - uint32_t telemetryUpdatePeriod; /** Update period used by the telemetry module (only if telemetry mode is PERIODIC) */ - uint8_t gcsTelemetryAcked; /** Defines if an ack is required for the transactions of this object (1:acked, 0:not acked) */ - uint8_t gcsTelemetryUpdateMode; /** Update mode used by the GCS (UAVObjUpdateMode) */ - uint32_t gcsTelemetryUpdatePeriod; /** Update period used by the GCS (only if telemetry mode is PERIODIC) */ - uint8_t loggingUpdateMode; /** Update mode used by the logging module (UAVObjUpdateMode) */ - uint32_t loggingUpdatePeriod; /** Update period used by the logging module (only if logging mode is PERIODIC) */ + uint8_t access : 1; /** Defines the access level for the local transactions (readonly and readwrite) */ + uint8_t gcsAccess : 1; /** Defines the access level for the local GCS transactions (readonly and readwrite), not used in the flight s/w */ + uint8_t telemetryAcked : 1; /** Defines if an ack is required for the transactions of this object (1:acked, 0:not acked) */ + uint8_t gcsTelemetryAcked : 1; /** Defines if an ack is required for the transactions of this object (1:acked, 0:not acked) */ + uint8_t : 4; + + uint8_t telemetryUpdateMode : 2; /** Update mode used by the telemetry module (UAVObjUpdateMode) */ + uint8_t gcsTelemetryUpdateMode : 2; /** Update mode used by the GCS (UAVObjUpdateMode) */ + uint8_t loggingUpdateMode : 2; /** Update mode used by the logging module (UAVObjUpdateMode) */ + uint8_t : 2; + + uint16_t gcsTelemetryUpdatePeriod; /** Update period used by the GCS (only if telemetry mode is PERIODIC) */ + uint16_t telemetryUpdatePeriod; /** Update period used by the telemetry module (only if telemetry mode is PERIODIC) */ + uint16_t loggingUpdatePeriod; /** Update period used by the logging module (only if logging mode is PERIODIC) */ } __attribute__((packed)) UAVObjMetadata; /** From 8ad65f6583f73e75939bf01f22978d65983ce2dc Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Thu, 4 Aug 2011 11:23:00 +0300 Subject: [PATCH 3/5] Convert HISTORY.txt file to DOS format (readable on all platforms) --- HISTORY.txt | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/HISTORY.txt b/HISTORY.txt index 9eb8aee0f..27b986ebb 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,26 +1,26 @@ -Short summary of changes. For a complete list see the git log. - -2011-07-29 -Added support for PPM receivers from James W. Now all 4 interfaces (R/C -standard PWM, combined PPM (MK), Spektrum satellite, Futaba S.Bus) are -supported and configurable through the GCS hardware configuration tab. - -2011-07-17 -Updated module initialization from Mathieu which separates the initialization -from the task startup. Also implements a method to reclaim unused ram from -initialization and end of memory for the FreeRTOS heap. - -2011-07-12 -Improvements to the stabilization code. Included a LPF on the gyros to smooth -out noise in high vibration environments. Also two new modes: axis-lock and -weak leveling. Axis-lock will try and hold an axis at a fixed position and -reject any disturbances. This is like heading-hold on a heli for the tail but -can be useful for other axes. Weak leveling is rate mode with a weak -correction to self level the craft - good for easier rate mode flying. - -2011-07-07 -Dynamic hardware configuration from Stac. The input type is now -selected from ManualControlSettings.InputMode and the aircraft must be rebooted -after changing this. Also for CopterControl the HwSettings object must -indicate which modules are connected to which ports. PPM currently not -working. +Short summary of changes. For a complete list see the git log. + +2011-07-29 +Added support for PPM receivers from James W. Now all 4 interfaces (R/C +standard PWM, combined PPM (MK), Spektrum satellite, Futaba S.Bus) are +supported and configurable through the GCS hardware configuration tab. + +2011-07-17 +Updated module initialization from Mathieu which separates the initialization +from the task startup. Also implements a method to reclaim unused ram from +initialization and end of memory for the FreeRTOS heap. + +2011-07-12 +Improvements to the stabilization code. Included a LPF on the gyros to smooth +out noise in high vibration environments. Also two new modes: axis-lock and +weak leveling. Axis-lock will try and hold an axis at a fixed position and +reject any disturbances. This is like heading-hold on a heli for the tail but +can be useful for other axes. Weak leveling is rate mode with a weak +correction to self level the craft - good for easier rate mode flying. + +2011-07-07 +Dynamic hardware configuration from Stac. The input type is now +selected from ManualControlSettings.InputMode and the aircraft must be rebooted +after changing this. Also for CopterControl the HwSettings object must +indicate which modules are connected to which ports. PPM currently not +working. From 6e5e80769183e03c719be1686d33175c8651e959 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Thu, 4 Aug 2011 12:51:05 +0300 Subject: [PATCH 4/5] Windows installer: add HISTORY.txt and web links to the Start menu --- package/winx86/openpilotgcs.nsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/package/winx86/openpilotgcs.nsi b/package/winx86/openpilotgcs.nsi index e5f9eddb6..9e3fa2ec3 100644 --- a/package/winx86/openpilotgcs.nsi +++ b/package/winx86/openpilotgcs.nsi @@ -33,6 +33,7 @@ ; Paths ; Tree root locations (relative to this script location) + !define PROJECT_ROOT "..\.." !define NSIS_DATA_TREE "." !define GCS_BUILD_TREE "..\..\build\ground\openpilotgcs" @@ -151,6 +152,8 @@ Section "Core files" InSecCore SectionIn RO SetOutPath "$INSTDIR\bin" File /r "${GCS_BUILD_TREE}\bin\*" + SetOutPath "$INSTDIR" + File "${PROJECT_ROOT}\HISTORY.txt" SectionEnd Section "Plugins" InSecPlugins @@ -197,6 +200,14 @@ Section "Shortcuts" InSecShortcuts CreateDirectory "$SMPROGRAMS\OpenPilot" CreateShortCut "$SMPROGRAMS\OpenPilot\OpenPilot GCS.lnk" "$INSTDIR\bin\openpilotgcs.exe" \ "" "$INSTDIR\bin\openpilotgcs.exe" 0 "" "" "${PRODUCT_NAME} ${PRODUCT_VERSION}. ${BUILD_DESCRIPTION}" + CreateShortCut "$SMPROGRAMS\OpenPilot\OpenPilot ChangeLog.lnk" "$INSTDIR\HISTORY.txt" \ + "" "$INSTDIR\bin\openpilotgcs.exe" 0 + CreateShortCut "$SMPROGRAMS\OpenPilot\OpenPilot Website.lnk" "http://www.openpilot.org" \ + "" "$INSTDIR\bin\openpilotgcs.exe" 0 + CreateShortCut "$SMPROGRAMS\OpenPilot\OpenPilot Wiki.lnk" "http://wiki.openpilot.org" \ + "" "$INSTDIR\bin\openpilotgcs.exe" 0 + CreateShortCut "$SMPROGRAMS\OpenPilot\OpenPilot Forums.lnk" "http://forums.openpilot.org" \ + "" "$INSTDIR\bin\openpilotgcs.exe" 0 CreateShortCut "$DESKTOP\OpenPilot GCS.lnk" "$INSTDIR\bin\openpilotgcs.exe" \ "" "$INSTDIR\bin\openpilotgcs.exe" 0 "" "" "${PRODUCT_NAME} ${PRODUCT_VERSION}. ${BUILD_DESCRIPTION}" CreateShortCut "$SMPROGRAMS\OpenPilot\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0 @@ -247,6 +258,7 @@ Section "un.OpenPilot GCS" UnSecProgram RMDir /r /rebootok "$INSTDIR\lib" RMDir /r /rebootok "$INSTDIR\share" RMDir /r /rebootok "$INSTDIR\firmware" + Delete /rebootok "$INSTDIR\HISTORY.txt" Delete /rebootok "$INSTDIR\Uninstall.exe" ; Remove directory From bac783631873ab6fea716447abde112cc7cbc390 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Thu, 4 Aug 2011 07:17:36 -0500 Subject: [PATCH 5/5] Revert "uavobj: shrink metadata struct to save RAM". I was premature merging this to next as it changes the on-the-wire representation and thus doesn't allow GCS to set the metadata. This reverts commit a641cd79566c00ea9ecbcd0a9b0cd210c469d243. --- flight/UAVObjects/inc/uavobjectmanager.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/flight/UAVObjects/inc/uavobjectmanager.h b/flight/UAVObjects/inc/uavobjectmanager.h index 600522420..ac5d34b5c 100644 --- a/flight/UAVObjects/inc/uavobjectmanager.h +++ b/flight/UAVObjects/inc/uavobjectmanager.h @@ -59,20 +59,16 @@ typedef enum { * properties for each object and can be used by multiple modules (e.g. telemetry and logger) */ typedef struct { - uint8_t access : 1; /** Defines the access level for the local transactions (readonly and readwrite) */ - uint8_t gcsAccess : 1; /** Defines the access level for the local GCS transactions (readonly and readwrite), not used in the flight s/w */ - uint8_t telemetryAcked : 1; /** Defines if an ack is required for the transactions of this object (1:acked, 0:not acked) */ - uint8_t gcsTelemetryAcked : 1; /** Defines if an ack is required for the transactions of this object (1:acked, 0:not acked) */ - uint8_t : 4; - - uint8_t telemetryUpdateMode : 2; /** Update mode used by the telemetry module (UAVObjUpdateMode) */ - uint8_t gcsTelemetryUpdateMode : 2; /** Update mode used by the GCS (UAVObjUpdateMode) */ - uint8_t loggingUpdateMode : 2; /** Update mode used by the logging module (UAVObjUpdateMode) */ - uint8_t : 2; - - uint16_t gcsTelemetryUpdatePeriod; /** Update period used by the GCS (only if telemetry mode is PERIODIC) */ - uint16_t telemetryUpdatePeriod; /** Update period used by the telemetry module (only if telemetry mode is PERIODIC) */ - uint16_t loggingUpdatePeriod; /** Update period used by the logging module (only if logging mode is PERIODIC) */ + uint8_t access; /** Defines the access level for the local transactions (readonly and readwrite) */ + uint8_t gcsAccess; /** Defines the access level for the local GCS transactions (readonly and readwrite), not used in the flight s/w */ + uint8_t telemetryAcked; /** Defines if an ack is required for the transactions of this object (1:acked, 0:not acked) */ + uint8_t telemetryUpdateMode; /** Update mode used by the telemetry module (UAVObjUpdateMode) */ + uint32_t telemetryUpdatePeriod; /** Update period used by the telemetry module (only if telemetry mode is PERIODIC) */ + uint8_t gcsTelemetryAcked; /** Defines if an ack is required for the transactions of this object (1:acked, 0:not acked) */ + uint8_t gcsTelemetryUpdateMode; /** Update mode used by the GCS (UAVObjUpdateMode) */ + uint32_t gcsTelemetryUpdatePeriod; /** Update period used by the GCS (only if telemetry mode is PERIODIC) */ + uint8_t loggingUpdateMode; /** Update mode used by the logging module (UAVObjUpdateMode) */ + uint32_t loggingUpdatePeriod; /** Update period used by the logging module (only if logging mode is PERIODIC) */ } __attribute__((packed)) UAVObjMetadata; /**