From ce7f8eec7bb8b8f4501d35b3f5c86b81612ad4e9 Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Fri, 27 Jun 2014 19:16:12 +0200 Subject: [PATCH 01/11] Update WhatsNew and Credits for release --- CREDITS.txt | 5 ++- WHATSNEW.txt | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 1 deletion(-) diff --git a/CREDITS.txt b/CREDITS.txt index 1f55e7f34..1f79a6ac7 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -89,7 +89,6 @@ Mat Wellington Kendal Wells David Willis Dmitriy Zaitsev -Bertrand Songis Andre Bernet Anthony Gomes Cliff Geerdes @@ -99,3 +98,7 @@ Laurent Lalanne Patrick Huebner Rich von Lehe Stefan Cenkov +Andrés Chavarría Krauser +Bertrand Oresve +Cosimo Corrado + diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 2cb236948..ee79f820a 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,3 +1,118 @@ +--- RELEASE-14.06 --- Peanuts Schnapps --- +This is the Mid 2014 release. +This version still supports the CopterControl and CC3D. +It includes several additions and changes aimed at gps/navigation functionalities +(that are expected to be fully available on next release). + +Some additions in this release: +- Addition of GPS assisted flight modes for revo: - Return To Base, Position hold, AutoCruise and Position Vario(LOS, FPV and NSEW); +- Stabilization refactoring that enhance rate performances; +- Sensor calibration has been redesigned for better usability; + +The full list of features, improvements and bugfixes in this release is accessible here: + +http://progress.openpilot.org/issues/?filter=11460 + +** New Feature & Improvements + * [OP-943] - Start using F4's Core Coupled RAM for more than just the IRQ handler stack + * [OP-974] - Make Bootloader Version available while flight software is running + * [OP-975] - Reconsider the calibration process + * [OP-1068] - Add support for magnetometer calibration matrix in place of scaling parameters + * [OP-1149] - Handle thermal bias calculation/calibration to gyro and accel + * [OP-1150] - Create UI to allow users to perform board thermal calibration + * [OP-1159] - Remove "Rev" checkboxes on input tab for channels on which it doesn't have an effect + * [OP-1161] - Add Alarm for Magnetometer if disturbed or uncalibrated + * [OP-1174] - Beautify Uploader gadget popups + * [OP-1194] - Scope gadget - plot and legend visibility state should be persisted between runs + * [OP-1198] - Allow GCS gadgets to save/restore individual state + * [OP-1216] - Refactor Flight Control Modules + * [OP-1230] - Automatically load the correct firmware file when GCS is running in a development environment + * [OP-1233] - Add make options to skip qmake and build a specific GCS directory + * [OP-1245] - Add GUI to control if, what, when and how to do flight side logging. + * [OP-1250] - Add GPS Protocol configuration in the Hardware configuration panel + * [OP-1258] - Update GCC ARM Embedded to 4.8-2014-q1 + * [OP-1259] - Cruise Control tweaks + * [OP-1260] - Rattitude tweaks + * [OP-1273] - Implementation of the PixHawk airspeed sensor based on the MS4525DO + * [OP-1282] - Include I2C Alarm into Eagletree speed sensor module + * [OP-1287] - GPS assisted flight for Revo + * [OP-1299] - Autodetect number of cells in Battery module + * [OP-1302] - Improve on board led functionality + * [OP-1303] - Add PathPlan Alarm in System Health + * [OP-1307] - Create a bare DiscoveryF4 target for debugging and development purposes + * [OP-1308] - Set the same logic to CRITICAL Alarm and same logic to ERROR Alarm + * [OP-1312] - Implement a PIOS WS281x driver + * [OP-1319] - Fix minor spelling mistakes in fw code + * [OP-1335] - ConfigTaskWidget - Add support to bind GComboBox to integer property + * [OP-1339] - System Health panel improvement + * [OP-1350] - TakeOff location handling to be used with RTH + * [OP-1365] - Add instrumentation functions for flight code + +** Bug + * [OP-1026] - Provide some standard method of calibrating CPU speed and load measurement for boards + * [OP-1033] - Data transfer errors on USB HID on F1 devices + * [OP-1043] - Ground OPLinkMini refuses to connect to one Revo unless first connected to another Revo + * [OP-1056] - GPS does not set home location when erased after lock has been established + * [OP-1080] - Unreliable detection of board through OPLink + * [OP-1100] - GCS plist for mac shows wrong associated filetypes, leftover from qtcreator + * [OP-1131] - Firmware mismatch check is not done if Uploader gadget is not active + * [OP-1172] - Some fonts are not defined in config files + * [OP-1196] - Board rotation in GCS not shown correctly upon connection but correctly saved in memory + * [OP-1212] - Fix Priority queue handling in telemetry + * [OP-1227] - High CPU load in ratitude mode on CopterControl + * [OP-1232] - Setting high telemetry rates for periodic uavobject triggers eventsystem warning. + * [OP-1235] - Some fixes for altitude estimation + * [OP-1237] - Blank/Black Buttons on Vehicle Configuration Multirotor Throttle Curve + * [OP-1241] - TxPID Does not work for Bank 3 PID settings + * [OP-1243] - OPMap widget context menu duplicating some menu separators each time its opened + * [OP-1252] - Update GCS to qt 5.2.1 + * [OP-1266] - Gyro and accel thermal compensation is not applied if one or more coefficients have negative value + * [OP-1267] - Incorrect UAV position on GCS OPMap after homeLocation modification + * [OP-1272] - Unable to debug in SWD mode a revo board + * [OP-1283] - SystemHealthGadgetWidget::updateAlarms misinterprets coordinates in SVG file + * [OP-1284] - RTB flies into ground if base is high + * [OP-1285] - Erase Settings ToolTip is wrong + * [OP-1286] - GCS Map "Go To Place" doesn't work + * [OP-1288] - GPS PositionHold immediately flies several meters away if Home is not close + * [OP-1291] - Fix matlab import after UAVTalk changes + * [OP-1294] - Fix stack sizes for CopterControl + * [OP-1295] - Autoupdate not working + * [OP-1296] - Altitude Hold causes copter to ascent at full throttle when far from home location + * [OP-1297] - OPMap fails to read in saved waypoints correctly + * [OP-1300] - SystemHealth gadget does not show "Configuration Alarm" + * [OP-1301] - Hardware settings can't be saved with CC/CC3D + * [OP-1304] - Revo stack alarm + * [OP-1314] - Fix Airspeed stack size + * [OP-1315] - Unable to arm UAV when AirspeedSensorType is set to GroundspeedBaseWindEstimation + * [OP-1323] - GCS font fixes + * [OP-1325] - Fix event system warnings to be errors + * [OP-1326] - Set AIrspeedSensor default back to "None" + * [OP-1327] - SystemAlarms must be non-acked + * [OP-1329] - Various fixes to airspeed module + * [OP-1330] - Cannot set homelocation.set=false when gps reception is optimal + * [OP-1331] - Input and Output Channel Configuration alignments issues + * [OP-1332] - PiOS alarms does not reset alarm state on timer overflow + * [OP-1333] - Output Channel Configuration alignments issues + * [OP-1340] - Auto-update greyed out - not available + * [OP-1343] - GCS Configuration - Input Channel ResponseTime not saved + * [OP-1346] - Input Channel Response Time mismatch between GCS config screen and UAVObject + * [OP-1348] - Config Gadget flashes next panel when connecting/disconnecting board + * [OP-1351] - GCS Calibration UI polishing + * [OP-1352] - Headwind-improvements for FixedWingPathFollower + * [OP-1353] - HITL Flightgear fails to set Position and velocity correctly + * [OP-1354] - Current and voltage not shown in PFD + * [OP-1355] - Magnetometer calibration and board rotation don't play along + * [OP-1363] - Sanitychecks MUST check if magnetometers and GPS are enabled for any pathfollower modes (outdoor mode selected) + * [OP-1371] - Sanitychecks overzealous: hitl/sitl broken + +** Tasks + * [OP-1274] - Update FreeRTOS to 8.0 + * [OP-1337] - French translations updates (14.04/05) + * [OP-1254] - Update to QT5.2.1 for Linux x86/64 + * [OP-1263] - Move SDL out of Qt install + * [OP-1309] - Stabilization refactoring + + --- RELEASE-14.01 --- Cruising Ratt --- This is the first 2014 software release. This version still supports the CopterControl and CC3D. From 1ed2dbfe293452fa16a0c63611bf903f5886477d Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sat, 28 Jun 2014 11:06:33 +0200 Subject: [PATCH 02/11] OP-1337 Little typo error --- .../share/openpilotgcs/translations/openpilotgcs_fr.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts b/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts index d1b8b7b49..c7a8fa26a 100644 --- a/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts +++ b/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts @@ -11501,7 +11501,7 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende.Settings cannot be recovered after this operation. The board will be restarted and all settings erased. Les paramètres ne pourront être récupérés après cette opération. -La carte sera redémarrée et tous les paramètres éffacés. +La carte sera redémarrée et tous les paramètres effacés. From dcaa9e19ca66e45b22b5e7d0633efffb99751ded Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sat, 28 Jun 2014 14:17:32 +0200 Subject: [PATCH 03/11] OP-1337 Translations fixes --- .../translations/openpilotgcs_fr.ts | 100 +++++++++--------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts b/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts index c7a8fa26a..ce758d8b9 100644 --- a/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts +++ b/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts @@ -7161,27 +7161,27 @@ p, li { white-space: pre-wrap; } Accelerometer calibration - Étalonnage accéléromètres + Étalonnage des accéléromètres Magnetometer calibration - Étalonnage magnétomètre + Étalonnage du magnétomètre Board level calibration - Étalonnage du niveau de la carte + Étalonnage du niveau de la carte Gyro bias calibration - Étalonnage de l'ajustement des Gyros + Étalonnage de l'ajustement des gyroscopes Thermal calibration - Étalonnage de la compensation de température + Étalonnage de la compensation en température @@ -7210,7 +7210,7 @@ p, li { white-space: pre-wrap; } Help - Aide + Aide @@ -14106,12 +14106,12 @@ et même conduire au crash. A utiliser avec prudence. Calibrating the gyroscopes. Keep the vehicle steady... - Étalonnage en cours des gyroscopes. Maintenez l'appareil sans le bouger... + Étalonnage en cours des gyroscopes. Maintenez l'appareil sans le bouger... Gyroscope calibration completed successfully. - Étalonnage des gyroscopes calculé avec succès. + Étalonnage des gyroscopes calculé avec succès. @@ -14123,7 +14123,7 @@ et même conduire au crash. A utiliser avec prudence. Place horizontally and press Save Position... - + Positionner horizontalement et cliquer sur le bouton Enregistrer Position... @@ -14133,12 +14133,12 @@ et même conduire au crash. A utiliser avec prudence. Leave horizontally, rotate 180° along yaw axis and press Save Position... - + Garder horizontalement, tourner de 180° sur l'axe de Yaw et cliquer sur le bouton Enregistrer Position... Board level calibration completed successfully. - + Mise à niveau de la carte calculé avec succès. Leave horizontally, rotate 180° along yaw axis and click Save Position button... @@ -14206,92 +14206,92 @@ et même conduire au crash. A utiliser avec prudence. Place horizontally, nose pointing north and press Save Position... - Positionner horizontalement, le nez en direction du nord et cliquer sur le bouton Enregistrer Position... + Positionner horizontalement, le nez en direction du nord et cliquer sur le bouton Enregistrer Position... Place with nose down, right side west and press Save Position... - Positionner avec le nez vers le bas, le coté droit vers l'ouest et cliquer sur le bouton Enregistrer Position... + Positionner avec le nez vers le bas, le coté droit vers l'ouest et cliquer sur le bouton Enregistrer Position... Place right side down, nose west and press Save Position... - Positionner le flanc droit vers le bas, le nez en direction de l'ouest et cliquer sur le bouton Enregistrer Position... + Positionner le flanc droit vers le bas, le nez en direction de l'ouest et cliquer sur le bouton Enregistrer Position... Place upside down, nose east and press Save Position... - Positionner à l'envers, le nez vers l'est et cliquer sur le bouton Enregistrer Position... + Positionner à l'envers, le nez vers l'est et cliquer sur le bouton Enregistrer Position... Place with nose up, left side north and press Save Position... - Positionner le nez vers le haut, le flanc droit vers le nord et cliquer sur le bouton Enregistrer Position... + Positionner le nez vers le haut, le flanc gauche vers le nord et cliquer sur le bouton Enregistrer Position... Place with left side down, nose south and press Save Position... - Positionner avec le flanc gauche vers le bas, le nez vers le sud et cliquer sur le bouton Enregistrer Position... + Positionner avec le flanc gauche vers le bas, le nez vers le sud et cliquer sur le bouton Enregistrer Position... Place horizontally and press Save Position... - Positionner horizontalement et cliquer sur le bouton Enregistrer Position... + Positionner horizontalement et cliquer sur le bouton Enregistrer Position... Place with nose down and press Save Position... - Positionner avec le nez vers le bas et cliquer sur le bouton Enregistrer Position... + Positionner avec le nez vers le bas et cliquer sur le bouton Enregistrer Position... Place right side down and press Save Position... - Positionner le flanc droit vers le bas et cliquer sur le bouton Enregistrer Position... + Positionner le flanc droit vers le bas et cliquer sur le bouton Enregistrer Position... Place upside down and press Save Position... - Positionner à l'envers et cliquer sur le bouton Enregistrer Position... + Positionner à l'envers et cliquer sur le bouton Enregistrer Position... Place with nose up and press Save Position... - Positionner avec le nez vers le haut et cliquer sur le bouton Enregistrer Position... + Positionner avec le nez vers le haut et cliquer sur le bouton Enregistrer Position... Place with left side down and press Save Position... - Positionner le flanc gauche vers le bas et cliquer sur le bouton Enregistrer Position... + Positionner le flanc gauche vers le bas et cliquer sur le bouton Enregistrer Position... Home location not set, please set your home location and retry. - Position Home non définie, veuillez régler votre position Home et essayez à nouveau. + Position Home non définie, veuillez régler votre position Home et essayez à nouveau. Aborting calibration! - Étalonnage abandonné ! + Étalonnage abandonné ! Hold... - Maintenir en position... + Maintenir en position... Magnetometer calibration completed successfully. - Étalonnage du magnétomètre terminée avec succès. + Étalonnage du magnétomètre terminé avec succès. Accelerometer calibration completed successfully. - Étalonnage des accéléromètres terminée avec succès. + Étalonnage des accéléromètres terminé avec succès. Calibration failed! Please review the help and retry. - Échec étalonnage ! Veuillez lire les instructions et essayer à nouveau. + Échec étalonnage ! Veuillez lire les instructions et essayer à nouveau. Sensor scale and bias computed succesfully. @@ -14316,12 +14316,12 @@ et même conduire au crash. A utiliser avec prudence. Thermal calibration completed successfully. - Étalonnage terminé avec succès. + Étalonnage température terminé avec succès. Calibration failed! Please review the help and retry. - Échec étalonnage ! Veuillez relire les instructions et essayer à nouveau. + Échec étalonnage ! Veuillez relire les instructions et essayer à nouveau. @@ -14391,13 +14391,13 @@ et même conduire au crash. A utiliser avec prudence. Timing out in %1 seconds Expiration du temps d'attente dans %1 secondes - Shorted / size allowed - Expiration dans %1 secondes + Expiration dans %1 secondes Timed out after %1 seconds Expiration du temps d'attente après %1 secondes Shorted : size allowed - Expiration après %1 secondes + Expiration après %1 secondes @@ -14405,7 +14405,7 @@ et même conduire au crash. A utiliser avec prudence. Configuring board for calibration. - + Configuration de la carte pour la calibration. @@ -14413,22 +14413,22 @@ et même conduire au crash. A utiliser avec prudence. Please wait during samples acquisition. This can take several minutes... - Veuillez attendre pendant l'acquisition des échantillons. Cela peut plusieurs minutes... + Veuillez attendre pendant l'acquisition des échantillons. Cela peut prendre plusieurs minutes... Acquisition will run until the rate of temperature change is less than %1°C/min. - L'acquisition s'effectue jusqu'à ce que le changement de température soit inférieur à %1°C/min. + L'acquisition s'effectue jusqu'à ce que le changement de température soit inférieur à %1°C/min. For the calibration to be valid, the temperature span during acquisition must be greater than %1°C. - Pour que la calibration soit valide, la différence de température durant l'acquisition doit être supérieure à %1°C. + Pour que la calibration soit valide, la différence de température durant l'acquisition doit être supérieure à %1°C. Estimating acquisition duration... - Estimation de la durée d'acquisition... + Estimation de la durée d'acquisition... @@ -14436,7 +14436,7 @@ et même conduire au crash. A utiliser avec prudence. Saving initial settings. - + Enregistrement des paramètres initiaux. @@ -14444,7 +14444,7 @@ et même conduire au crash. A utiliser avec prudence. Restoring board configuration. - + Restauration des paramètres de la carte. @@ -14452,37 +14452,37 @@ et même conduire au crash. A utiliser avec prudence. Barometer is calibrated. - Baromètre calibré. + Le baromètre est calibré. Failed to calibrate barometer! - Échec de la calibration du baromètre ! + Échec de la calibration du baromètre ! Gyro is calibrated. - Gyroscope calibré. + Les gyroscopes sont calibrés. Failed to calibrate gyro! - Échec de la calibration des gyroscopes ! + Échec de la calibration des gyroscopes ! Target temperature span has been acquired. You may now end acquisition or continue. - La différence de température a été atteinte. Vous pouvez arrêter maintenant ou continuer. + La différence de température a été atteinte. Vous pouvez arrêter maintenant ou continuer. m''s'''' - + Estimated acquisition duration is %1. - La durée estimée d'acquisition est de %1. + La durée estimée de l'acquisition est de %1. @@ -14490,17 +14490,17 @@ et même conduire au crash. A utiliser avec prudence. Temperature: %1°C - Température : %1°C + Température : %1°C Variance: %1°C/min - Variation : %1°C/min + Variation : %1°C/min Sampled range: %1°C - Plage d'échantillonnage : %1°C + Plage d'échantillonnage : %1°C From fdbe58e8e6f6ecbf4ff44381b75d88699a610eae Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Sun, 29 Jun 2014 16:06:54 +0200 Subject: [PATCH 04/11] OP-1375 Update Mag Ki and Kp default settings --- shared/uavobjectdefinition/attitudesettings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/uavobjectdefinition/attitudesettings.xml b/shared/uavobjectdefinition/attitudesettings.xml index 208fd49ba..1c1ad6b8d 100644 --- a/shared/uavobjectdefinition/attitudesettings.xml +++ b/shared/uavobjectdefinition/attitudesettings.xml @@ -4,8 +4,8 @@ - - + + From 52a909185b6cf209372d9f44e9de4e6ced53e724 Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Sun, 29 Jun 2014 17:22:41 +0200 Subject: [PATCH 05/11] OP-1374 - Add sanitycheck API to detect frame type --- flight/libraries/inc/sanitycheck.h | 10 +++++ flight/libraries/sanitycheck.c | 59 ++++++++++++++++++++---------- 2 files changed, 50 insertions(+), 19 deletions(-) diff --git a/flight/libraries/inc/sanitycheck.h b/flight/libraries/inc/sanitycheck.h index f324486ae..9576d1030 100644 --- a/flight/libraries/inc/sanitycheck.h +++ b/flight/libraries/inc/sanitycheck.h @@ -32,6 +32,14 @@ #include +typedef enum { + FRAME_TYPE_MULTIROTOR, + FRAME_TYPE_HELI, + FRAME_TYPE_FIXED_WING, + FRAME_TYPE_GROUND, + FRAME_TYPE_CUSTOM, +} FrameType_t; + #define SANITYCHECK_STATUS_ERROR_NONE SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE #define SANITYCHECK_STATUS_ERROR_FLIGHTMODE SYSTEMALARMS_EXTENDEDALARMSTATUS_FLIGHTMODE @@ -45,4 +53,6 @@ extern int32_t configuration_check(); +FrameType_t GetCurrentFrameType(); + #endif /* SANITYCHECK_H */ diff --git a/flight/libraries/sanitycheck.c b/flight/libraries/sanitycheck.c index cda3b443a..83e498447 100644 --- a/flight/libraries/sanitycheck.c +++ b/flight/libraries/sanitycheck.c @@ -94,26 +94,8 @@ int32_t configuration_check() // Classify airframe type - bool multirotor; - uint8_t airframe_type; + bool multirotor = (GetCurrentFrameType() == FRAME_TYPE_MULTIROTOR); - SystemSettingsAirframeTypeGet(&airframe_type); - switch (airframe_type) { - case SYSTEMSETTINGS_AIRFRAMETYPE_QUADX: - case SYSTEMSETTINGS_AIRFRAMETYPE_QUADP: - case SYSTEMSETTINGS_AIRFRAMETYPE_HEXA: - case SYSTEMSETTINGS_AIRFRAMETYPE_OCTO: - case SYSTEMSETTINGS_AIRFRAMETYPE_HEXAX: - case SYSTEMSETTINGS_AIRFRAMETYPE_OCTOV: - case SYSTEMSETTINGS_AIRFRAMETYPE_OCTOCOAXP: - case SYSTEMSETTINGS_AIRFRAMETYPE_HEXACOAX: - case SYSTEMSETTINGS_AIRFRAMETYPE_TRI: - case SYSTEMSETTINGS_AIRFRAMETYPE_OCTOCOAXX: - multirotor = true; - break; - default: - multirotor = false; - } // For each available flight mode position sanity check the available // modes @@ -272,3 +254,42 @@ static bool check_stabilization_settings(int index, bool multirotor, bool copter return true; } + +FrameType_t GetCurrentFrameType() +{ + uint8_t airframe_type; + + SystemSettingsAirframeTypeGet(&airframe_type); + switch ((SystemSettingsAirframeTypeOptions)airframe_type) { + case SYSTEMSETTINGS_AIRFRAMETYPE_QUADX: + case SYSTEMSETTINGS_AIRFRAMETYPE_QUADP: + case SYSTEMSETTINGS_AIRFRAMETYPE_HEXA: + case SYSTEMSETTINGS_AIRFRAMETYPE_OCTO: + case SYSTEMSETTINGS_AIRFRAMETYPE_HEXAX: + case SYSTEMSETTINGS_AIRFRAMETYPE_OCTOV: + case SYSTEMSETTINGS_AIRFRAMETYPE_OCTOCOAXP: + case SYSTEMSETTINGS_AIRFRAMETYPE_HEXACOAX: + case SYSTEMSETTINGS_AIRFRAMETYPE_TRI: + case SYSTEMSETTINGS_AIRFRAMETYPE_OCTOCOAXX: + return FRAME_TYPE_MULTIROTOR; + + case SYSTEMSETTINGS_AIRFRAMETYPE_FIXEDWING: + case SYSTEMSETTINGS_AIRFRAMETYPE_FIXEDWINGELEVON: + case SYSTEMSETTINGS_AIRFRAMETYPE_FIXEDWINGVTAIL: + return FRAME_TYPE_FIXED_WING; + + case SYSTEMSETTINGS_AIRFRAMETYPE_HELICP: + return FRAME_TYPE_HELI; + + case SYSTEMSETTINGS_AIRFRAMETYPE_GROUNDVEHICLECAR: + case SYSTEMSETTINGS_AIRFRAMETYPE_GROUNDVEHICLEDIFFERENTIAL: + case SYSTEMSETTINGS_AIRFRAMETYPE_GROUNDVEHICLEMOTORCYCLE: + return FRAME_TYPE_GROUND; + + case SYSTEMSETTINGS_AIRFRAMETYPE_VTOL: + case SYSTEMSETTINGS_AIRFRAMETYPE_CUSTOM: + return FRAME_TYPE_CUSTOM; + } + // anyway it should not reach here + return FRAME_TYPE_CUSTOM; +} From 3ae85f6434bff4a4efa2c717e14e2af9086e9ff1 Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Sun, 29 Jun 2014 17:23:15 +0200 Subject: [PATCH 06/11] OP-1374 - Issue a Boot Alarm (reboot) if frame type is changed --- flight/modules/System/systemmod.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/flight/modules/System/systemmod.c b/flight/modules/System/systemmod.c index 8595642dc..aa6a8f54d 100644 --- a/flight/modules/System/systemmod.c +++ b/flight/modules/System/systemmod.c @@ -96,11 +96,12 @@ static xQueueHandle objectPersistenceQueue; static enum { STACKOVERFLOW_NONE = 0, STACKOVERFLOW_WARNING = 1, STACKOVERFLOW_CRITICAL = 3 } stackOverflow; static bool mallocFailed; static HwSettingsData bootHwSettings; +static FrameType_t bootFrameType; static struct PIOS_FLASHFS_Stats fsStats; // Private functions static void objectUpdatedCb(UAVObjEvent *ev); -static void hwSettingsUpdatedCb(UAVObjEvent *ev); +static void checkSettingsUpdatedCb(UAVObjEvent *ev); #ifdef DIAG_TASKS static void taskMonitorForEachCallback(uint16_t task_id, const struct pios_task_info *task_info, void *context); static void callbackSchedulerForEachCallback(int16_t callback_id, const struct pios_callback_info *callback_info, void *context); @@ -195,8 +196,10 @@ static void systemTask(__attribute__((unused)) void *parameters) // Load a copy of HwSetting active at boot time HwSettingsGet(&bootHwSettings); + bootFrameType = GetCurrentFrameType(); // Whenever the configuration changes, make sure it is safe to fly - HwSettingsConnectCallback(hwSettingsUpdatedCb); + HwSettingsConnectCallback(checkSettingsUpdatedCb); + SystemSettingsConnectCallback(checkSettingsUpdatedCb); #ifdef DIAG_TASKS TaskInfoData taskInfoData; @@ -396,13 +399,15 @@ static void objectUpdatedCb(UAVObjEvent *ev) /** * Called whenever hardware settings changed */ -static void hwSettingsUpdatedCb(__attribute__((unused)) UAVObjEvent *ev) +static void checkSettingsUpdatedCb(__attribute__((unused)) UAVObjEvent *ev) { HwSettingsData currentHwSettings; HwSettingsGet(¤tHwSettings); + FrameType_t currentFrameType = GetCurrentFrameType(); // check whether the Hw Configuration has changed from the one used at boot time - if (memcmp(&bootHwSettings, ¤tHwSettings, sizeof(HwSettingsData)) != 0) { + if ((memcmp(&bootHwSettings, ¤tHwSettings, sizeof(HwSettingsData)) != 0) || + (currentFrameType != bootFrameType)) { ExtendedAlarmsSet(SYSTEMALARMS_ALARM_BOOTFAULT, SYSTEMALARMS_ALARM_CRITICAL, SYSTEMALARMS_EXTENDEDALARMSTATUS_REBOOTREQUIRED, 0); } } From 30491c799238ef9b61d52dbdb1f59ec7984ee02c Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Sun, 29 Jun 2014 17:23:57 +0200 Subject: [PATCH 07/11] OP-1374 - Autostart the relevant PathFollower for known frame types --- .../modules/FixedWingPathFollower/fixedwingpathfollower.c | 6 +++++- flight/modules/VtolPathFollower/vtolpathfollower.c | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/flight/modules/FixedWingPathFollower/fixedwingpathfollower.c b/flight/modules/FixedWingPathFollower/fixedwingpathfollower.c index 5cdbe7c9e..556a10db8 100644 --- a/flight/modules/FixedWingPathFollower/fixedwingpathfollower.c +++ b/flight/modules/FixedWingPathFollower/fixedwingpathfollower.c @@ -62,6 +62,7 @@ #include "velocitystate.h" #include "taskinfo.h" #include +#include #include "sin_lookup.h" #include "paths.h" @@ -112,7 +113,10 @@ int32_t FixedWingPathFollowerInitialize() HwSettingsInitialize(); HwSettingsOptionalModulesData optionalModules; HwSettingsOptionalModulesGet(&optionalModules); - if (optionalModules.FixedWingPathFollower == HWSETTINGS_OPTIONALMODULES_ENABLED) { + FrameType_t frameType = GetCurrentFrameType(); + + if ((optionalModules.FixedWingPathFollower == HWSETTINGS_OPTIONALMODULES_ENABLED) || + (frameType == FRAME_TYPE_FIXED_WING)) { followerEnabled = true; FixedWingPathFollowerSettingsInitialize(); FixedWingPathFollowerStatusInitialize(); diff --git a/flight/modules/VtolPathFollower/vtolpathfollower.c b/flight/modules/VtolPathFollower/vtolpathfollower.c index 259d81fe4..cc09e0b6b 100644 --- a/flight/modules/VtolPathFollower/vtolpathfollower.c +++ b/flight/modules/VtolPathFollower/vtolpathfollower.c @@ -73,6 +73,7 @@ #include "paths.h" #include "CoordinateConversions.h" +#include #include "cameradesired.h" #include "poilearnsettings.h" @@ -128,8 +129,10 @@ int32_t VtolPathFollowerInitialize() HwSettingsOptionalModulesData optionalModules; HwSettingsOptionalModulesGet(&optionalModules); + FrameType_t frameType = GetCurrentFrameType(); - if (optionalModules.VtolPathFollower == HWSETTINGS_OPTIONALMODULES_ENABLED) { + if ((optionalModules.VtolPathFollower == HWSETTINGS_OPTIONALMODULES_ENABLED) || + (frameType == FRAME_TYPE_MULTIROTOR)) { VtolPathFollowerSettingsInitialize(); NedAccelInitialize(); PathDesiredInitialize(); From 80d3d7c9540fbe69d34d0176572dc8c18e4e7c1c Mon Sep 17 00:00:00 2001 From: Corvus Corax Date: Sun, 29 Jun 2014 18:36:46 +0200 Subject: [PATCH 08/11] OP-1374 hotfix to filtercf on checking of magnetometer calibration fabsf() --- flight/modules/StateEstimation/filtercf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/modules/StateEstimation/filtercf.c b/flight/modules/StateEstimation/filtercf.c index 807618004..15b61a665 100644 --- a/flight/modules/StateEstimation/filtercf.c +++ b/flight/modules/StateEstimation/filtercf.c @@ -234,7 +234,7 @@ static filterResult complementaryFilter(struct data *this, float gyro[3], float float magBias[3]; RevoCalibrationmag_biasArrayGet(magBias); // don't trust Mag for initial orientation if it has not been calibrated - if (magBias[0] < 1e-6f && magBias[1] < 1e-6f && magBias[2] < 1e-6f) { + if (fabsf(magBias[0]) < 1e-6f && fabsf(magBias[1]) < 1e-6f && fabsf(magBias[2]) < 1e-6f) { this->magCalibrated = false; mag[0] = 100.0f; mag[1] = 0.0f; From a3e808032c7b19287499e7a9a548530a2ea1fc5d Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Sun, 29 Jun 2014 22:10:35 +0200 Subject: [PATCH 09/11] OP-1378 - Review the flight mode settings limits --- shared/uavobjectdefinition/flightmodesettings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/shared/uavobjectdefinition/flightmodesettings.xml b/shared/uavobjectdefinition/flightmodesettings.xml index 19c9b4433..1d76697ae 100644 --- a/shared/uavobjectdefinition/flightmodesettings.xml +++ b/shared/uavobjectdefinition/flightmodesettings.xml @@ -83,27 +83,27 @@ limits="\ %0401NE:Autotune:PositionHold:PositionVarioFPV:PositionVarioLOS:PositionVarioNSEW:ReturnToBase:Land:PathPlanner:POI:AutoCruise,\ %0402NE:Autotune:PositionHold:PositionVarioFPV:PositionVarioLOS:PositionVarioNSEW:ReturnToBase:Land:PathPlanner:POI:AutoCruise,\ - %0903NE:Autotune:AutoCruise;\ + %0903NE:POI:PathPlanner:Autotune:AutoCruise;\ \ %0401NE:Autotune:PositionHold:PositionVarioFPV:PositionVarioLOS:PositionVarioNSEW:ReturnToBase:Land:PathPlanner:POI:AutoCruise,\ %0402NE:Autotune:PositionHold:PositionVarioFPV:PositionVarioLOS:PositionVarioNSEW:ReturnToBase:Land:PathPlanner:POI:AutoCruise,\ - %0903NE:Autotune:AutoCruise;\ + %0903NE:POI:PathPlanner:Autotune:AutoCruise;\ \ %0401NE:Autotune:PositionHold:PositionVarioFPV:PositionVarioLOS:PositionVarioNSEW:ReturnToBase:Land:PathPlanner:POI:AutoCruise,\ %0402NE:Autotune:PositionHold:PositionVarioFPV:PositionVarioLOS:PositionVarioNSEW:ReturnToBase:Land:PathPlanner:POI:AutoCruise,\ - %0903NE:Autotune:AutoCruise;\ + %0903NE:POI:PathPlanner:Autotune:AutoCruise;\ \ %0401NE:Autotune:PositionHold:PositionVarioFPV:PositionVarioLOS:PositionVarioNSEW:ReturnToBase:Land:PathPlanner:POI:AutoCruise,\ %0402NE:Autotune:PositionHold:PositionVarioFPV:PositionVarioLOS:PositionVarioNSEW:ReturnToBase:Land:PathPlanner:POI:AutoCruise,\ - %0903NE:Autotune:AutoCruise;\ + %0903NE:POI:PathPlanner:Autotune:AutoCruise;\ \ %0401NE:Autotune:PositionHold:PositionVarioFPV:PositionVarioLOS:PositionVarioNSEW:ReturnToBase:Land:PathPlanner:POI:AutoCruise,\ %0402NE:Autotune:PositionHold:PositionVarioFPV:PositionVarioLOS:PositionVarioNSEW:ReturnToBase:Land:PathPlanner:POI:AutoCruise,\ - %0903NE:Autotune:AutoCruise;\ + %0903NE:POI:PathPlanner:Autotune:AutoCruise;\ \ %0401NE:Autotune:PositionHold:PositionVarioFPV:PositionVarioLOS:PositionVarioNSEW:ReturnToBase:Land:PathPlanner:POI:AutoCruise,\ %0402NE:Autotune:PositionHold:PositionVarioFPV:PositionVarioLOS:PositionVarioNSEW:ReturnToBase:Land:PathPlanner:POI:AutoCruise,\ - %0903NE:Autotune:AutoCruise"/> + %0903NE:POI:PathPlanner:Autotune:AutoCruise"/> From cb5ce3b41fa8b4777a214e7d95b5b0ef11672d10 Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Mon, 30 Jun 2014 23:39:11 +0200 Subject: [PATCH 10/11] Update WhatsNew for release --- WHATSNEW.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/WHATSNEW.txt b/WHATSNEW.txt index ee79f820a..292ab0333 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,4 +1,16 @@ ---- RELEASE-14.06 --- Peanuts Schnapps --- +--- RELEASE-14.06-RC2 --- Peanuts Schnapps --- +This Release Candidate fixes the following issues: + *[OP-1378] - Check Limits for flight modes + *[OP-1377] - Calibration config panel has Apply button even when not in Expert mode + *[OP-1376] - Calibration results not saved to SD + *[OP-1375] - Update Mag Ki and Kp default settings + *[OP-1374] - Automatically enable the right PathFollower + *[OP-1337] - Fixes for French translation + +The full list of features, improvements and bugfixes in this release candidate is accessible here: +http://progress.openpilot.org/issues/?filter=11462 + +--- RELEASE-14.06-RC1 --- Peanuts Schnapps --- This is the Mid 2014 release. This version still supports the CopterControl and CC3D. It includes several additions and changes aimed at gps/navigation functionalities From 4389f767f3e6b0e3be8938d58fc1f7c71f5559a5 Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Wed, 2 Jul 2014 23:27:58 +0200 Subject: [PATCH 11/11] uncrustify --- .../targets/boards/coptercontrol/firmware/inc/pios_config.h | 4 ++-- .../openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h b/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h index 3878d90d0..e7da296e9 100644 --- a/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h +++ b/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h @@ -171,10 +171,10 @@ #endif #define PIOS_TELEM_RX_STACK_SIZE 410 #define PIOS_TELEM_TX_STACK_SIZE 560 -#define PIOS_EVENTDISPATCHER_STACK_SIZE 95 +#define PIOS_EVENTDISPATCHER_STACK_SIZE 95 /* This can't be too high to stop eventdispatcher thread overflowing */ -#define PIOS_EVENTDISAPTCHER_QUEUE 10 +#define PIOS_EVENTDISAPTCHER_QUEUE 10 /* Revolution series */ /* #define REVOLUTION */ diff --git a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp index f13aca0e5..4fe823e6a 100644 --- a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp +++ b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp @@ -86,7 +86,7 @@ ConfigCCHWWidget::ConfigCCHWWidget(QWidget *parent) : ConfigTaskWidget(parent) HwSettings *hwSettings = HwSettings::GetInstance(getObjectManager()); HwSettings::DataFields hwSettingsData = hwSettings->getData(); - if(hwSettingsData.OptionalModules[HwSettings::OPTIONALMODULES_GPS] != HwSettings::OPTIONALMODULES_ENABLED) { + if (hwSettingsData.OptionalModules[HwSettings::OPTIONALMODULES_GPS] != HwSettings::OPTIONALMODULES_ENABLED) { m_telemetry->gpsProtocol->setEnabled(false); m_telemetry->gpsProtocol->setToolTip(tr("Enable GPS module and reboot the board to be able to select GPS protocol")); } else {