From 58e70b2e3af7e1a2dbb7fc7b65ab0f1bcfc550cb Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Fri, 6 Feb 2015 16:59:41 +0100 Subject: [PATCH 01/47] CC3D special firmware : Nmea GPS --- flight/modules/GPS/GPS.c | 2 +- flight/targets/boards/coptercontrol/firmware/Makefile | 1 - .../targets/boards/coptercontrol/firmware/inc/pios_config.h | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/flight/modules/GPS/GPS.c b/flight/modules/GPS/GPS.c index 97151f2fb..642a00268 100644 --- a/flight/modules/GPS/GPS.c +++ b/flight/modules/GPS/GPS.c @@ -91,7 +91,7 @@ void updateGpsSettings(UAVObjEvent *ev); #else #if defined(PIOS_GPS_MINIMAL) #define GPS_READ_BUFFER 32 - #define STACK_SIZE_BYTES 500 + #define STACK_SIZE_BYTES 580 #else #define STACK_SIZE_BYTES 650 #endif // PIOS_GPS_MINIMAL diff --git a/flight/targets/boards/coptercontrol/firmware/Makefile b/flight/targets/boards/coptercontrol/firmware/Makefile index 799013726..2a9660bf1 100644 --- a/flight/targets/boards/coptercontrol/firmware/Makefile +++ b/flight/targets/boards/coptercontrol/firmware/Makefile @@ -116,7 +116,6 @@ ifndef TESTAPP SRC += $(OPUAVSYNTHDIR)/gpsvelocitysensor.c SRC += $(OPUAVSYNTHDIR)/gpssettings.c SRC += $(OPUAVSYNTHDIR)/hwsettings.c - SRC += $(OPUAVSYNTHDIR)/gcsreceiver.c SRC += $(OPUAVSYNTHDIR)/receiveractivity.c SRC += $(OPUAVSYNTHDIR)/taskinfo.c SRC += $(OPUAVSYNTHDIR)/callbackinfo.c diff --git a/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h b/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h index 9450a6781..34547ff66 100644 --- a/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h +++ b/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h @@ -97,10 +97,10 @@ /* PIOS receiver drivers */ #define PIOS_INCLUDE_PWM #define PIOS_INCLUDE_PPM -#define PIOS_INCLUDE_PPM_FLEXI +/* #define PIOS_INCLUDE_PPM_FLEXI */ #define PIOS_INCLUDE_DSM #define PIOS_INCLUDE_SBUS -#define PIOS_INCLUDE_GCSRCVR +/* #define PIOS_INCLUDE_GCSRCVR */ /* #define PIOS_INCLUDE_OPLINKRCVR */ /* PIOS abstract receiver interface */ From 5c08f013f1d7471ecaec63796ca06cac319b2a14 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Fri, 6 Feb 2015 19:50:09 +0100 Subject: [PATCH 02/47] Allow multiples talkers IDs, define some debug messages and typos --- flight/modules/GPS/NMEA.c | 73 +++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 34 deletions(-) diff --git a/flight/modules/GPS/NMEA.c b/flight/modules/GPS/NMEA.c index 34eba2f9f..7c33edf11 100644 --- a/flight/modules/GPS/NMEA.c +++ b/flight/modules/GPS/NMEA.c @@ -40,14 +40,13 @@ #include "GPS.h" // #define ENABLE_DEBUG_MSG ///< define to enable debug-messages -#define DEBUG_PORT PIOS_COM_TELEM_RF ///< defines which serial port is ued for debug-messages - +#define DEBUG_PORT PIOS_COM_TELEM_RF ///< defines which serial port is used for debug-messages // Debugging #ifdef ENABLE_DEBUG_MSG // #define DEBUG_MSG_IN ///< define to display the incoming NMEA messages // #define DEBUG_PARAMS ///< define to display the incoming NMEA messages split into its parameters -// #define DEBUG_MGSID_IN ///< define to display the the names of the incoming NMEA messages +// #define DEBUG_MSGID_IN ///< define to display the names of the incoming NMEA messages // #define NMEA_DEBUG_PKT ///< define to enable debug of all NMEA messages // #define NMEA_DEBUG_GGA ///< define to enable debug of GGA messages // #define NMEA_DEBUG_VTG ///< define to enable debug of VTG messages @@ -68,40 +67,40 @@ struct nmea_parser { bool (*handler)(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); }; -static bool nmeaProcessGPGGA(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); -static bool nmeaProcessGPRMC(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); -static bool nmeaProcessGPVTG(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); -static bool nmeaProcessGPGSA(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); +static bool nmeaProcessGxGGA(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); +static bool nmeaProcessGxRMC(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); +static bool nmeaProcessGxVTG(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); +static bool nmeaProcessGxGSA(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); #if !defined(PIOS_GPS_MINIMAL) -static bool nmeaProcessGPZDA(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); -static bool nmeaProcessGPGSV(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); +static bool nmeaProcessGxZDA(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); +static bool nmeaProcessGxGSV(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam); #endif // PIOS_GPS_MINIMAL static const struct nmea_parser nmea_parsers[] = { { - .prefix = "GPGGA", - .handler = nmeaProcessGPGGA, + .prefix = "GGA", + .handler = nmeaProcessGxGGA, }, { - .prefix = "GPVTG", - .handler = nmeaProcessGPVTG, + .prefix = "VTG", + .handler = nmeaProcessGxVTG, }, { - .prefix = "GPGSA", - .handler = nmeaProcessGPGSA, + .prefix = "GSA", + .handler = nmeaProcessGxGSA, }, { - .prefix = "GPRMC", - .handler = nmeaProcessGPRMC, + .prefix = "RMC", + .handler = nmeaProcessGxRMC, }, #if !defined(PIOS_GPS_MINIMAL) { - .prefix = "GPZDA", - .handler = nmeaProcessGPZDA, + .prefix = "ZDA", + .handler = nmeaProcessGxZDA, }, { - .prefix = "GPGSV", - .handler = nmeaProcessGPGSV, + .prefix = "GSV", + .handler = nmeaProcessGxGSV, }, #endif // PIOS_GPS_MINIMAL }; @@ -373,6 +372,8 @@ bool NMEA_update_position(char *nmea_sentence, GPSPositionSensorData *GpsData) // Sample NMEA message: "GPRMC,000131.736,V,,,,,0.00,0.00,060180,,,N*43" // The first parameter starts at the beginning of the message + // Skip first two character, allow GL, GN, GP... + p += 2; params[0] = p; nbParams = 1; while (*p != 0) { @@ -406,11 +407,13 @@ bool NMEA_update_position(char *nmea_sentence, GPSPositionSensorData *GpsData) parser = NMEA_find_parser_by_prefix(params[0]); if (!parser) { // No parser found + #ifdef DEBUG_MSGID_IN DEBUG_MSG(" NO PARSER (\"%s\")\n", params[0]); + #endif return false; } - #ifdef DEBUG_MGSID_IN + #ifdef DEBUG_MSGID_IN DEBUG_MSG("%s %d ", params[0]); #endif // Send the message to the parser and get it update the GpsData @@ -422,7 +425,9 @@ bool NMEA_update_position(char *nmea_sentence, GPSPositionSensorData *GpsData) if (!parser->handler(GpsData, &gpsDataUpdated, params, nbParams)) { // Parse failed + #ifdef DEBUG_MSGID_IN DEBUG_MSG("PARSE FAILED (\"%s\")\n", params[0]); + #endif if (gpsDataUpdated && (GpsData->Status == GPSPOSITIONSENSOR_STATUS_NOFIX)) { GPSPositionSensorSet(GpsData); } @@ -432,13 +437,13 @@ bool NMEA_update_position(char *nmea_sentence, GPSPositionSensorData *GpsData) // All is fine :) Update object if data has changed if (gpsDataUpdated) { - #ifdef DEBUG_MGSID_IN + #ifdef DEBUG_MSGID_IN DEBUG_MSG("U"); #endif GPSPositionSensorSet(GpsData); } - #ifdef DEBUG_MGSID_IN + #ifdef DEBUG_MSGID_IN DEBUG_MSG("\n"); #endif return true; @@ -446,11 +451,11 @@ bool NMEA_update_position(char *nmea_sentence, GPSPositionSensorData *GpsData) /** - * Parse an NMEA GPGGA sentence and update the given UAVObject + * Parse an NMEA GxGGA sentence and update the given UAVObject * \param[in] A pointer to a GPSPositionSensor UAVObject to be updated. * \param[in] An NMEA sentence with a valid checksum */ -static bool nmeaProcessGPGGA(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam) +static bool nmeaProcessGxGGA(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam) { if (nbParam != 15) { return false; @@ -499,11 +504,11 @@ static bool nmeaProcessGPGGA(GPSPositionSensorData *GpsData, bool *gpsDataUpdate } /** - * Parse an NMEA GPRMC sentence and update the given UAVObject + * Parse an NMEA GxRMC sentence and update the given UAVObject * \param[in] A pointer to a GPSPositionSensor UAVObject to be updated. * \param[in] An NMEA sentence with a valid checksum */ -static bool nmeaProcessGPRMC(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam) +static bool nmeaProcessGxRMC(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam) { if (nbParam != 13) { return false; @@ -567,11 +572,11 @@ static bool nmeaProcessGPRMC(GPSPositionSensorData *GpsData, bool *gpsDataUpdate } /** - * Parse an NMEA GPVTG sentence and update the given UAVObject + * Parse an NMEA GxVTG sentence and update the given UAVObject * \param[in] A pointer to a GPSPositionSensor UAVObject to be updated. * \param[in] An NMEA sentence with a valid checksum */ -static bool nmeaProcessGPVTG(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam) +static bool nmeaProcessGxVTG(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam) { if (nbParam != 9 && nbParam != 10 /*GTOP GPS seems to gemnerate an extra parameter...*/) { return false; @@ -592,11 +597,11 @@ static bool nmeaProcessGPVTG(GPSPositionSensorData *GpsData, bool *gpsDataUpdate #if !defined(PIOS_GPS_MINIMAL) /** - * Parse an NMEA GPZDA sentence and update the @ref GPSTime object + * Parse an NMEA GxZDA sentence and update the @ref GPSTime object * \param[in] A pointer to a GPSPositionSensor UAVObject to be updated (unused). * \param[in] An NMEA sentence with a valid checksum */ -static bool nmeaProcessGPZDA(__attribute__((unused)) GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam) +static bool nmeaProcessGxZDA(__attribute__((unused)) GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam) { if (nbParam != 7) { return false; @@ -636,7 +641,7 @@ static uint8_t gsv_processed_mask; static uint16_t gsv_incomplete_error; static uint16_t gsv_duplicate_error; -static bool nmeaProcessGPGSV(__attribute__((unused)) GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam) +static bool nmeaProcessGxGSV(__attribute__((unused)) GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam) { if (nbParam < 4) { return false; @@ -723,7 +728,7 @@ static bool nmeaProcessGPGSV(__attribute__((unused)) GPSPositionSensorData *GpsD * \param[in] A pointer to a GPSPositionSensor UAVObject to be updated. * \param[in] An NMEA sentence with a valid checksum */ -static bool nmeaProcessGPGSA(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam) +static bool nmeaProcessGxGSA(GPSPositionSensorData *GpsData, bool *gpsDataUpdated, char *param[], uint8_t nbParam) { if (nbParam != 18) { return false; From 9c31d2fcb5a516eed4eb0ffdf9f97034bb3114cc Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sat, 7 Feb 2015 13:00:10 +0100 Subject: [PATCH 03/47] OP-1706 Disable checkboxes if no range - Enable only channels already set in mixer - Add limits --- .../src/plugins/config/outputchannelform.cpp | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp index 0ca1ecaf7..358ba9d59 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp @@ -27,13 +27,16 @@ #include "outputchannelform.h" +#define MAXOUTPUT_VALUE 2100 +#define MINOUTPUT_VALUE 900 + OutputChannelForm::OutputChannelForm(const int index, QWidget *parent) : ChannelForm(index, parent), ui(), m_inChannelTest(false) { ui.setupUi(this); // The convention for OP is Channel 1 to Channel 10. - ui.actuatorNumber->setText(QString("%1:").arg(index + 1)); + ui.actuatorNumber->setText(QString("%1").arg(index + 1)); // Register for ActuatorSettings changes: connect(ui.actuatorMin, SIGNAL(editingFinished()), this, SLOT(setChannelRange())); @@ -45,6 +48,14 @@ OutputChannelForm::OutputChannelForm(const int index, QWidget *parent) : ui.actuatorLink->setChecked(false); connect(ui.actuatorLink, SIGNAL(toggled(bool)), this, SLOT(linkToggled(bool))); + // Set limits + ui.actuatorMin->setMaximum(MAXOUTPUT_VALUE); + ui.actuatorMax->setMaximum(MAXOUTPUT_VALUE); + ui.actuatorValue->setMaximum(MAXOUTPUT_VALUE); + ui.actuatorMin->setMinimum(MINOUTPUT_VALUE); + ui.actuatorMax->setMinimum(MINOUTPUT_VALUE); + ui.actuatorValue->setMinimum(MINOUTPUT_VALUE); + disableMouseWheelEvents(); } @@ -198,10 +209,12 @@ void OutputChannelForm::setRange(int minimum, int maximum) void OutputChannelForm::setChannelRange() { int oldMini = ui.actuatorNeutral->minimum(); + int minValue = ui.actuatorMin->value(); + int maxValue = ui.actuatorMax->value(); // int oldMaxi = ui.actuatorNeutral->maximum(); - if (ui.actuatorMin->value() < ui.actuatorMax->value()) { + if (minValue <= maxValue) { ui.actuatorNeutral->setRange(ui.actuatorMin->value(), ui.actuatorMax->value()); ui.actuatorRev->setChecked(false); } else { @@ -213,6 +226,33 @@ void OutputChannelForm::setChannelRange() ui.actuatorNeutral->setValue(ui.actuatorNeutral->minimum()); } + // Enable only outputs already set in mixer + if (name() != "-") { + ui.actuatorMin->setEnabled(true); + ui.actuatorMax->setEnabled(true); + ui.actuatorNeutral->setEnabled(true); + ui.actuatorValue->setEnabled(true); + + // Enable checkboxes Rev and Link if some range + if (minValue != maxValue) { + ui.actuatorRev->setEnabled(true); + ui.actuatorLink->setEnabled(true); + } else { + ui.actuatorRev->setEnabled(false); + ui.actuatorLink->setEnabled(false); + } + } else { + ui.actuatorMin->setEnabled(false); + ui.actuatorMax->setEnabled(false); + ui.actuatorRev->setEnabled(false); + ui.actuatorLink->setEnabled(false); + ui.actuatorMin->setValue(1000); + ui.actuatorMax->setValue(1000); + ui.actuatorNeutral->setRange(minValue, maxValue); + ui.actuatorNeutral->setEnabled(false); + ui.actuatorValue->setEnabled(false); + } + // if (ui.actuatorNeutral->value() == oldMaxi) // this can be dangerous if it happens to be controlling a motor at the time! // ui.actuatorNeutral->setValue(ui.actuatorNeutral->maximum()); From 7c4dfc9608d35b8a300a70cb1985fd1046a0c9cf Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sat, 7 Feb 2015 13:19:46 +0100 Subject: [PATCH 04/47] OP-1706 Uncrustify --- .../openpilotgcs/src/plugins/config/outputchannelform.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp index 358ba9d59..878e1851c 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp @@ -48,13 +48,13 @@ OutputChannelForm::OutputChannelForm(const int index, QWidget *parent) : ui.actuatorLink->setChecked(false); connect(ui.actuatorLink, SIGNAL(toggled(bool)), this, SLOT(linkToggled(bool))); - // Set limits + // Set limits ui.actuatorMin->setMaximum(MAXOUTPUT_VALUE); ui.actuatorMax->setMaximum(MAXOUTPUT_VALUE); ui.actuatorValue->setMaximum(MAXOUTPUT_VALUE); ui.actuatorMin->setMinimum(MINOUTPUT_VALUE); ui.actuatorMax->setMinimum(MINOUTPUT_VALUE); - ui.actuatorValue->setMinimum(MINOUTPUT_VALUE); + ui.actuatorValue->setMinimum(MINOUTPUT_VALUE); disableMouseWheelEvents(); } @@ -208,7 +208,7 @@ void OutputChannelForm::setRange(int minimum, int maximum) */ void OutputChannelForm::setChannelRange() { - int oldMini = ui.actuatorNeutral->minimum(); + int oldMini = ui.actuatorNeutral->minimum(); int minValue = ui.actuatorMin->value(); int maxValue = ui.actuatorMax->value(); @@ -227,7 +227,7 @@ void OutputChannelForm::setChannelRange() } // Enable only outputs already set in mixer - if (name() != "-") { + if (name() != "-") { ui.actuatorMin->setEnabled(true); ui.actuatorMax->setEnabled(true); ui.actuatorNeutral->setEnabled(true); From f92eba93ef8c9287955f28b8e4d9ff7113487721 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sat, 7 Feb 2015 17:02:59 +0100 Subject: [PATCH 05/47] OP-1601 Ubx only, more efficient to save Ram on CC/CC3D --- flight/modules/GPS/GPS.c | 14 ++++++++++---- .../coptercontrol/firmware/inc/pios_config.h | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/flight/modules/GPS/GPS.c b/flight/modules/GPS/GPS.c index 642a00268..8f78f9061 100644 --- a/flight/modules/GPS/GPS.c +++ b/flight/modules/GPS/GPS.c @@ -91,7 +91,12 @@ void updateGpsSettings(UAVObjEvent *ev); #else #if defined(PIOS_GPS_MINIMAL) #define GPS_READ_BUFFER 32 - #define STACK_SIZE_BYTES 580 + +#ifdef PIOS_INCLUDE_GPS_NMEA_PARSER + #define STACK_SIZE_BYTES 580 // NMEA +#else + #define STACK_SIZE_BYTES 440 // UBX +#endif // PIOS_INCLUDE_GPS_NMEA_PARSER #else #define STACK_SIZE_BYTES 650 #endif // PIOS_GPS_MINIMAL @@ -203,9 +208,11 @@ int32_t GPSInitialize(void) GPSSettingsInitialize(); GPSSettingsDataProtocolGet(&gpsProtocol); switch (gpsProtocol) { +#if defined(PIOS_INCLUDE_GPS_NMEA_PARSER) case GPSSETTINGS_DATAPROTOCOL_NMEA: gps_rx_buffer = pios_malloc(NMEA_MAX_PACKET_LENGTH); break; +#endif case GPSSETTINGS_DATAPROTOCOL_UBX: gps_rx_buffer = pios_malloc(sizeof(struct UBXPacket)); break; @@ -459,12 +466,12 @@ static void updateHwSettings() } } -#ifdef PIOS_INCLUDE_GPS_UBX_PARSER +#if defined(PIOS_INCLUDE_GPS_UBX_PARSER) && !defined(PIOS_GPS_MINIMAL) void AuxMagSettingsUpdatedCb(__attribute__((unused)) UAVObjEvent *ev) { load_mag_settings(); } -#if defined(PIOS_INCLUDE_GPS_UBX_PARSER) && !defined(PIOS_GPS_MINIMAL) + void updateGpsSettings(__attribute__((unused)) UAVObjEvent *ev) { uint8_t ubxAutoConfig; @@ -537,7 +544,6 @@ void updateGpsSettings(__attribute__((unused)) UAVObjEvent *ev) ubx_autoconfig_set(newconfig); } #endif /* if defined(PIOS_INCLUDE_GPS_UBX_PARSER) && !defined(PIOS_GPS_MINIMAL) */ -#endif /* ifdef PIOS_INCLUDE_GPS_UBX_PARSER */ /** * @} * @} diff --git a/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h b/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h index 34547ff66..aabc651a7 100644 --- a/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h +++ b/flight/targets/boards/coptercontrol/firmware/inc/pios_config.h @@ -142,7 +142,7 @@ /* #define PIOS_TELEM_PRIORITY_QUEUE */ #define PIOS_INCLUDE_GPS #define PIOS_GPS_MINIMAL -#define PIOS_INCLUDE_GPS_NMEA_PARSER +/* #define PIOS_INCLUDE_GPS_NMEA_PARSER */ #define PIOS_INCLUDE_GPS_UBX_PARSER /* #define PIOS_GPS_SETS_HOMELOCATION */ From bf3866d12e4ec933979ac1a2814de200f83684ac Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sun, 8 Feb 2015 19:10:56 +0100 Subject: [PATCH 06/47] OP-1706 Output range from 500 to 2500 --- ground/openpilotgcs/src/plugins/config/outputchannelform.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp index 878e1851c..08178155b 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp @@ -27,8 +27,8 @@ #include "outputchannelform.h" -#define MAXOUTPUT_VALUE 2100 -#define MINOUTPUT_VALUE 900 +#define MAXOUTPUT_VALUE 2500 +#define MINOUTPUT_VALUE 500 OutputChannelForm::OutputChannelForm(const int index, QWidget *parent) : ChannelForm(index, parent), ui(), m_inChannelTest(false) From cd2ad35ae03707b3cacd87f1147e08bf67e04ec4 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sun, 8 Feb 2015 22:37:24 +0100 Subject: [PATCH 07/47] OP-1601 Add command line options for fw_coptercontrol : GCSRECEIVER=YES and DIAG_TASKS=YES --- .../boards/coptercontrol/firmware/Makefile | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/flight/targets/boards/coptercontrol/firmware/Makefile b/flight/targets/boards/coptercontrol/firmware/Makefile index 2a9660bf1..d58b57e64 100644 --- a/flight/targets/boards/coptercontrol/firmware/Makefile +++ b/flight/targets/boards/coptercontrol/firmware/Makefile @@ -30,6 +30,12 @@ USE_DSP_LIB ?= NO # Set to YES to build a FW version that will erase data flash memory ERASE_FLASH ?= NO +# Set to yes to include Gcsreceiver module +GCSRECEIVER ?= NO + +# Enable Diag tasks ? +DIAG_TASKS ?= NO + # List of mandatory modules to include MODULES += Attitude MODULES += Stabilization @@ -103,7 +109,6 @@ ifndef TESTAPP SRC += $(OPUAVSYNTHDIR)/gyrostate.c SRC += $(OPUAVSYNTHDIR)/attitudestate.c SRC += $(OPUAVSYNTHDIR)/manualcontrolcommand.c - SRC += $(OPUAVSYNTHDIR)/i2cstats.c SRC += $(OPUAVSYNTHDIR)/watchdogstatus.c SRC += $(OPUAVSYNTHDIR)/manualcontrolsettings.c SRC += $(OPUAVSYNTHDIR)/flightmodesettings.c @@ -117,13 +122,22 @@ ifndef TESTAPP SRC += $(OPUAVSYNTHDIR)/gpssettings.c SRC += $(OPUAVSYNTHDIR)/hwsettings.c SRC += $(OPUAVSYNTHDIR)/receiveractivity.c - SRC += $(OPUAVSYNTHDIR)/taskinfo.c - SRC += $(OPUAVSYNTHDIR)/callbackinfo.c SRC += $(OPUAVSYNTHDIR)/mixerstatus.c SRC += $(OPUAVSYNTHDIR)/ratedesired.c SRC += $(OPUAVSYNTHDIR)/txpidsettings.c SRC += $(OPUAVSYNTHDIR)/mpu6000settings.c - SRC += $(OPUAVSYNTHDIR)/perfcounter.c + # Command line option for Gcsreceiver module + ifeq ($(GCSRECEIVER), YES) + SRC += $(OPUAVSYNTHDIR)/gcsreceiver.c + endif + # Enable Diag tasks and UAVOs needed + ifeq ($(DIAG_TASKS), YES) + CDEFS += -DDIAG_TASKS + SRC += $(OPUAVSYNTHDIR)/taskinfo.c + SRC += $(OPUAVSYNTHDIR)/callbackinfo.c + SRC += $(OPUAVSYNTHDIR)/perfcounter.c + SRC += $(OPUAVSYNTHDIR)/i2cstats.c + endif else ## Test Code SRC += $(OPTESTS)/test_common.c From 6da3c99af268f5a46f7cc0b45df1cd2e0eed34bf Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Tue, 10 Feb 2015 22:48:43 +0100 Subject: [PATCH 08/47] OP-1635 Remove QuadH in config tab - AirframeType --- flight/libraries/sanitycheck.c | 1 - .../share/openpilotgcs/pfd/default/Panels.qml | 2 +- .../openpilotgcs/pfd/default/Warnings.qml | 4 ++-- .../configmultirotorwidget.cpp | 21 +------------------ .../config/configvehicletypewidget.cpp | 4 +--- shared/uavobjectdefinition/systemsettings.xml | 2 +- 6 files changed, 6 insertions(+), 28 deletions(-) diff --git a/flight/libraries/sanitycheck.c b/flight/libraries/sanitycheck.c index 61950cbd9..4d14f3d49 100644 --- a/flight/libraries/sanitycheck.c +++ b/flight/libraries/sanitycheck.c @@ -304,7 +304,6 @@ FrameType_t GetCurrentFrameType() switch ((SystemSettingsAirframeTypeOptions)airframe_type) { case SYSTEMSETTINGS_AIRFRAMETYPE_QUADX: case SYSTEMSETTINGS_AIRFRAMETYPE_QUADP: - case SYSTEMSETTINGS_AIRFRAMETYPE_QUADH: case SYSTEMSETTINGS_AIRFRAMETYPE_HEXA: case SYSTEMSETTINGS_AIRFRAMETYPE_OCTO: case SYSTEMSETTINGS_AIRFRAMETYPE_OCTOX: diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml index ee885f643..f8173c9ad 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml @@ -893,7 +893,7 @@ Item { Text { text: ["FixedWing", "FixedWingElevon", "FixedWingVtail", "VTOL", "HeliCP", "QuadX", "QuadP", - "QuadH", "Hexa+", "Octo+", "Custom", "HexaX", "HexaH", "OctoV", "OctoCoaxP", "OctoCoaxX", "OctoX", "HexaCoax", + "Hexa+", "Octo+", "Custom", "HexaX", "HexaH", "OctoV", "OctoCoaxP", "OctoCoaxX", "OctoX", "HexaCoax", "Tricopter", "GroundVehicleCar", "GroundVehicleDiff", "GroundVehicleMoto"][SystemSettings.AirframeType] anchors.right: parent.right color: "white" diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml index 8078a2854..8197fa42d 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml @@ -24,10 +24,10 @@ Item { property variant thrustmodeColors : ["green", "grey", "grey", "grey", "grey", "grey", "grey", "grey", "green", "green", "green", "cyan"] - // SystemSettings.AirframeType 3 - 18 : VtolPathFollower, check ThrustControl + // SystemSettings.AirframeType 3 - 17 : VtolPathFollower, check ThrustControl property var thrust_mode: FlightStatus.FlightMode < 7 ? StabilizationDesired.StabilizationMode_Thrust : - FlightStatus.FlightMode > 6 && SystemSettings.AirframeType > 2 && SystemSettings.AirframeType < 19 + FlightStatus.FlightMode > 6 && SystemSettings.AirframeType > 2 && SystemSettings.AirframeType < 18 && VtolPathFollowerSettings.ThrustControl == 1 ? 11 : FlightStatus.FlightMode > 6 && SystemSettings.AirframeType < 3 ? 11: 0 diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configmultirotorwidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configmultirotorwidget.cpp index 6681a5b17..9823d81c7 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configmultirotorwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configmultirotorwidget.cpp @@ -154,7 +154,7 @@ ConfigMultiRotorWidget::ConfigMultiRotorWidget(QWidget *parent) : m_aircraft->quadShape->setScene(scene); QStringList multiRotorTypes; - multiRotorTypes << "Tricopter Y" << "Quad +" << "Quad X" << "Quad H" << "Hexacopter" << "Hexacopter X" << "Hexacopter H" + multiRotorTypes << "Tricopter Y" << "Quad +" << "Quad X" << "Hexacopter" << "Hexacopter X" << "Hexacopter H" << "Hexacopter Y6" << "Octocopter" << "Octocopter X" << "Octocopter V" << "Octo Coax +" << "Octo Coax X"; m_aircraft->multirotorFrameType->addItems(multiRotorTypes); @@ -195,12 +195,6 @@ void ConfigMultiRotorWidget::setupUI(QString frameType) m_aircraft->mrRollMixLevel->setValue(50); m_aircraft->mrPitchMixLevel->setValue(50); setYawMixLevel(50); - } else if (frameType == "QuadH" || frameType == "Quad H") { - setComboCurrentIndex(m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Quad H")); - - m_aircraft->mrRollMixLevel->setValue(50); - m_aircraft->mrPitchMixLevel->setValue(70); - setYawMixLevel(50); } else if (frameType == "QuadP" || frameType == "Quad +") { setComboCurrentIndex(m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Quad +")); @@ -296,8 +290,6 @@ void ConfigMultiRotorWidget::setupEnabledControls(QString frameType) enableComboBoxes(this, CHANNELBOXNAME, 4, true); } else if (frameType == "QuadP" || frameType == "Quad +") { enableComboBoxes(this, CHANNELBOXNAME, 4, true); - } else if (frameType == "QuadH" || frameType == "Quad H") { - enableComboBoxes(this, CHANNELBOXNAME, 4, true); } else if (frameType == "Hexa" || frameType == "Hexacopter") { enableComboBoxes(this, CHANNELBOXNAME, 6, true); } else if (frameType == "HexaX" || frameType == "Hexacopter X") { @@ -445,12 +437,6 @@ void ConfigMultiRotorWidget::refreshWidgetsValues(QString frameType) setComboCurrentIndex(m_aircraft->multiMotorChannelBox2, multi.VTOLMotorNE); setComboCurrentIndex(m_aircraft->multiMotorChannelBox3, multi.VTOLMotorSE); setComboCurrentIndex(m_aircraft->multiMotorChannelBox4, multi.VTOLMotorSW); - } else if (frameType == "QuadH") { - // Motors 1/2/3/4 are: NW / NE / SE / SW - setComboCurrentIndex(m_aircraft->multiMotorChannelBox1, multi.VTOLMotorNW); - setComboCurrentIndex(m_aircraft->multiMotorChannelBox2, multi.VTOLMotorNE); - setComboCurrentIndex(m_aircraft->multiMotorChannelBox3, multi.VTOLMotorSE); - setComboCurrentIndex(m_aircraft->multiMotorChannelBox4, multi.VTOLMotorSW); } else if (frameType == "Hexa") { // Motors 1/2/3 4/5/6 are: N / NE / SE / S / SW / NW setComboCurrentIndex(m_aircraft->multiMotorChannelBox1, multi.VTOLMotorN); @@ -564,9 +550,6 @@ QString ConfigMultiRotorWidget::updateConfigObjectsFromWidgets() } else if (m_aircraft->multirotorFrameType->currentText() == "Quad X") { airframeType = "QuadX"; setupQuad(false); - } else if (m_aircraft->multirotorFrameType->currentText() == "Quad H") { - airframeType = "QuadH"; - setupQuad(false); } else if (m_aircraft->multirotorFrameType->currentText() == "Hexacopter") { airframeType = "Hexa"; setupHexa(true); @@ -840,8 +823,6 @@ void ConfigMultiRotorWidget::updateAirframe(QString frameType) elementId = "quad-x"; } else if (frameType == "QuadP" || frameType == "Quad +") { elementId = "quad-plus"; - } else if (frameType == "QuadH" || frameType == "Quad H") { - elementId = "quad-h"; } else if (frameType == "Hexa" || frameType == "Hexacopter") { elementId = "quad-hexa"; } else if (frameType == "HexaX" || frameType == "Hexacopter X") { diff --git a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp index 198753877..00d3d3811 100644 --- a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp @@ -85,7 +85,6 @@ QStringList ConfigVehicleTypeWidget::getChannelDescriptions() case SystemSettings::AIRFRAMETYPE_TRI: case SystemSettings::AIRFRAMETYPE_QUADX: case SystemSettings::AIRFRAMETYPE_QUADP: - case SystemSettings::AIRFRAMETYPE_QUADH: case SystemSettings::AIRFRAMETYPE_OCTOV: case SystemSettings::AIRFRAMETYPE_OCTOCOAXX: case SystemSettings::AIRFRAMETYPE_OCTOCOAXP: @@ -316,8 +315,7 @@ int ConfigVehicleTypeWidget::frameCategory(QString frameType) || frameType == "Elevon" || frameType == "FixedWingVtail" || frameType == "Vtail") { return ConfigVehicleTypeWidget::FIXED_WING; } else if (frameType == "Tri" || frameType == "Tricopter Y" || frameType == "QuadX" || frameType == "Quad X" - || frameType == "QuadP" || frameType == "Quad +" || frameType == "Quad H" || frameType == "QuadH" - || frameType == "Hexa" || frameType == "Hexacopter" + || frameType == "QuadP" || frameType == "Quad +" || frameType == "Hexa" || frameType == "Hexacopter" || frameType == "HexaX" || frameType == "Hexacopter X" || frameType == "HexaCoax" || frameType == "HexaH" || frameType == "Hexacopter H" || frameType == "Hexacopter Y6" || frameType == "Octo" || frameType == "Octocopter" diff --git a/shared/uavobjectdefinition/systemsettings.xml b/shared/uavobjectdefinition/systemsettings.xml index 8f86537d7..f4f4f540a 100644 --- a/shared/uavobjectdefinition/systemsettings.xml +++ b/shared/uavobjectdefinition/systemsettings.xml @@ -1,7 +1,7 @@ Select airframe type. Currently used by @ref ActuatorModule to choose mixing from @ref ActuatorDesired to @ref ActuatorCommand - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ground/openpilotgcs/src/plugins/config/output.ui b/ground/openpilotgcs/src/plugins/config/output.ui index f804aab1d..4a9211f24 100644 --- a/ground/openpilotgcs/src/plugins/config/output.ui +++ b/ground/openpilotgcs/src/plugins/config/output.ui @@ -6,7 +6,7 @@ 0 0 - 698 + 765 754 @@ -122,8 +122,8 @@ 0 0 - 680 - 672 + 799 + 659 @@ -190,54 +190,83 @@ - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 5 - 20 - - - - - - - - - 0 - 0 - - - - - 0 - 20 - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 5 - 20 - - - + + + + + + + 52 + 52 + + + + + 52 + 52 + + + + background: transparent + + + QFrame::NoFrame + + + QPainter::HighQualityAntialiasing + + + + + + + + 0 + 0 + + + + + 200 + 50 + + + + + 16777215 + 50 + + + + + 10 + 50 + false + + + + Calibration status + + + QFrame::NoFrame + + + Qt::ScrollBarAlwaysOff + + + QAbstractScrollArea::AdjustIgnored + + + Qt::NoTextInteraction + + + + - - + Qt::AlignCenter @@ -281,6 +310,12 @@ 20 + + + 70 + 16777215 + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value @@ -350,6 +385,12 @@ 20 + + + 70 + 16777215 + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value @@ -437,6 +478,12 @@ 20 + + + 70 + 16777215 + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value @@ -502,6 +549,12 @@ 20 + + + 70 + 16777215 + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value @@ -577,6 +630,12 @@ 20 + + + 70 + 16777215 + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value @@ -642,6 +701,12 @@ 20 + + + 70 + 16777215 + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value @@ -690,34 +755,6 @@ - - - - - 0 - 0 - - - - - 0 - 20 - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 5 - 20 - - - - @@ -757,6 +794,12 @@ 20 + + + 70 + 16777215 + + Setup output mode. Use PWM or OneShot with Standard ESCs. Several other ESCs like BLHeli 13+ can use the more advanced OneShot125. @@ -781,6 +824,12 @@ When using OneShot125 all values set in min/max and idle are divided by eight be 20 + + + 70 + 16777215 + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). @@ -803,6 +852,12 @@ When using OneShot125 all values set in min/max and idle are divided by eight be 20 + + + 70 + 16777215 + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). @@ -825,6 +880,12 @@ When using OneShot125 all values set in min/max and idle are divided by eight be 20 + + + 70 + 16777215 + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). @@ -847,6 +908,12 @@ When using OneShot125 all values set in min/max and idle are divided by eight be 20 + + + 70 + 16777215 + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). @@ -869,6 +936,12 @@ When using OneShot125 all values set in min/max and idle are divided by eight be 20 + + + 70 + 16777215 + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). From f3fe45750da4138a332c2dfaad2305aaf9237a67 Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Mon, 9 Feb 2015 00:54:01 +0100 Subject: [PATCH 14/47] OP-1683 - Remove dead code --- flight/pios/stm32f4xx/pios_servo.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/flight/pios/stm32f4xx/pios_servo.c b/flight/pios/stm32f4xx/pios_servo.c index 7e66c09e2..84a450b7f 100644 --- a/flight/pios/stm32f4xx/pios_servo.c +++ b/flight/pios/stm32f4xx/pios_servo.c @@ -142,11 +142,7 @@ void PIOS_Servo_SetBankMode(uint8_t bank, uint8_t mode) } } } - if (mode != PIOS_SERVO_BANK_MODE_PWM) { - // TIM_UpdateDisableConfig(pios_servo_bank_timer[bank], ENABLE); - } else { - // TIM_UpdateDisableConfig(pios_servo_bank_timer[bank], DISABLE); - } + // Setup the timer accordingly TIM_SelectOnePulseMode(pios_servo_bank_timer[bank], TIM_OPMode_Repetitive); TIM_Cmd(pios_servo_bank_timer[bank], ENABLE); From 88dc843f4e9849f673adc05a6edf745ce5b4622d Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Wed, 11 Feb 2015 23:38:01 +0100 Subject: [PATCH 15/47] OP-1718 RcInput calibration : Set output to 1000 for motor, 1500 for all others (servos, reversedMotor, accessory...) --- .../src/plugins/config/configinputwidget.cpp | 29 +++++++++++++++---- .../src/plugins/config/configinputwidget.h | 1 + 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp index f43d63eb2..826e2ca8b 100644 --- a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp @@ -1698,12 +1698,31 @@ void ConfigInputWidget::resetChannelSettings() void ConfigInputWidget::resetActuatorSettings() { actuatorSettingsData = actuatorSettingsObj->getData(); - // Clear all output data : Min, max, neutral = 1500 - // 1500 = servo middle, can be applied to all outputs because board is 'Alwaysdisarmed' + + UAVDataObject *mixer = dynamic_cast(getObjectManager()->getObject(QString("MixerSettings"))); + Q_ASSERT(mixer); + + QString mixerType; + + // Clear all output data : Min, max, neutral at same value + // 1000 for motors and 1500 for all others (Reversable motor included) for (unsigned int output = 0; output < 12; output++) { - actuatorSettingsData.ChannelMax[output] = 1500; - actuatorSettingsData.ChannelMin[output] = 1000; - actuatorSettingsData.ChannelNeutral[output] = 1500; + QString mixerNumType = QString("Mixer%1Type").arg(output + 1); + UAVObjectField *field = mixer->getField(mixerNumType); + Q_ASSERT(field); + + if (field) { + mixerType = field->getValue().toString(); + } + if ((mixerType == "Motor") || (mixerType == "Disabled")) { + actuatorSettingsData.ChannelMax[output] = 1000; + actuatorSettingsData.ChannelMin[output] = 1000; + actuatorSettingsData.ChannelNeutral[output] = 1000; + } else { + actuatorSettingsData.ChannelMax[output] = 1500; + actuatorSettingsData.ChannelMin[output] = 1500; + actuatorSettingsData.ChannelNeutral[output] = 1500; + } actuatorSettingsObj->setData(actuatorSettingsData); } } diff --git a/ground/openpilotgcs/src/plugins/config/configinputwidget.h b/ground/openpilotgcs/src/plugins/config/configinputwidget.h index 913d55f70..49902c07c 100644 --- a/ground/openpilotgcs/src/plugins/config/configinputwidget.h +++ b/ground/openpilotgcs/src/plugins/config/configinputwidget.h @@ -40,6 +40,7 @@ #include "manualcontrolcommand.h" #include "manualcontrolsettings.h" #include "actuatorsettings.h" +#include "mixersettings.h" #include "flightmodesettings.h" #include "receiveractivity.h" #include From 096a321181ff8f826655750033c1a19fd5129ba6 Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Wed, 11 Feb 2015 23:59:23 +0100 Subject: [PATCH 16/47] OP-1685 - calls sanitychecks after updates to actuatorsettings, update board sanitycheck rules --- .../coptercontrol/firmware/pios_board.c | 28 +++++++++++++++---- .../uavobjectdefinition/actuatorsettings.xml | 9 +----- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/flight/targets/boards/coptercontrol/firmware/pios_board.c b/flight/targets/boards/coptercontrol/firmware/pios_board.c index 4bc0857cf..9992da5e6 100644 --- a/flight/targets/boards/coptercontrol/firmware/pios_board.c +++ b/flight/targets/boards/coptercontrol/firmware/pios_board.c @@ -55,6 +55,7 @@ uint32_t pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_NONE]; static SystemAlarmsExtendedAlarmStatusOptions CopterControlConfigHook(); +static void ActuatorSettingsUpdatedCb(UAVObjEvent *ev); #define PIOS_COM_TELEM_RF_RX_BUF_LEN 32 #define PIOS_COM_TELEM_RF_TX_BUF_LEN 12 @@ -848,6 +849,9 @@ void PIOS_Board_Init(void) // Attach the board config check hook SANITYCHECK_AttachHook(&CopterControlConfigHook); + // trigger a config check if actuatorsettings are updated + ActuatorSettingsInitialize(); + ActuatorSettingsConnectCallback(ActuatorSettingsUpdatedCb); } SystemAlarmsExtendedAlarmStatusOptions CopterControlConfigHook() @@ -856,32 +860,44 @@ SystemAlarmsExtendedAlarmStatusOptions CopterControlConfigHook() uint8_t recmode; HwSettingsCC_RcvrPortGet(&recmode); + uint8_t modes[ACTUATORSETTINGS_BANKMODE_NUMELEM]; + ActuatorSettingsBankModeGet(modes); switch ((HwSettingsCC_RcvrPortOptions)recmode) { // Those modes allows oneshot usage case HWSETTINGS_CC_RCVRPORT_DISABLEDONESHOT: case HWSETTINGS_CC_RCVRPORT_OUTPUTSONESHOT: - case HWSETTINGS_CC_RCVRPORT_PPM_PIN6ONESHOT: return SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE; + case HWSETTINGS_CC_RCVRPORT_PPM_PIN6ONESHOT: + if (modes[3] == ACTUATORSETTINGS_BANKMODE_ONESHOT || + modes[3] == ACTUATORSETTINGS_BANKMODE_ONESHOT125) { + return SYSTEMALARMS_EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT; + } else { + return SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE; + } + // inhibit oneshot for the following modes case HWSETTINGS_CC_RCVRPORT_PPMNOONESHOT: case HWSETTINGS_CC_RCVRPORT_PPMOUTPUTSNOONESHOT: case HWSETTINGS_CC_RCVRPORT_PPMPWMNOONESHOT: case HWSETTINGS_CC_RCVRPORT_PWMNOONESHOT: - { - uint8_t modes[ACTUATORSETTINGS_BANKMODE_NUMELEM]; - ActuatorSettingsBankModeGet(modes); for (uint8_t i = 0; i < ACTUATORSETTINGS_BANKMODE_NUMELEM; i++) { if (modes[i] == ACTUATORSETTINGS_BANKMODE_ONESHOT || modes[i] == ACTUATORSETTINGS_BANKMODE_ONESHOT125) { return SYSTEMALARMS_EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT;; } + + return SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE; } - return SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE; - } } return SYSTEMALARMS_EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT;; } +// trigger a configuration check if ActuatorSettings are changed. +void ActuatorSettingsUpdatedCb(__attribute__((unused)) UAVObjEvent *ev) +{ + configuration_check(); +} + /** * @} */ diff --git a/shared/uavobjectdefinition/actuatorsettings.xml b/shared/uavobjectdefinition/actuatorsettings.xml index 8a4d93356..fc7ff0741 100644 --- a/shared/uavobjectdefinition/actuatorsettings.xml +++ b/shared/uavobjectdefinition/actuatorsettings.xml @@ -2,14 +2,7 @@ Settings for the @ref ActuatorModule that controls the channel assignments for the mixer based on AircraftType - + From ed56d39ccc41705bec98139e152f3b41bfe0a96b Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Thu, 12 Feb 2015 00:00:07 +0100 Subject: [PATCH 17/47] OP-1685 - fix warning text in GCS --- .../src/plugins/config/configoutputwidget.cpp | 2 +- .../openpilotgcs/src/plugins/config/output.ui | 1011 +++++++++-------- 2 files changed, 511 insertions(+), 502 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp index 15163a142..03f4727f2 100644 --- a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp @@ -448,7 +448,7 @@ void ConfigOutputWidget::updateWarnings(UAVObject *) if (systemAlarms.Alarm[SystemAlarms::ALARM_SYSTEMCONFIGURATION] > SystemAlarms::ALARM_WARNING) { switch (systemAlarms.ExtendedAlarmStatus[SystemAlarms::EXTENDEDALARMSTATUS_SYSTEMCONFIGURATION]) { case SystemAlarms::EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT: - setWarning(tr("OneShot only works with MainPort settings marked with \"+OneShot\"")); + setWarning(tr("OneShot only works with MainPort settings marked with \"+OneShot\"\nUsing \"PPM_PIN6+OneShot\" bank 4 (output 6) must be set to PWM")); return; } } diff --git a/ground/openpilotgcs/src/plugins/config/output.ui b/ground/openpilotgcs/src/plugins/config/output.ui index 4a9211f24..0ce1d0a9b 100644 --- a/ground/openpilotgcs/src/plugins/config/output.ui +++ b/ground/openpilotgcs/src/plugins/config/output.ui @@ -122,7 +122,7 @@ 0 0 - 799 + 831 659 @@ -160,13 +160,13 @@ Output configuration - - + + - - + Bank(Channels): - Qt::AlignCenter + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -180,88 +180,86 @@ - - + + - Bank(Channels): + - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignCenter - - + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 70 + 16777215 + + + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + + + + - - - - 52 - 52 - - - - - 52 - 52 - - - - background: transparent - - - QFrame::NoFrame - - - QPainter::HighQualityAntialiasing - - + + 50 + - - - - 0 - 0 - - - - - 200 - 50 - - - - - 16777215 - 50 - - - - - 10 - 50 - false - - - - Calibration status - - - QFrame::NoFrame - - - Qt::ScrollBarAlwaysOff - - - QAbstractScrollArea::AdjustIgnored - - - Qt::NoTextInteraction - - + + 60 + - + + + 125 + + + + + 165 + + + + + 270 + + + + + 330 + + + + + 400 + + + + + 490 + + + @@ -273,6 +271,275 @@ + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 70 + 16777215 + + + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + + + + + + + 50 + + + + + 60 + + + + + 125 + + + + + 165 + + + + + 270 + + + + + 330 + + + + + 400 + + + + + 490 + + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 70 + 16777215 + + + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + + + + + + + 50 + + + + + 60 + + + + + 125 + + + + + 165 + + + + + 270 + + + + + 330 + + + + + 400 + + + + + 490 + + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 70 + 16777215 + + + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + + + + + + + 50 + + + + + 60 + + + + + 125 + + + + + 165 + + + + + 270 + + + + + 330 + + + + + 400 + + + + + 490 + + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 70 + 16777215 + + + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 70 + 16777215 + + + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + + + @@ -368,8 +635,8 @@ - - + + false @@ -392,51 +659,88 @@ - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). - - + + + + + + + 0 + 0 + + + + + 0 + 20 + + + + Mode: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 70 + 16777215 + + + + Setup output mode. Use PWM or OneShot with Standard ESCs. +Several other ESCs like BLHeli 13+ can use the more advanced OneShot125. +When using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 70 + 16777215 + + + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). - - - 50 - - - - - 60 - - - - - 125 - - - - - 165 - - - - - 270 - - - - - 330 - - - - - 400 - - - - - 490 - - @@ -461,79 +765,8 @@ - - - - false - - - - 0 - 0 - - - - - 0 - 20 - - - - - 70 - 16777215 - - - - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value - - - - - - - 50 - - - - - 60 - - - - - 125 - - - - - 165 - - - - - 270 - - - - - 330 - - - - - 400 - - - - - 490 - - - - - - + + false @@ -613,312 +846,6 @@ - - - - false - - - - 0 - 0 - - - - - 0 - 20 - - - - - 70 - 16777215 - - - - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value - - - - - - - 50 - - - - - 60 - - - - - 125 - - - - - 165 - - - - - 270 - - - - - 330 - - - - - 400 - - - - - 490 - - - - - - - - false - - - - 0 - 0 - - - - - 0 - 20 - - - - - 70 - 16777215 - - - - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value - - - - - - - 50 - - - - - 60 - - - - - 125 - - - - - 165 - - - - - 270 - - - - - 330 - - - - - 400 - - - - - 490 - - - - - - - - - 0 - 0 - - - - - 0 - 20 - - - - Mode: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - false - - - - 0 - 0 - - - - - 0 - 20 - - - - - 70 - 16777215 - - - - Setup output mode. Use PWM or OneShot with Standard ESCs. -Several other ESCs like BLHeli 13+ can use the more advanced OneShot125. -When using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). - - - - - - - false - - - - 0 - 0 - - - - - 0 - 20 - - - - - 70 - 16777215 - - - - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). - - - - - - - false - - - - 0 - 0 - - - - - 0 - 20 - - - - - 70 - 16777215 - - - - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). - - - - - - - false - - - - 0 - 0 - - - - - 0 - 20 - - - - - 70 - 16777215 - - - - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). - - - - - - - false - - - - 0 - 0 - - - - - 0 - 20 - - - - - 70 - 16777215 - - - - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). - - - @@ -947,6 +874,88 @@ When using OneShot125 all values set in min/max and idle are divided by eight be + + + + 0 + + + + + + 32 + 32 + + + + + 32 + 32 + + + + background: transparent + + + QFrame::NoFrame + + + Qt::AlignCenter + + + QPainter::HighQualityAntialiasing + + + + + + + + 0 + 0 + + + + + 200 + 50 + + + + + 16777215 + 90 + + + + + 10 + 50 + false + + + + Calibration status + + + background-color: transparent; + + + QFrame::NoFrame + + + Qt::ScrollBarAlwaysOff + + + QAbstractScrollArea::AdjustIgnored + + + Qt::NoTextInteraction + + + + + From 1ad040229c29dd7c16ba5572fee5b15d53cfe67b Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Thu, 12 Feb 2015 00:00:17 +0100 Subject: [PATCH 18/47] OP-1685 - implement PPM on pin 6 --- flight/targets/boards/coptercontrol/board_hw_defs.c | 12 ++++++++++++ .../boards/coptercontrol/firmware/pios_board.c | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/flight/targets/boards/coptercontrol/board_hw_defs.c b/flight/targets/boards/coptercontrol/board_hw_defs.c index 6463451b3..2a22cf78a 100644 --- a/flight/targets/boards/coptercontrol/board_hw_defs.c +++ b/flight/targets/boards/coptercontrol/board_hw_defs.c @@ -1247,6 +1247,18 @@ const struct pios_ppm_cfg pios_ppm_cfg = { .num_channels = 1, }; +const struct pios_ppm_cfg pios_ppm_pin6_cfg = { + .tim_ic_init = { + .TIM_ICPolarity = TIM_ICPolarity_Rising, + .TIM_ICSelection = TIM_ICSelection_DirectTI, + .TIM_ICPrescaler = TIM_ICPSC_DIV1, + .TIM_ICFilter = 0x0, + }, + /* Use only the first channel for ppm */ + .channels = &pios_tim_rcvrport_all_channels[5], + .num_channels = 1, +}; + #endif /* PIOS_INCLUDE_PPM */ #if defined(PIOS_INCLUDE_PPM_FLEXI) diff --git a/flight/targets/boards/coptercontrol/firmware/pios_board.c b/flight/targets/boards/coptercontrol/firmware/pios_board.c index 9992da5e6..e49597ead 100644 --- a/flight/targets/boards/coptercontrol/firmware/pios_board.c +++ b/flight/targets/boards/coptercontrol/firmware/pios_board.c @@ -742,10 +742,15 @@ void PIOS_Board_Init(void) break; case HWSETTINGS_CC_RCVRPORT_PPMNOONESHOT: case HWSETTINGS_CC_RCVRPORT_PPMOUTPUTSNOONESHOT: + case HWSETTINGS_CC_RCVRPORT_PPM_PIN6ONESHOT: #if defined(PIOS_INCLUDE_PPM) { uint32_t pios_ppm_id; - PIOS_PPM_Init(&pios_ppm_id, &pios_ppm_cfg); + if( hwsettings_rcvrport == HWSETTINGS_CC_RCVRPORT_PPM_PIN6ONESHOT){ + PIOS_PPM_Init(&pios_ppm_id, &pios_ppm_pin6_cfg); + } else { + PIOS_PPM_Init(&pios_ppm_id, &pios_ppm_cfg); + } uint32_t pios_ppm_rcvr_id; if (PIOS_RCVR_Init(&pios_ppm_rcvr_id, &pios_ppm_rcvr_driver, pios_ppm_id)) { From d9216d72fe9d5d241c91ce404087f8736696ec96 Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Sat, 14 Feb 2015 17:23:27 +0100 Subject: [PATCH 19/47] OP-1685 - Fixes for review comments --- .../src/plugins/config/configoutputwidget.cpp | 10 ++++++++-- .../src/plugins/config/configoutputwidget.h | 2 -- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp index 03f4727f2..36cdcd951 100644 --- a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp @@ -106,7 +106,7 @@ ConfigOutputWidget::ConfigOutputWidget(QWidget *parent) : ConfigTaskWidget(paren addWidgetBinding("ActuatorSettings", "BankMode", ui->cb_outputMode5, 4, 0, true); addWidgetBinding("ActuatorSettings", "BankMode", ui->cb_outputMode6, 5, 0, true); - systemAlarmsObj = SystemAlarms::GetInstance(getObjectManager()); + SystemAlarms *systemAlarmsObj = SystemAlarms::GetInstance(getObjectManager()); connect(systemAlarmsObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(updateWarnings(UAVObject *))); disconnect(this, SLOT(refreshWidgetsValues(UAVObject *))); @@ -115,11 +115,13 @@ ConfigOutputWidget::ConfigOutputWidget(QWidget *parent) : ConfigTaskWidget(paren refreshWidgetsValues(); updateEnableControls(); - setWarning("PIppo"); } ConfigOutputWidget::~ConfigOutputWidget() { + SystemAlarms *systemAlarmsObj = SystemAlarms::GetInstance(getObjectManager()); + + disconnect(systemAlarmsObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(updateWarnings(UAVObject *))); // Do nothing } @@ -150,6 +152,7 @@ void ConfigOutputWidget::sendAllChannelTests() */ void ConfigOutputWidget::runChannelTests(bool state) { + SystemAlarms *systemAlarmsObj = SystemAlarms::GetInstance(getObjectManager()); SystemAlarms::DataFields systemAlarms = systemAlarmsObj->getData(); if (state && systemAlarms.Alarm[SystemAlarms::ALARM_ACTUATOR] != SystemAlarms::ALARM_OK) { @@ -443,6 +446,7 @@ void ConfigOutputWidget::stopTests() void ConfigOutputWidget::updateWarnings(UAVObject *) { + SystemAlarms *systemAlarmsObj = SystemAlarms::GetInstance(getObjectManager()); SystemAlarms::DataFields systemAlarms = systemAlarmsObj->getData(); if (systemAlarms.Alarm[SystemAlarms::ALARM_SYSTEMCONFIGURATION] > SystemAlarms::ALARM_WARNING) { @@ -457,6 +461,8 @@ void ConfigOutputWidget::updateWarnings(UAVObject *) void ConfigOutputWidget::setWarning(QString message) { + QPixmap warningPic; + ui->gvWarning->scene()->clear(); if (!message.isNull()) { warningPic.load(":/configgadget/images/error.svg"); diff --git a/ground/openpilotgcs/src/plugins/config/configoutputwidget.h b/ground/openpilotgcs/src/plugins/config/configoutputwidget.h index c495bbd65..2478ca902 100644 --- a/ground/openpilotgcs/src/plugins/config/configoutputwidget.h +++ b/ground/openpilotgcs/src/plugins/config/configoutputwidget.h @@ -57,7 +57,6 @@ private: Ui_OutputWidget *ui; QList sliders; - QPixmap warningPic; void updateChannelInSlider(QSlider *slider, QLabel *min, QLabel *max, QCheckBox *rev, int value); void assignOutputChannel(UAVDataObject *obj, QString &str); @@ -72,7 +71,6 @@ private: UAVObject::Metadata accInitialData; - SystemAlarms *systemAlarmsObj; private slots: void updateWarnings(UAVObject *); void stopTests(); From f1f8e285e9184e77e9ec9cddb9231456d0e5b59f Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sat, 14 Feb 2015 19:52:47 +0100 Subject: [PATCH 20/47] OP-1723 Ground config tab : Allow reverse/brake in RcCar --- .../configgroundvehiclewidget.cpp | 44 +++++++++++++------ 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configgroundvehiclewidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configgroundvehiclewidget.cpp index 87dc480f6..338dcc874 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configgroundvehiclewidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configgroundvehiclewidget.cpp @@ -60,10 +60,10 @@ QStringList ConfigGroundVehicleWidget::getChannelDescriptions() channelDesc[configData.ground.GroundVehicleSteering2 - 1] = QString("GroundSteering2"); } if (configData.ground.GroundVehicleThrottle1 > 0) { - channelDesc[configData.ground.GroundVehicleThrottle1 - 1] = QString("GroundThrottle1"); + channelDesc[configData.ground.GroundVehicleThrottle1 - 1] = QString("GroundMotor1"); } if (configData.ground.GroundVehicleThrottle2 > 0) { - channelDesc[configData.ground.GroundVehicleThrottle2 - 1] = QString("GroundThrottle2"); + channelDesc[configData.ground.GroundVehicleThrottle2 - 1] = QString("GroundMotor2"); } return channelDesc; } @@ -116,6 +116,13 @@ void ConfigGroundVehicleWidget::setupUI(QString frameType) m_aircraft->gvThrottleCurve1GroupBox->setEnabled(true); m_aircraft->gvThrottleCurve2GroupBox->setEnabled(true); + // Default Curve2 range -1 -> +1, allow forward/reverse (Car and Tank) + m_aircraft->groundVehicleThrottle1->setMixerType(MixerCurve::MIXERCURVE_THROTTLE); + m_aircraft->groundVehicleThrottle2->setMixerType(MixerCurve::MIXERCURVE_PITCH); + + initMixerCurves(frameType); + + if (frameType == "GroundVehicleDifferential" || frameType == "Differential (tank)") { // Tank m_vehicleImg->setElementId("tank"); @@ -159,9 +166,9 @@ void ConfigGroundVehicleWidget::setupUI(QString frameType) // Motorcycle m_vehicleImg->setElementId("motorbike"); setComboCurrentIndex(m_aircraft->groundVehicleType, m_aircraft->groundVehicleType->findText("Motorcycle")); - m_aircraft->gvMotor1ChannelBox->setEnabled(false); - m_aircraft->gvMotor2ChannelBox->setEnabled(true); - m_aircraft->gvThrottleCurve1GroupBox->setEnabled(false); + + m_aircraft->gvMotor1ChannelBox->setEnabled(true); + m_aircraft->gvMotor2ChannelBox->setEnabled(false); m_aircraft->gvMotor2Label->setText("Rear motor"); @@ -171,7 +178,11 @@ void ConfigGroundVehicleWidget::setupUI(QString frameType) m_aircraft->gvSteering1Label->setText("Front steering"); m_aircraft->gvSteering2Label->setText("Balancing"); - m_aircraft->gvThrottleCurve2GroupBox->setTitle("Rear throttle curve"); + // Curve1 for Motorcyle + m_aircraft->gvThrottleCurve1GroupBox->setTitle("Rear throttle curve"); + m_aircraft->gvThrottleCurve1GroupBox->setEnabled(true); + m_aircraft->gvThrottleCurve2GroupBox->setTitle(""); + m_aircraft->gvThrottleCurve2GroupBox->setEnabled(false); // Curve range 0 -> +1 (no reverse) m_aircraft->groundVehicleThrottle2->setMixerType(MixerCurve::MIXERCURVE_THROTTLE); @@ -201,19 +212,24 @@ void ConfigGroundVehicleWidget::setupUI(QString frameType) m_aircraft->gvSteering1Label->setText("Front steering"); m_aircraft->gvSteering2Label->setText("Rear steering"); - m_aircraft->gvThrottleCurve1GroupBox->setTitle("Front throttle curve"); - m_aircraft->gvThrottleCurve2GroupBox->setTitle("Rear throttle curve"); + // Curve2 for Car + m_aircraft->gvThrottleCurve2GroupBox->setTitle("Throttle curve"); + m_aircraft->gvThrottleCurve2GroupBox->setEnabled(true); + m_aircraft->gvThrottleCurve1GroupBox->setTitle(""); + m_aircraft->gvThrottleCurve1GroupBox->setEnabled(false); - m_aircraft->groundVehicleThrottle2->setMixerType(MixerCurve::MIXERCURVE_THROTTLE); + m_aircraft->groundVehicleThrottle2->setMixerType(MixerCurve::MIXERCURVE_PITCH); m_aircraft->groundVehicleThrottle1->setMixerType(MixerCurve::MIXERCURVE_THROTTLE); initMixerCurves(frameType); // If new setup, set curves values if (frameTypeSaved->getValue().toString() != "GroundVehicleCar") { - // Curve range 0 -> +1 (no reverse) m_aircraft->groundVehicleThrottle1->initLinearCurve(5, 1.0); - m_aircraft->groundVehicleThrottle2->initLinearCurve(5, 1.0); + // Set curve2 range from -0.926 to 1 (forward / reverse) + // Take in account 4% offset in Throttle input after calibration + // 0.5 / 0.54 = 0.926 + m_aircraft->groundVehicleThrottle2->initLinearCurve(5, 1.0, -0.926); } } @@ -321,6 +337,8 @@ void ConfigGroundVehicleWidget::initMixerCurves(QString frameType) // no, init a straight curve if (frameType == "GroundVehicleDifferential") { m_aircraft->groundVehicleThrottle2->initLinearCurve(curveValues.count(), 0.8, -0.8); + } else if (frameType == "GroundVehicleCar") { + m_aircraft->groundVehicleThrottle2->initLinearCurve(curveValues.count(), 1.0, -1.0); } else { m_aircraft->groundVehicleThrottle2->initLinearCurve(curveValues.count(), 1.0); } @@ -388,7 +406,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleMotorcycle(QString airframeTyp // motor int channel = m_aircraft->gvMotor2ChannelBox->currentIndex() - 1; - setMixerType(mixer, channel, VehicleConfig::MIXERTYPE_REVERSABLEMOTOR); + setMixerType(mixer, channel, VehicleConfig::MIXERTYPE_MOTOR); setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_THROTTLECURVE1, 127); setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_YAW, 127); @@ -495,7 +513,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleCar(QString airframeType) channel = m_aircraft->gvMotor1ChannelBox->currentIndex() - 1; setMixerType(mixer, channel, VehicleConfig::MIXERTYPE_REVERSABLEMOTOR); - setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_THROTTLECURVE1, 127); + setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_THROTTLECURVE2, 127); channel = m_aircraft->gvMotor2ChannelBox->currentIndex() - 1; setMixerType(mixer, channel, VehicleConfig::MIXERTYPE_REVERSABLEMOTOR); From c645738bc576038c1b3abf978d856f29db4ef2d8 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sun, 15 Feb 2015 18:32:01 +0100 Subject: [PATCH 21/47] OP-1723 Ground wizard, reversable motor support - Fixes default outputs levels issue (OP-1718) --- .../pages/outputcalibrationpage.cpp | 70 +++++++++++++++---- .../pages/outputcalibrationpage.ui | 40 +++++++++-- .../vehicleconfigurationhelper.cpp | 29 +++++--- .../setupwizard/vehicleconfigurationsource.h | 3 +- 4 files changed, 113 insertions(+), 29 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp index cdf95e5c1..623669038 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp @@ -54,6 +54,8 @@ OutputCalibrationPage::~OutputCalibrationPage() delete m_calibrationUtil; m_calibrationUtil = 0; } + + OutputCalibrationUtil::stopOutputCalibration(); delete ui; } @@ -70,24 +72,39 @@ void OutputCalibrationPage::setupActuatorMinMaxAndNeutral(int motorChannelStart, // servos since a value out of range can actually destroy the // vehicle if unlucky. // Motors are not that important. REMOVE propellers always!! + OutputCalibrationUtil::startOutputCalibration(); for (int servoid = 0; servoid < 12; servoid++) { if (servoid >= motorChannelStart && servoid <= motorChannelEnd) { // Set to motor safe values - m_actuatorSettings[servoid].channelMin = 1000; - m_actuatorSettings[servoid].channelNeutral = 1000; - m_actuatorSettings[servoid].channelMax = 1900; + m_actuatorSettings[servoid].channelMin = 1000; + m_actuatorSettings[servoid].channelNeutral = 1000; + m_actuatorSettings[servoid].channelMax = 1900; + m_actuatorSettings[servoid].isReversableMotor = false; + // Car and Tank should use reversable Esc/motors + if ((getWizard()->getVehicleSubType() == SetupWizard::GROUNDVEHICLE_CAR) + || (getWizard()->getVehicleSubType() == SetupWizard::GROUNDVEHICLE_DIFFERENTIAL)) { + m_actuatorSettings[servoid].channelNeutral = 1500; + m_actuatorSettings[servoid].isReversableMotor = true; + // Set initial output value + m_calibrationUtil->startChannelOutput(servoid, 1500); + m_calibrationUtil->stopChannelOutput(); + } } else if (servoid < totalUsedChannels) { // Set to servo safe values m_actuatorSettings[servoid].channelMin = 1500; m_actuatorSettings[servoid].channelNeutral = 1500; m_actuatorSettings[servoid].channelMax = 1500; + // Set initial servo output value + m_calibrationUtil->startChannelOutput(servoid, 1500); + m_calibrationUtil->stopChannelOutput(); } else { // "Disable" these channels m_actuatorSettings[servoid].channelMin = 1000; m_actuatorSettings[servoid].channelNeutral = 1000; m_actuatorSettings[servoid].channelMax = 1000; } + qDebug() << "**** " << servoid << " ***** " << m_actuatorSettings[servoid].channelMin << " " << m_actuatorSettings[servoid].channelNeutral << " " << m_actuatorSettings[servoid].channelMax; } } @@ -101,6 +118,12 @@ void OutputCalibrationPage::setupVehicle() m_currentWizardIndex = 0; m_vehicleScene->clear(); + if (m_calibrationUtil) { + delete m_calibrationUtil; + m_calibrationUtil = 0; + } + m_calibrationUtil = new OutputCalibrationUtil(); + switch (getWizard()->getVehicleSubType()) { case SetupWizard::MULTI_ROTOR_TRI_Y: // Loads the SVG file resourse and sets the scene @@ -120,7 +143,7 @@ void OutputCalibrationPage::setupVehicle() // The channel number to configure for each step. m_channelIndex << 0 << 0 << 1 << 2 << 3; - setupActuatorMinMaxAndNeutral(0, 2, 3); + setupActuatorMinMaxAndNeutral(0, 2, 4); getWizard()->setActuatorSettings(m_actuatorSettings); break; @@ -213,7 +236,7 @@ void OutputCalibrationPage::setupVehicle() m_vehicleHighlightElementIndexes << 0 << 1 << 2 << 3 << 4 << 5; m_channelIndex << 0 << 2 << 0 << 5 << 3 << 1; - setupActuatorMinMaxAndNeutral(2, 2, 5); + setupActuatorMinMaxAndNeutral(2, 2, 6); // should be 5 instead 6 but output 5 is not used getWizard()->setActuatorSettings(m_actuatorSettings); break; @@ -226,7 +249,7 @@ void OutputCalibrationPage::setupVehicle() m_vehicleHighlightElementIndexes << 0 << 1 << 2; m_channelIndex << 0 << 1 << 0; - setupActuatorMinMaxAndNeutral(0, 1, 2); + setupActuatorMinMaxAndNeutral(1, 1, 2); getWizard()->setActuatorSettings(m_actuatorSettings); break; @@ -248,7 +271,7 @@ void OutputCalibrationPage::setupVehicle() m_vehicleHighlightElementIndexes << 0 << 1 << 2; m_channelIndex << 0 << 1 << 0; - setupActuatorMinMaxAndNeutral(0, 1, 2); + setupActuatorMinMaxAndNeutral(1, 1, 2); getWizard()->setActuatorSettings(m_actuatorSettings); break; @@ -257,12 +280,6 @@ void OutputCalibrationPage::setupVehicle() break; } - if (m_calibrationUtil) { - delete m_calibrationUtil; - m_calibrationUtil = 0; - } - m_calibrationUtil = new OutputCalibrationUtil(); - setupVehicleItems(); } @@ -326,7 +343,15 @@ void OutputCalibrationPage::setWizardPage() if (currentChannel >= 0) { if (currentPageIndex == 1) { ui->motorNeutralSlider->setValue(m_actuatorSettings[currentChannel].channelNeutral); + ui->motorPWMValue->setText(QString("Output value : %1 µs").arg(m_actuatorSettings[currentChannel].channelNeutral)); + // Reversable motor found + if (m_actuatorSettings[currentChannel].isReversableMotor) { + ui->motorNeutralSlider->setMinimum(m_actuatorSettings[currentChannel].channelMin); + ui->motorNeutralSlider->setMaximum(m_actuatorSettings[currentChannel].channelMax); + ui->motorInfo->setText(tr("

To find the neutral rate for this reversable motor, press the Start button below and slide the slider to the right or left until you find the value where the motor don't start.

When done press button again to stop.

")); + } } else if (currentPageIndex == 2) { + ui->servoPWMValue->setText(QString("Output value : %1 µs").arg(m_actuatorSettings[currentChannel].channelNeutral)); if (m_actuatorSettings[currentChannel].channelMax < m_actuatorSettings[currentChannel].channelMin && !ui->reverseCheckbox->isChecked()) { ui->reverseCheckbox->setChecked(true); @@ -416,6 +441,11 @@ void OutputCalibrationPage::on_motorNeutralButton_toggled(bool checked) ui->motorNeutralSlider->setEnabled(checked); quint16 channel = getCurrentChannel(); quint16 safeValue = m_actuatorSettings[channel].channelMin; + + if (m_actuatorSettings[channel].isReversableMotor) { + safeValue = m_actuatorSettings[channel].channelNeutral; + } + onStartButtonToggle(ui->motorNeutralButton, channel, m_actuatorSettings[channel].channelNeutral, safeValue, ui->motorNeutralSlider); } @@ -425,7 +455,6 @@ void OutputCalibrationPage::onStartButtonToggle(QAbstractButton *button, quint16 if (checkAlarms()) { enableButtons(false); enableServoSliders(true); - OutputCalibrationUtil::startOutputCalibration(); m_calibrationUtil->startChannelOutput(channel, safeValue); slider->setValue(value); m_calibrationUtil->setChannelOutputValue(value); @@ -433,8 +462,16 @@ void OutputCalibrationPage::onStartButtonToggle(QAbstractButton *button, quint16 button->setChecked(false); } } else { + // Servos and ReversableMotors + m_calibrationUtil->startChannelOutput(channel, m_actuatorSettings[channel].channelNeutral); + + // Normal motor + if ((button->objectName() == "motorNeutralButton") && !m_actuatorSettings[channel].isReversableMotor) { + m_calibrationUtil->startChannelOutput(channel, m_actuatorSettings[channel].channelMin); + } + m_calibrationUtil->stopChannelOutput(); - OutputCalibrationUtil::stopOutputCalibration(); + enableServoSliders(false); enableButtons(true); } @@ -492,6 +529,8 @@ void OutputCalibrationPage::debugLogChannelValues() void OutputCalibrationPage::on_motorNeutralSlider_valueChanged(int value) { Q_UNUSED(value); + ui->motorPWMValue->setText(QString("Output value : %1 µs").arg(value)); + if (ui->motorNeutralButton->isChecked()) { quint16 value = ui->motorNeutralSlider->value(); m_calibrationUtil->setChannelOutputValue(value); @@ -515,6 +554,7 @@ void OutputCalibrationPage::on_servoCenterAngleSlider_valueChanged(int position) m_calibrationUtil->setChannelOutputValue(value); quint16 channel = getCurrentChannel(); m_actuatorSettings[channel].channelNeutral = value; + ui->servoPWMValue->setText(QString("Output value : %1 µs").arg(value)); // Adjust min and max if (ui->reverseCheckbox->isChecked()) { diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.ui b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.ui index 1fdb2d918..202b766a2 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.ui +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.ui @@ -6,8 +6,8 @@ 0 0 - 600 - 400 + 776 + 505 @@ -94,8 +94,10 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">In this step we will set the neutral rate for the motor highlighted in the illustration to the right. <br />Please pay attention to the details and in particular the motors position and its rotation direction. Ensure the motors are spinning in the correct direction as shown in the diagram. Swap any 2 motor wires to change the direction of a motor. </span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">To find </span><span style=" font-size:10pt; font-weight:600;">the neutral rate for this motor</span><span style=" font-size:10pt;">, press the Start button below and slide the slider to the right until the motor just starts to spin stable. <br /><br />When done press button again to stop.</span></p></body></html> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">In this step we will set the neutral rate for the motor highlighted in the illustration to the right. <br />Please pay attention to the details and in particular the motors position and its rotation direction. Ensure the motors are spinning in the correct direction as shown in the diagram. Swap any 2 motor wires to change the direction of a motor. </span></p></body></html> + + + Qt::RichText Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop @@ -105,6 +107,29 @@ p, li { white-space: pre-wrap; } + + + + <html><head/><body><p><span style=" font-size:10pt;">To find </span><span style=" font-size:10pt; font-weight:600;">the neutral rate for this motor</span><span style=" font-size:10pt;">, press the Start button below and slide the slider to the right until the motor just starts to spin stable. <br/><br/>When done press button again to stop.</span></p></body></html> + + + Qt::RichText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + Output value: 1000µs + + + @@ -184,6 +209,13 @@ p, li { white-space: pre-wrap; } + + + + Output value: 1000µs + + + diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp index 81bf4fd40..06f3056a1 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp @@ -679,8 +679,10 @@ void VehicleConfigurationHelper::applyMixerConfiguration(mixerChannelSettings ch } } - // Default maxThrottle + // Default maxThrottle and minThrottle float maxThrottle = 0.9; + float minThrottle = 0; + // Save mixer values for sliders switch (m_configSource->getVehicleType()) { @@ -737,17 +739,26 @@ void VehicleConfigurationHelper::applyMixerConfiguration(mixerChannelSettings ch { switch (m_configSource->getVehicleSubType()) { case VehicleConfigurationSource::GROUNDVEHICLE_MOTORCYCLE: - case VehicleConfigurationSource::GROUNDVEHICLE_CAR: mSettings->setMixerValueRoll(100); mSettings->setMixerValuePitch(100); mSettings->setMixerValueYaw(100); maxThrottle = 1; break; + case VehicleConfigurationSource::GROUNDVEHICLE_CAR: + mSettings->setMixerValueRoll(100); + mSettings->setMixerValuePitch(100); + mSettings->setMixerValueYaw(100); + // Set curve2 range from -0.926 to 1 : take in account 4% offset in Throttle input + // 0.5 / 0.54 = 0.926 + maxThrottle = 1; + minThrottle = -0.926; + break; case VehicleConfigurationSource::GROUNDVEHICLE_DIFFERENTIAL: mSettings->setMixerValueRoll(100); mSettings->setMixerValuePitch(100); mSettings->setMixerValueYaw(100); maxThrottle = 0.8; + minThrottle = -0.8; break; default: break; @@ -765,7 +776,7 @@ void VehicleConfigurationHelper::applyMixerConfiguration(mixerChannelSettings ch UAVObjectField *field = mSettings->getField(throttlePattern.arg(i)); Q_ASSERT(field); for (quint32 i = 0; i < field->getNumElements(); i++) { - field->setValue(i * (maxThrottle / (field->getNumElements() - 1)), i); + field->setValue(minThrottle + (i * ((maxThrottle - minThrottle) / (field->getNumElements() - 1))), i); } } @@ -2033,7 +2044,7 @@ void VehicleConfigurationHelper::setupCar() channels[0].yaw = 100; // Motor (Chan 2) - channels[1].type = MIXER_TYPE_MOTOR; + channels[1].type = MIXER_TYPE_REVERSABLEMOTOR; channels[1].throttle1 = 0; channels[1].throttle2 = 100; channels[1].roll = 0; @@ -2058,7 +2069,7 @@ void VehicleConfigurationHelper::setupTank() GUIConfigDataUnion guiSettings = getGUIConfigData(); // Left Motor (Chan 1) - channels[0].type = MIXER_TYPE_SERVO; + channels[0].type = MIXER_TYPE_REVERSABLEMOTOR; channels[0].throttle1 = 0; channels[0].throttle2 = 100; channels[0].roll = 0; @@ -2066,7 +2077,7 @@ void VehicleConfigurationHelper::setupTank() channels[0].yaw = 100; // Right Motor (Chan 2) - channels[1].type = MIXER_TYPE_MOTOR; + channels[1].type = MIXER_TYPE_REVERSABLEMOTOR; channels[1].throttle1 = 0; channels[1].throttle2 = 100; channels[1].roll = 0; @@ -2098,10 +2109,10 @@ void VehicleConfigurationHelper::setupMotorcycle() channels[0].pitch = 0; channels[0].yaw = 100; - // Motor (Chan 2) + // Motor (Chan 2) : Curve1, no reverse channels[1].type = MIXER_TYPE_MOTOR; - channels[1].throttle1 = 0; - channels[1].throttle2 = 100; + channels[1].throttle1 = 100; + channels[1].throttle2 = 0; channels[1].roll = 0; channels[1].pitch = 0; channels[1].yaw = 0; diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationsource.h b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationsource.h index 37fcbe1a7..e9483c071 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationsource.h +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationsource.h @@ -46,9 +46,10 @@ struct actuatorChannelSettings { quint16 channelMin; quint16 channelNeutral; quint16 channelMax; + bool isReversableMotor; // Default values - actuatorChannelSettings() : channelMin(1000), channelNeutral(1000), channelMax(1900) {} + actuatorChannelSettings() : channelMin(1000), channelNeutral(1000), channelMax(1900), isReversableMotor(false) {} }; From fbdd88c161053eaf4bf2ab9c67a6166544c1dbca Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Sun, 15 Feb 2015 19:08:49 +0100 Subject: [PATCH 22/47] OP-1685 - handle servo outputs with PPM_Pin6, sanity check for flexi_ppm --- .../coptercontrol/firmware/pios_board.c | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/flight/targets/boards/coptercontrol/firmware/pios_board.c b/flight/targets/boards/coptercontrol/firmware/pios_board.c index e49597ead..3254e8fe8 100644 --- a/flight/targets/boards/coptercontrol/firmware/pios_board.c +++ b/flight/targets/boards/coptercontrol/firmware/pios_board.c @@ -717,7 +717,7 @@ void PIOS_Board_Init(void) uint8_t hwsettings_rcvrport; HwSettingsCC_RcvrPortGet(&hwsettings_rcvrport); - switch (hwsettings_rcvrport) { + switch ((HwSettingsCC_RcvrPortOptions)hwsettings_rcvrport) { case HWSETTINGS_CC_RCVRPORT_DISABLEDONESHOT: #if defined(PIOS_INCLUDE_HCSR04) { @@ -746,7 +746,7 @@ void PIOS_Board_Init(void) #if defined(PIOS_INCLUDE_PPM) { uint32_t pios_ppm_id; - if( hwsettings_rcvrport == HWSETTINGS_CC_RCVRPORT_PPM_PIN6ONESHOT){ + if (hwsettings_rcvrport == HWSETTINGS_CC_RCVRPORT_PPM_PIN6ONESHOT) { PIOS_PPM_Init(&pios_ppm_id, &pios_ppm_pin6_cfg); } else { PIOS_PPM_Init(&pios_ppm_id, &pios_ppm_cfg); @@ -787,6 +787,8 @@ void PIOS_Board_Init(void) } #endif /* PIOS_INCLUDE_PWM */ break; + case HWSETTINGS_CC_RCVRPORT_OUTPUTSONESHOT: + break; } #if defined(PIOS_INCLUDE_GCSRCVR) @@ -804,11 +806,12 @@ void PIOS_Board_Init(void) GPIO_PinRemapConfig(GPIO_Remap_SWJ_NoJTRST, ENABLE); #ifndef PIOS_ENABLE_DEBUG_PINS - switch (hwsettings_rcvrport) { + switch ((HwSettingsCC_RcvrPortOptions)hwsettings_rcvrport) { case HWSETTINGS_CC_RCVRPORT_DISABLEDONESHOT: case HWSETTINGS_CC_RCVRPORT_PWMNOONESHOT: case HWSETTINGS_CC_RCVRPORT_PPMNOONESHOT: case HWSETTINGS_CC_RCVRPORT_PPMPWMNOONESHOT: + case HWSETTINGS_CC_RCVRPORT_PPM_PIN6ONESHOT: PIOS_Servo_Init(&pios_servo_cfg); break; case HWSETTINGS_CC_RCVRPORT_PPMOUTPUTSNOONESHOT: @@ -865,17 +868,20 @@ SystemAlarmsExtendedAlarmStatusOptions CopterControlConfigHook() uint8_t recmode; HwSettingsCC_RcvrPortGet(&recmode); + uint8_t flexiMode; uint8_t modes[ACTUATORSETTINGS_BANKMODE_NUMELEM]; ActuatorSettingsBankModeGet(modes); + HwSettingsCC_FlexiPortGet(&flexiMode); + switch ((HwSettingsCC_RcvrPortOptions)recmode) { // Those modes allows oneshot usage case HWSETTINGS_CC_RCVRPORT_DISABLEDONESHOT: case HWSETTINGS_CC_RCVRPORT_OUTPUTSONESHOT: - return SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE; - case HWSETTINGS_CC_RCVRPORT_PPM_PIN6ONESHOT: - if (modes[3] == ACTUATORSETTINGS_BANKMODE_ONESHOT || - modes[3] == ACTUATORSETTINGS_BANKMODE_ONESHOT125) { + if ((recmode == HWSETTINGS_CC_RCVRPORT_PPM_PIN6ONESHOT || + flexiMode == HWSETTINGS_CC_FLEXIPORT_PPM) && + (modes[3] == ACTUATORSETTINGS_BANKMODE_ONESHOT || + modes[3] == ACTUATORSETTINGS_BANKMODE_ONESHOT125)) { return SYSTEMALARMS_EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT; } else { return SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE; From b6937764aac1985612058f08a8e3b599648fbcc5 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sun, 15 Feb 2015 20:51:49 +0100 Subject: [PATCH 23/47] OP-1718 Set all servos outputs to 1500 before plug battery for Esc calibration (Tricopter) --- .../plugins/setupwizard/pages/esccalibrationpage.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/esccalibrationpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/esccalibrationpage.cpp index 4936a2260..04888a5dd 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/esccalibrationpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/esccalibrationpage.cpp @@ -104,6 +104,16 @@ void EscCalibrationPage::startButtonClicked() QString mixerTypePattern = "Mixer%1Type"; OutputCalibrationUtil::startOutputCalibration(); + // First check if any servo and set his value to 1500 (like Tricopter) + for (quint32 i = 0; i < ActuatorSettings::CHANNELADDR_NUMELEM; i++) { + UAVObjectField *field = mSettings->getField(mixerTypePattern.arg(i + 1)); + Q_ASSERT(field); + if (field->getValue().toString() == field->getOptions().at(VehicleConfigurationHelper::MIXER_TYPE_SERVO)) { + m_outputUtil.startChannelOutput(i, 1500); + m_outputUtil.stopChannelOutput(); + } + } + // Find motors and start Esc procedure for (quint32 i = 0; i < ActuatorSettings::CHANNELADDR_NUMELEM; i++) { UAVObjectField *field = mSettings->getField(mixerTypePattern.arg(i + 1)); Q_ASSERT(field); From f4e11fa6ef4e355819e31da8e448aa6053bb8e01 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sun, 15 Feb 2015 21:35:39 +0100 Subject: [PATCH 24/47] OP-1723 Missing tr() - removed debug code --- .../plugins/setupwizard/pages/outputcalibrationpage.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp index 623669038..d188c828a 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp @@ -104,7 +104,6 @@ void OutputCalibrationPage::setupActuatorMinMaxAndNeutral(int motorChannelStart, m_actuatorSettings[servoid].channelNeutral = 1000; m_actuatorSettings[servoid].channelMax = 1000; } - qDebug() << "**** " << servoid << " ***** " << m_actuatorSettings[servoid].channelMin << " " << m_actuatorSettings[servoid].channelNeutral << " " << m_actuatorSettings[servoid].channelMax; } } @@ -343,7 +342,7 @@ void OutputCalibrationPage::setWizardPage() if (currentChannel >= 0) { if (currentPageIndex == 1) { ui->motorNeutralSlider->setValue(m_actuatorSettings[currentChannel].channelNeutral); - ui->motorPWMValue->setText(QString("Output value : %1 µs").arg(m_actuatorSettings[currentChannel].channelNeutral)); + ui->motorPWMValue->setText(QString(tr("Output value : %1 µs")).arg(m_actuatorSettings[currentChannel].channelNeutral)); // Reversable motor found if (m_actuatorSettings[currentChannel].isReversableMotor) { ui->motorNeutralSlider->setMinimum(m_actuatorSettings[currentChannel].channelMin); @@ -351,7 +350,7 @@ void OutputCalibrationPage::setWizardPage() ui->motorInfo->setText(tr("

To find the neutral rate for this reversable motor, press the Start button below and slide the slider to the right or left until you find the value where the motor don't start.

When done press button again to stop.

")); } } else if (currentPageIndex == 2) { - ui->servoPWMValue->setText(QString("Output value : %1 µs").arg(m_actuatorSettings[currentChannel].channelNeutral)); + ui->servoPWMValue->setText(QString(tr("Output value : %1 µs")).arg(m_actuatorSettings[currentChannel].channelNeutral)); if (m_actuatorSettings[currentChannel].channelMax < m_actuatorSettings[currentChannel].channelMin && !ui->reverseCheckbox->isChecked()) { ui->reverseCheckbox->setChecked(true); @@ -529,7 +528,7 @@ void OutputCalibrationPage::debugLogChannelValues() void OutputCalibrationPage::on_motorNeutralSlider_valueChanged(int value) { Q_UNUSED(value); - ui->motorPWMValue->setText(QString("Output value : %1 µs").arg(value)); + ui->motorPWMValue->setText(QString(tr("Output value : %1 µs")).arg(value)); if (ui->motorNeutralButton->isChecked()) { quint16 value = ui->motorNeutralSlider->value(); @@ -554,7 +553,7 @@ void OutputCalibrationPage::on_servoCenterAngleSlider_valueChanged(int position) m_calibrationUtil->setChannelOutputValue(value); quint16 channel = getCurrentChannel(); m_actuatorSettings[channel].channelNeutral = value; - ui->servoPWMValue->setText(QString("Output value : %1 µs").arg(value)); + ui->servoPWMValue->setText(QString(tr("Output value : %1 µs")).arg(value)); // Adjust min and max if (ui->reverseCheckbox->isChecked()) { From 60f9e965712a1dc5e9eebaece62db45bff596a7f Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Mon, 16 Feb 2015 00:11:29 +0100 Subject: [PATCH 25/47] OP-1723 keep only tr() --- .../src/plugins/setupwizard/pages/outputcalibrationpage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp index d188c828a..b5557472e 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp @@ -350,7 +350,7 @@ void OutputCalibrationPage::setWizardPage() ui->motorInfo->setText(tr("

To find the neutral rate for this reversable motor, press the Start button below and slide the slider to the right or left until you find the value where the motor don't start.

When done press button again to stop.

")); } } else if (currentPageIndex == 2) { - ui->servoPWMValue->setText(QString(tr("Output value : %1 µs")).arg(m_actuatorSettings[currentChannel].channelNeutral)); + ui->servoPWMValue->setText(tr("Output value : %1 µs").arg(m_actuatorSettings[currentChannel].channelNeutral)); if (m_actuatorSettings[currentChannel].channelMax < m_actuatorSettings[currentChannel].channelMin && !ui->reverseCheckbox->isChecked()) { ui->reverseCheckbox->setChecked(true); @@ -528,7 +528,7 @@ void OutputCalibrationPage::debugLogChannelValues() void OutputCalibrationPage::on_motorNeutralSlider_valueChanged(int value) { Q_UNUSED(value); - ui->motorPWMValue->setText(QString(tr("Output value : %1 µs")).arg(value)); + ui->motorPWMValue->setText(tr("Output value : %1 µs").arg(value)); if (ui->motorNeutralButton->isChecked()) { quint16 value = ui->motorNeutralSlider->value(); @@ -553,7 +553,7 @@ void OutputCalibrationPage::on_servoCenterAngleSlider_valueChanged(int position) m_calibrationUtil->setChannelOutputValue(value); quint16 channel = getCurrentChannel(); m_actuatorSettings[channel].channelNeutral = value; - ui->servoPWMValue->setText(QString(tr("Output value : %1 µs")).arg(value)); + ui->servoPWMValue->setText(tr("Output value : %1 µs").arg(value)); // Adjust min and max if (ui->reverseCheckbox->isChecked()) { From d76affcae322ee9b913d983d4998ee4553447bf6 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Mon, 16 Feb 2015 01:22:04 +0100 Subject: [PATCH 26/47] OP-1723 English typo --- .../src/plugins/setupwizard/pages/outputcalibrationpage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp index b5557472e..57acb32bd 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp @@ -347,7 +347,7 @@ void OutputCalibrationPage::setWizardPage() if (m_actuatorSettings[currentChannel].isReversableMotor) { ui->motorNeutralSlider->setMinimum(m_actuatorSettings[currentChannel].channelMin); ui->motorNeutralSlider->setMaximum(m_actuatorSettings[currentChannel].channelMax); - ui->motorInfo->setText(tr("

To find the neutral rate for this reversable motor, press the Start button below and slide the slider to the right or left until you find the value where the motor don't start.

When done press button again to stop.

")); + ui->motorInfo->setText(tr("

To find the neutral rate for this reversable motor, press the Start button below and slide the slider to the right or left until you find the value where the motor doesn't start.

When done press button again to stop.

")); } } else if (currentPageIndex == 2) { ui->servoPWMValue->setText(tr("Output value : %1 µs").arg(m_actuatorSettings[currentChannel].channelNeutral)); From 75b3e2f1dc56140ed3f44a914ea25af07ff7c44e Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Mon, 16 Feb 2015 23:12:35 +0100 Subject: [PATCH 27/47] OP-1685 - Bank mode Combo content was truncated for OneShot/OneShot125 items --- .../openpilotgcs/src/plugins/config/output.ui | 121 ++++++++++++++---- 1 file changed, 96 insertions(+), 25 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/output.ui b/ground/openpilotgcs/src/plugins/config/output.ui index 0ce1d0a9b..a3389de63 100644 --- a/ground/openpilotgcs/src/plugins/config/output.ui +++ b/ground/openpilotgcs/src/plugins/config/output.ui @@ -6,7 +6,7 @@ 0 0 - 765 + 1096 754 @@ -122,8 +122,8 @@ 0 0 - 831 - 659 + 1078 + 672 @@ -203,16 +203,21 @@ - 0 + 100 20 - 70 + 120 16777215 + + + 10 + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value @@ -284,16 +289,21 @@ - 0 + 100 20 - 70 + 120 16777215 + + + 10 + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value @@ -355,16 +365,21 @@ - 0 + 100 20 - 70 + 120 16777215 + + + 10 + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value @@ -426,16 +441,21 @@ - 0 + 100 20 - 70 + 120 16777215 + + + 10 + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value @@ -497,16 +517,21 @@ - 0 + 100 20 - 70 + 120 16777215 + + + 10 + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). @@ -525,16 +550,21 @@ - 0 + 100 20 - 70 + 120 16777215 + + + 10 + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). @@ -573,16 +603,21 @@ - 0 + 100 20 - 70 + 120 16777215 + + + 10 + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value @@ -648,16 +683,21 @@ - 0 + 100 20 - 70 + 120 16777215 + + + 10 + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). @@ -698,16 +738,21 @@ - 0 + 100 20 - 70 + 120 16777215 + + + 10 + + Setup output mode. Use PWM or OneShot with Standard ESCs. Several other ESCs like BLHeli 13+ can use the more advanced OneShot125. @@ -728,16 +773,21 @@ When using OneShot125 all values set in min/max and idle are divided by eight be - 0 + 100 20 - 70 + 120 16777215 + + + 10 + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). @@ -778,7 +828,7 @@ When using OneShot125 all values set in min/max and idle are divided by eight be - 0 + 100 20 @@ -788,6 +838,11 @@ When using OneShot125 all values set in min/max and idle are divided by eight be 16777215 + + + 10 + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value @@ -859,7 +914,7 @@ When using OneShot125 all values set in min/max and idle are divided by eight be - 0 + 100 20 @@ -869,6 +924,11 @@ When using OneShot125 all values set in min/max and idle are divided by eight be 16777215 + + + 10 + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). @@ -1009,6 +1069,17 @@ When using OneShot125 all values set in min/max and idle are divided by eight be
+ + + 100 + 0 + + + + + 10 + + Qt::Vertical From 6ba3aa04241a0fe7781983c24be9d29c8adb148d Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Tue, 17 Feb 2015 13:35:47 +0100 Subject: [PATCH 28/47] OP-1723 Changes for review - Fix for FW dual aileron (output6 not set to 1500) --- .../pages/outputcalibrationpage.cpp | 19 ++++++++++++------- .../setupwizard/pages/outputcalibrationpage.h | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp index 57acb32bd..fb4775aa9 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp @@ -117,11 +117,7 @@ void OutputCalibrationPage::setupVehicle() m_currentWizardIndex = 0; m_vehicleScene->clear(); - if (m_calibrationUtil) { - delete m_calibrationUtil; - m_calibrationUtil = 0; - } - m_calibrationUtil = new OutputCalibrationUtil(); + resetOutputCalibrationUtil(); switch (getWizard()->getVehicleSubType()) { case SetupWizard::MULTI_ROTOR_TRI_Y: @@ -202,7 +198,7 @@ void OutputCalibrationPage::setupVehicle() m_vehicleHighlightElementIndexes << 0 << 1 << 2 << 3 << 4 << 5; m_channelIndex << 0 << 2 << 0 << 5 << 1 << 3; - setupActuatorMinMaxAndNeutral(2, 2, 5); + setupActuatorMinMaxAndNeutral(2, 2, 6); // should be 5 instead 6 but output 5 is not used getWizard()->setActuatorSettings(m_actuatorSettings); break; @@ -465,7 +461,7 @@ void OutputCalibrationPage::onStartButtonToggle(QAbstractButton *button, quint16 m_calibrationUtil->startChannelOutput(channel, m_actuatorSettings[channel].channelNeutral); // Normal motor - if ((button->objectName() == "motorNeutralButton") && !m_actuatorSettings[channel].isReversableMotor) { + if ((button == ui->motorNeutralButton) && !m_actuatorSettings[channel].isReversableMotor) { m_calibrationUtil->startChannelOutput(channel, m_actuatorSettings[channel].channelMin); } @@ -654,3 +650,12 @@ void OutputCalibrationPage::on_reverseCheckbox_toggled(bool checked) ui->servoMaxAngleSlider->setValue(m_actuatorSettings[getCurrentChannel()].channelMax); } } + +void OutputCalibrationPage::resetOutputCalibrationUtil() +{ + if (m_calibrationUtil) { + delete m_calibrationUtil; + m_calibrationUtil = 0; + } + m_calibrationUtil = new OutputCalibrationUtil(); +} diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.h b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.h index 74a298ad0..3691a1d0a 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.h +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.h @@ -100,6 +100,7 @@ private: QList m_actuatorSettings; OutputCalibrationUtil *m_calibrationUtil; + void resetOutputCalibrationUtil(); static const QString MULTI_SVG_FILE; static const QString FIXEDWING_SVG_FILE; From 39513f05330433c38696a2d14d4196e976ad6172 Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Tue, 17 Feb 2015 23:20:07 +0100 Subject: [PATCH 29/47] OP-1685 - Rename OneShot to PWMSync to avoid confusion --- flight/modules/Actuator/actuator.c | 2 +- flight/targets/boards/coptercontrol/firmware/pios_board.c | 4 ++-- shared/uavobjectdefinition/actuatorsettings.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flight/modules/Actuator/actuator.c b/flight/modules/Actuator/actuator.c index 891537bd6..e8b75b645 100644 --- a/flight/modules/Actuator/actuator.c +++ b/flight/modules/Actuator/actuator.c @@ -806,7 +806,7 @@ static void actuator_update_rate_if_changed(const ActuatorSettingsData *actuator freq[i] = 100; // Value must be small enough so CCr isn't update until the PIOS_Servo_Update is triggered clock[i] = ACTUATOR_ONESHOT125_CLOCK; // Setup an 8MHz timer clock break; - case ACTUATORSETTINGS_BANKMODE_ONESHOT: + case ACTUATORSETTINGS_BANKMODE_PWMSYNC: freq[i] = 100; clock[i] = ACTUATOR_PWM_CLOCK; break; diff --git a/flight/targets/boards/coptercontrol/firmware/pios_board.c b/flight/targets/boards/coptercontrol/firmware/pios_board.c index 3254e8fe8..444c9f772 100644 --- a/flight/targets/boards/coptercontrol/firmware/pios_board.c +++ b/flight/targets/boards/coptercontrol/firmware/pios_board.c @@ -880,7 +880,7 @@ SystemAlarmsExtendedAlarmStatusOptions CopterControlConfigHook() case HWSETTINGS_CC_RCVRPORT_PPM_PIN6ONESHOT: if ((recmode == HWSETTINGS_CC_RCVRPORT_PPM_PIN6ONESHOT || flexiMode == HWSETTINGS_CC_FLEXIPORT_PPM) && - (modes[3] == ACTUATORSETTINGS_BANKMODE_ONESHOT || + (modes[3] == ACTUATORSETTINGS_BANKMODE_PWMSYNC || modes[3] == ACTUATORSETTINGS_BANKMODE_ONESHOT125)) { return SYSTEMALARMS_EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT; } else { @@ -893,7 +893,7 @@ SystemAlarmsExtendedAlarmStatusOptions CopterControlConfigHook() case HWSETTINGS_CC_RCVRPORT_PPMPWMNOONESHOT: case HWSETTINGS_CC_RCVRPORT_PWMNOONESHOT: for (uint8_t i = 0; i < ACTUATORSETTINGS_BANKMODE_NUMELEM; i++) { - if (modes[i] == ACTUATORSETTINGS_BANKMODE_ONESHOT || + if (modes[i] == ACTUATORSETTINGS_BANKMODE_PWMSYNC || modes[i] == ACTUATORSETTINGS_BANKMODE_ONESHOT125) { return SYSTEMALARMS_EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT;; } diff --git a/shared/uavobjectdefinition/actuatorsettings.xml b/shared/uavobjectdefinition/actuatorsettings.xml index fc7ff0741..24c1decb0 100644 --- a/shared/uavobjectdefinition/actuatorsettings.xml +++ b/shared/uavobjectdefinition/actuatorsettings.xml @@ -2,7 +2,7 @@ Settings for the @ref ActuatorModule that controls the channel assignments for the mixer based on AircraftType - + From 745ada0781c6e7aa26ef2cbae18c54c04f6b043c Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Wed, 18 Feb 2015 00:34:38 +0100 Subject: [PATCH 30/47] OP-1728 First commit - Maybe better behavior - Display motors with red handle --- .../src/plugins/config/outputchannelform.cpp | 120 +++++++++++------- .../src/plugins/config/outputchannelform.h | 2 + 2 files changed, 77 insertions(+), 45 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp index 06d0f443b..18103f7ca 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp @@ -56,6 +56,8 @@ OutputChannelForm::OutputChannelForm(const int index, QWidget *parent) : ui.actuatorMax->setMinimum(MINOUTPUT_VALUE); ui.actuatorValue->setMinimum(MINOUTPUT_VALUE); + setChannelRange(); + disableMouseWheelEvents(); } @@ -120,11 +122,12 @@ void OutputChannelForm::enableChannelTest(bool state) } else { ui.actuatorMin->setEnabled(true); ui.actuatorMax->setEnabled(true); - ui.actuatorRev->setEnabled(true); + if (m_mixerType != "Motor") { + ui.actuatorRev->setEnabled(true); + } } } - /** * Toggles the channel linked state for use in testing mode */ @@ -139,7 +142,7 @@ void OutputChannelForm::linkToggled(bool state) if (!parent()) { return; } - int min = 10000; + int min = MAXOUTPUT_VALUE; int linked_count = 0; QList outputChannelForms = parent()->findChildren(); // set the linked channels of the parent widget to the same value @@ -179,7 +182,7 @@ int OutputChannelForm::max() const */ void OutputChannelForm::setMax(int maximum) { - setRange(ui.actuatorMin->value(), maximum); + setRange(ui.actuatorMax->value(), maximum); } int OutputChannelForm::min() const @@ -192,7 +195,7 @@ int OutputChannelForm::min() const */ void OutputChannelForm::setMin(int minimum) { - setRange(minimum, ui.actuatorMax->value()); + setRange(minimum, ui.actuatorMin->value()); } int OutputChannelForm::neutral() const @@ -216,11 +219,6 @@ void OutputChannelForm::setRange(int minimum, int maximum) ui.actuatorMin->setValue(minimum); ui.actuatorMax->setValue(maximum); setChannelRange(); - if (ui.actuatorMin->value() > ui.actuatorMax->value()) { - ui.actuatorRev->setChecked(true); - } else { - ui.actuatorRev->setChecked(false); - } } /** @@ -232,39 +230,60 @@ void OutputChannelForm::setRange(int minimum, int maximum) */ void OutputChannelForm::setChannelRange() { - int oldMini = ui.actuatorNeutral->minimum(); - int minValue = ui.actuatorMin->value(); - int maxValue = ui.actuatorMax->value(); + int minValue = ui.actuatorMin->value(); + int maxValue = ui.actuatorMax->value(); + int neutralValue = ui.actuatorValue->value(); - // int oldMaxi = ui.actuatorNeutral->maximum(); + int oldMini = ui.actuatorNeutral->minimum(); + int oldMaxi = ui.actuatorNeutral->maximum(); - if (minValue <= maxValue) { - ui.actuatorNeutral->setRange(ui.actuatorMin->value(), ui.actuatorMax->value()); - ui.actuatorRev->setChecked(false); + m_mixerType = outputMixerType(); + + // Red handle for Motors + if ((m_mixerType == "Motor") || (m_mixerType == "ReversableMotor")) { + ui.actuatorNeutral->setStyleSheet("QSlider::handle:horizontal { background: rgb(255, 100, 100); width: 18px; height: 28px;" + "margin: -3px 0; border-radius: 3px; border: 1px solid #777; }"); } else { - ui.actuatorNeutral->setRange(ui.actuatorMax->value(), ui.actuatorMin->value()); - ui.actuatorRev->setChecked(true); + ui.actuatorNeutral->setStyleSheet("QSlider::handle:horizontal { background: rgb(196, 196, 196); width: 18px; height: 28px;" + "margin: -3px 0; border-radius: 3px; border: 1px solid #777; }"); } + // Normal motor will be *** never *** reversed : without arming a "Min" value (like 1900) can be applied ! + if (m_mixerType == "Motor") { + if (minValue >= maxValue) { + // Keep old values + ui.actuatorMin->setValue(oldMini); + ui.actuatorMax->setValue(oldMaxi); + } + ui.actuatorRev->setChecked(false); + ui.actuatorRev->setEnabled(false); + ui.actuatorNeutral->setInvertedAppearance(false); + ui.actuatorNeutral->setRange(ui.actuatorMin->value(), ui.actuatorMax->value()); + } else { + // Others output (!Motor) + // Auto check reverse checkbox SpinBox Min/Max changes + ui.actuatorRev->setEnabled(true); + if (minValue <= maxValue) { + ui.actuatorRev->setChecked(false); + ui.actuatorNeutral->setInvertedAppearance(false); + ui.actuatorNeutral->setRange(minValue, maxValue); + } else { + ui.actuatorRev->setChecked(true); + ui.actuatorNeutral->setInvertedAppearance(true); + ui.actuatorNeutral->setRange(maxValue, minValue); + } + } + // If old neutral was Min, stay Min if (ui.actuatorNeutral->value() == oldMini) { ui.actuatorNeutral->setValue(ui.actuatorNeutral->minimum()); } // Enable only outputs already set in mixer - if (name() != "-") { + if (m_mixerType != "Disabled") { ui.actuatorMin->setEnabled(true); ui.actuatorMax->setEnabled(true); ui.actuatorNeutral->setEnabled(true); ui.actuatorValue->setEnabled(true); - - // Enable checkboxes Rev and Link if some range - if (minValue != maxValue) { - ui.actuatorRev->setEnabled(true); - ui.actuatorLink->setEnabled(true); - } else { - ui.actuatorRev->setEnabled(false); - ui.actuatorLink->setEnabled(false); - } } else { ui.actuatorMin->setEnabled(false); ui.actuatorMax->setEnabled(false); @@ -273,13 +292,9 @@ void OutputChannelForm::setChannelRange() ui.actuatorMin->setValue(1000); ui.actuatorMax->setValue(1000); ui.actuatorNeutral->setRange(minValue, maxValue); - ui.actuatorNeutral->setEnabled(false); + ui.actuatorNeutral->setValue(minValue); ui.actuatorValue->setEnabled(false); } - - // if (ui.actuatorNeutral->value() == oldMaxi) - // this can be dangerous if it happens to be controlling a motor at the time! - // ui.actuatorNeutral->setValue(ui.actuatorNeutral->maximum()); } /** @@ -287,19 +302,16 @@ void OutputChannelForm::setChannelRange() */ void OutputChannelForm::reverseChannel(bool state) { - // Sanity check: if state became true, make sure the Maxvalue was higher than Minvalue - // the situations below can happen! - if (state && (ui.actuatorMax->value() < ui.actuatorMin->value())) { + // if 'state' (reverse channel requested) apply only if not already reversed + if ((state && (ui.actuatorMax->value() > ui.actuatorMin->value())) + || (!state && (ui.actuatorMax->value() < ui.actuatorMin->value()))) { + // Now, swap the min & max values (spin boxes) + int temp = ui.actuatorMax->value(); + ui.actuatorMax->setValue(ui.actuatorMin->value()); + ui.actuatorMin->setValue(temp); + ui.actuatorNeutral->setInvertedAppearance(state); return; } - if (!state && (ui.actuatorMax->value() > ui.actuatorMin->value())) { - return; - } - - // Now, swap the min & max values (only on the spinboxes, the slider does not change!) - int temp = ui.actuatorMax->value(); - ui.actuatorMax->setValue(ui.actuatorMin->value()); - ui.actuatorMin->setValue(temp); // Also update the channel value // This is a trick to force the slider to update its value and @@ -370,3 +382,21 @@ void OutputChannelForm::sendChannelTest(int value) } emit channelChanged(index(), value); } + +/** + * + * Returns MixerType + */ +QString OutputChannelForm::outputMixerType() +{ + UAVDataObject *mixer = dynamic_cast(getObjectManager()->getObject(QString("MixerSettings"))); + + Q_ASSERT(mixer); + + QString mixerNumType = QString("Mixer%1Type").arg(index() + 1); + UAVObjectField *field = mixer->getField(mixerNumType); + Q_ASSERT(field); + QString mixerType = field->getValue().toString(); + + return mixerType; +} diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.h b/ground/openpilotgcs/src/plugins/config/outputchannelform.h index e17155f41..e10891c2a 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.h +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.h @@ -58,6 +58,7 @@ public slots: void setNeutral(int value); void setRange(int minimum, int maximum); void enableChannelTest(bool state); + QString outputMixerType(); signals: void channelChanged(int index, int value); @@ -65,6 +66,7 @@ signals: private: Ui::outputChannelForm ui; bool m_inChannelTest; + QString m_mixerType; private slots: void linkToggled(bool state); From 4b24707f82feb57e17a9778475db89c13ed1a52e Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Wed, 18 Feb 2015 00:51:42 +0100 Subject: [PATCH 31/47] OP-1728 Remove unused code --- .../src/plugins/config/outputchannelform.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp index 18103f7ca..b604d9027 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp @@ -232,7 +232,6 @@ void OutputChannelForm::setChannelRange() { int minValue = ui.actuatorMin->value(); int maxValue = ui.actuatorMax->value(); - int neutralValue = ui.actuatorValue->value(); int oldMini = ui.actuatorNeutral->minimum(); int oldMaxi = ui.actuatorNeutral->maximum(); @@ -312,18 +311,6 @@ void OutputChannelForm::reverseChannel(bool state) ui.actuatorNeutral->setInvertedAppearance(state); return; } - - // Also update the channel value - // This is a trick to force the slider to update its value and - // emit the right signal itself, because our sendChannelTest(int) method - // relies on the object sender's identity. - if (ui.actuatorNeutral->value() < ui.actuatorNeutral->maximum()) { - ui.actuatorNeutral->setValue(ui.actuatorNeutral->value() + 1); - ui.actuatorNeutral->setValue(ui.actuatorNeutral->value() - 1); - } else { - ui.actuatorNeutral->setValue(ui.actuatorNeutral->value() - 1); - ui.actuatorNeutral->setValue(ui.actuatorNeutral->value() + 1); - } } /** From ee3efc535efc2a1579dd892045addd22bc9286b5 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Wed, 18 Feb 2015 01:50:38 +0100 Subject: [PATCH 32/47] OP-1728 Fix output value --- .../openpilotgcs/src/plugins/config/outputchannelform.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp index b604d9027..b14181951 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp @@ -309,8 +309,11 @@ void OutputChannelForm::reverseChannel(bool state) ui.actuatorMax->setValue(ui.actuatorMin->value()); ui.actuatorMin->setValue(temp); ui.actuatorNeutral->setInvertedAppearance(state); + + setChannelRange(); return; } + } /** @@ -327,10 +330,6 @@ void OutputChannelForm::sendChannelTest(int value) return; } - if (ui.actuatorRev->isChecked()) { - // the channel is reversed - value = ui.actuatorMin->value() - value + ui.actuatorMax->value(); - } // update the label ui.actuatorValue->setValue(value); From f44a663e27182fdc79c19c844318f2254635b8e2 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Wed, 18 Feb 2015 02:46:53 +0100 Subject: [PATCH 33/47] OP-1728 Add message dialog if something to save --- .../src/plugins/config/configoutputwidget.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp index 330911bf4..93d367b9a 100644 --- a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp @@ -196,6 +196,15 @@ void ConfigOutputWidget::runChannelTests(bool state) if (state) { sendAllChannelTests(); } + + // Add info at end + if (!state && isDirty()) { + QMessageBox mbox; + mbox.setText(QString(tr("You may want to save our neutral settings." ))); + mbox.setStandardButtons(QMessageBox::Ok); + mbox.setIcon(QMessageBox::Information); + mbox.exec(); + } } OutputChannelForm *ConfigOutputWidget::getOutputChannelForm(const int index) const From 1b842ec32218cc4c88a83982aa4b3e5de237eb74 Mon Sep 17 00:00:00 2001 From: m_thread Date: Wed, 18 Feb 2015 00:19:58 +0100 Subject: [PATCH 34/47] OP-1685 Fixed Output config layout, fixed HW config layout for CC. Conflicts: ground/openpilotgcs/src/plugins/config/output.ui --- .../src/plugins/config/cc_hw_settings.ui | 112 +- .../src/plugins/config/configoutputwidget.cpp | 3 + .../openpilotgcs/src/plugins/config/output.ui | 1742 +++++++++-------- 3 files changed, 935 insertions(+), 922 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/cc_hw_settings.ui b/ground/openpilotgcs/src/plugins/config/cc_hw_settings.ui index a96e1f7a6..e7c7ddf10 100644 --- a/ground/openpilotgcs/src/plugins/config/cc_hw_settings.ui +++ b/ground/openpilotgcs/src/plugins/config/cc_hw_settings.ui @@ -116,8 +116,8 @@ 0 0 - 622 - 519 + 624 + 510 @@ -309,18 +309,14 @@ - - - - - - - - - + + - + + + + USB HID Port @@ -330,49 +326,14 @@ - - - - - + + - - true - - - - - - - - MainPort - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - - - - - - - FlexiPort - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - + USB VCP Port @@ -382,17 +343,40 @@ - - + + - RcvrPort + - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + false - + + + + Main Port + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + + Flexi Port + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + + Qt::Horizontal @@ -405,6 +389,22 @@ + + + + + + + + + + Receiver Port + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + diff --git a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp index 36cdcd951..f11b22eaf 100644 --- a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp @@ -53,6 +53,7 @@ ConfigOutputWidget::ConfigOutputWidget(QWidget *parent) : ConfigTaskWidget(paren ui->setupUi(this); ui->gvWarning->setScene(new QGraphicsScene(this)); + ui->gvFrame->setVisible(false); ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); Core::Internal::GeneralSettings *settings = pm->getObject(); @@ -466,8 +467,10 @@ void ConfigOutputWidget::setWarning(QString message) ui->gvWarning->scene()->clear(); if (!message.isNull()) { warningPic.load(":/configgadget/images/error.svg"); + ui->gvFrame->setVisible(true); } else { warningPic.load(""); + ui->gvFrame->setVisible(false); } ui->gvWarning->scene()->addPixmap(warningPic); ui->gvWarning->setSceneRect(warningPic.rect()); diff --git a/ground/openpilotgcs/src/plugins/config/output.ui b/ground/openpilotgcs/src/plugins/config/output.ui index a3389de63..e2e921dc3 100644 --- a/ground/openpilotgcs/src/plugins/config/output.ui +++ b/ground/openpilotgcs/src/plugins/config/output.ui @@ -6,7 +6,7 @@ 0 0 - 1096 + 765 754 @@ -122,11 +122,11 @@ 0 0 - 1078 - 672 + 743 + 668 - + 6 @@ -143,879 +143,900 @@ 12 - - - - 0 - 0 - - - - - 0 - 0 - - + - Output configuration + GroupBox - - - - - Bank(Channels): + + + 9 + + + 9 + + + 9 + + + 9 + + + + + QFrame::NoFrame - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + QFrame::Raised - - - - - - - - - - Qt::AlignCenter - - - - - - - - - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 100 - 20 - - - - - 120 - 16777215 - - - - - 10 - - - - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value - - - - - - - 50 + + + 0 - - - - 60 + + 0 - - - - 125 + + 0 - - - - 165 + + 0 - - - - 270 - - - - - 330 - - - - - 400 - - - - - 490 - - - - - - - - - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 100 - 20 - - - - - 120 - 16777215 - - - - - 10 - - - - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value - - - - - - - 50 - - - - - 60 - - - - - 125 - - - - - 165 - - - - - 270 - - - - - 330 - - - - - 400 - - - - - 490 - - - - - - - - false - - - - 0 - 0 - - - - - 100 - 20 - - - - - 120 - 16777215 - - - - - 10 - - - - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value - - - - - - - 50 - - - - - 60 - - - - - 125 - - - - - 165 - - - - - 270 - - - - - 330 - - - - - 400 - - - - - 490 - - - - - - - - false - - - - 0 - 0 - - - - - 100 - 20 - - - - - 120 - 16777215 - - - - - 10 - - - - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value - - - - - - - 50 - - - - - 60 - - - - - 125 - - - - - 165 - - - - - 270 - - - - - 330 - - - - - 400 - - - - - 490 - - - - - - - - false - - - - 0 - 0 - - - - - 100 - 20 - - - - - 120 - 16777215 - - - - - 10 - - - - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). - - - - - - - false - - - - 0 - 0 - - - - - 100 - 20 - - - - - 120 - 16777215 - - - - - 10 - - - - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). - - - - - - - - - - - Qt::AlignCenter - - - - - - - - - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 100 - 20 - - - - - 120 - 16777215 - - - - - 10 - - - - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Bank(Channels): + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 0 + 20 + + + + Update rate: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 0 + 20 + + + + Mode: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + - + + + Qt::AlignCenter + + + + + + + - + + + Qt::AlignCenter + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 16777215 + + + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + + + + + + + 50 + + + + + 60 + + + + + 125 + + + + + 165 + + + + + 270 + + + + + 330 + + + + + 400 + + + + + 490 + + + + + + + + + + + Qt::AlignCenter + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 16777215 + + + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + + + + + + + 50 + + + + + 60 + + + + + 125 + + + + + 165 + + + + + 270 + + + + + 330 + + + + + 400 + + + + + 490 + + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 16777215 + + + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + + + + + + + 50 + + + + + 60 + + + + + 125 + + + + + 165 + + + + + 270 + + + + + 330 + + + + + 400 + + + + + 490 + + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 16777215 + + + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + + + + + + + 50 + + + + + 60 + + + + + 125 + + + + + 165 + + + + + 270 + + + + + 330 + + + + + 400 + + + + + 490 + + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 16777215 + + + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 16777215 + + + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + + + + + + + - + + + Qt::AlignCenter + + + + + + + - + + + Qt::AlignCenter + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 16777215 + + + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value - - - false - - - - - - - 50 - - - - - 60 - - - - - 125 - - - - - 165 - - - - - 270 - - - - - 330 - - - - - 400 - - - - - 490 - - - - - - - - false - - - - 0 - 0 - - - - - 100 - 20 - - - - - 120 - 16777215 - - - - - 10 - - - - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). - - - - - - - - 0 - 0 - - - - - 0 - 20 - - - - Mode: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - false - - - - 0 - 0 - - - - - 100 - 20 - - - - - 120 - 16777215 - - - - - 10 - - - - Setup output mode. Use PWM or OneShot with Standard ESCs. + + + false + + + + + + + 50 + + + + + 60 + + + + + 125 + + + + + 165 + + + + + 270 + + + + + 330 + + + + + 400 + + + + + 490 + + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 16777215 + + + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 16777215 + + + + Setup output mode. Use PWM or OneShot with Standard ESCs. Several other ESCs like BLHeli 13+ can use the more advanced OneShot125. When using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). - + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 16777215 + + + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 16777215 + + + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + + + + + + + 50 + + + + + 60 + + + + + 125 + + + + + 165 + + + + + 270 + + + + + 330 + + + + + 400 + + + + + 490 + + + + + + + + - + + + Qt::AlignCenter + + + + + + + false + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 16777215 + + + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + + + + + + + - - - - false - + + - + 0 0 - - - 100 - 20 - + + QFrame::NoFrame - - - 120 - 16777215 - - - - - 10 - - - - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + + QFrame::Raised + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 32 + 32 + + + + + 32 + 32 + + + + background: transparent + + + QFrame::NoFrame + + + Qt::AlignCenter + + + QPainter::HighQualityAntialiasing + + + + + + + + 0 + 0 + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - - 0 - 0 - - - - - 0 - 20 - - - - Update rate: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - false - - - - 0 - 0 - - - - - 100 - 20 - - - - - 70 - 16777215 - - - - - 10 - - - - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value - - - - - - - 50 - - - - - 60 - - - - - 125 - - - - - 165 - - - - - 270 - - - - - 330 - - - - - 400 - - - - - 490 - - - - - - - - - - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 100 - 20 - - - - - 70 - 16777215 - - - - - 10 - - - - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). - - - - - - - 0 - - - - - - 32 - 32 - - - - - 32 - 32 - - - - background: transparent - - - QFrame::NoFrame - - - Qt::AlignCenter - - - QPainter::HighQualityAntialiasing - - - - - - - - 0 - 0 - - - - - 200 - 50 - - - - - 16777215 - 90 - - - - - 10 - 50 - false - - - - Calibration status - - - background-color: transparent; - - - QFrame::NoFrame - - - Qt::ScrollBarAlwaysOff - - - QAbstractScrollArea::AdjustIgnored - - - Qt::NoTextInteraction - - - - - @@ -1069,17 +1090,6 @@ When using OneShot125 all values set in min/max and idle are divided by eight be - - - 100 - 0 - - - - - 10 - - Qt::Vertical From 6c33fb8185fa3814e38763b19e4303dae1101173 Mon Sep 17 00:00:00 2001 From: m_thread Date: Wed, 18 Feb 2015 10:26:59 +0100 Subject: [PATCH 35/47] OP-1685 Simplifying the warning label code and layout. --- .../src/plugins/config/configoutputwidget.cpp | 19 ++------- .../openpilotgcs/src/plugins/config/output.ui | 40 ++++--------------- 2 files changed, 12 insertions(+), 47 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp index f11b22eaf..a3ea527de 100644 --- a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp @@ -52,7 +52,6 @@ ConfigOutputWidget::ConfigOutputWidget(QWidget *parent) : ConfigTaskWidget(paren ui = new Ui_OutputWidget(); ui->setupUi(this); - ui->gvWarning->setScene(new QGraphicsScene(this)); ui->gvFrame->setVisible(false); ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); @@ -453,7 +452,8 @@ void ConfigOutputWidget::updateWarnings(UAVObject *) if (systemAlarms.Alarm[SystemAlarms::ALARM_SYSTEMCONFIGURATION] > SystemAlarms::ALARM_WARNING) { switch (systemAlarms.ExtendedAlarmStatus[SystemAlarms::EXTENDEDALARMSTATUS_SYSTEMCONFIGURATION]) { case SystemAlarms::EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT: - setWarning(tr("OneShot only works with MainPort settings marked with \"+OneShot\"\nUsing \"PPM_PIN6+OneShot\" bank 4 (output 6) must be set to PWM")); + setWarning(tr("OneShot only works with Receiver Port settings marked with '+OneShot'\n" + "When using Receiver Port setting 'PPM_PIN6+OneShot' Bank 4 (output 6,9-10) must be set to PWM")); return; } } @@ -462,18 +462,7 @@ void ConfigOutputWidget::updateWarnings(UAVObject *) void ConfigOutputWidget::setWarning(QString message) { - QPixmap warningPic; - - ui->gvWarning->scene()->clear(); - if (!message.isNull()) { - warningPic.load(":/configgadget/images/error.svg"); - ui->gvFrame->setVisible(true); - } else { - warningPic.load(""); - ui->gvFrame->setVisible(false); - } - ui->gvWarning->scene()->addPixmap(warningPic); - ui->gvWarning->setSceneRect(warningPic.rect()); - ui->gvWarning->fitInView(warningPic.rect(), Qt::KeepAspectRatio); + ui->gvFrame->setVisible(!message.isNull()); + ui->picWarning->setPixmap(message.isNull() ? QPixmap() : QPixmap(":/configgadget/images/error.svg")); ui->txtWarning->setText(message); } diff --git a/ground/openpilotgcs/src/plugins/config/output.ui b/ground/openpilotgcs/src/plugins/config/output.ui index e2e921dc3..b77d04ac7 100644 --- a/ground/openpilotgcs/src/plugins/config/output.ui +++ b/ground/openpilotgcs/src/plugins/config/output.ui @@ -972,50 +972,26 @@ When using OneShot125 all values set in min/max and idle are divided by eight be Qt::Horizontal + + QSizePolicy::Fixed + - 40 + 70 20 - - - - - 32 - 32 - - - - - 32 - 32 - - - - background: transparent - - - QFrame::NoFrame - - - Qt::AlignCenter - - - QPainter::HighQualityAntialiasing + + + + - - - 0 - 0 - - From c93c25e65790404c9a398849748f0c5bd43e9c49 Mon Sep 17 00:00:00 2001 From: m_thread Date: Wed, 18 Feb 2015 10:56:31 +0100 Subject: [PATCH 36/47] OP-1685 Made warning message even more informational. --- .../openpilotgcs/src/plugins/config/configoutputwidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp index a3ea527de..1e5959cdb 100644 --- a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp @@ -452,8 +452,9 @@ void ConfigOutputWidget::updateWarnings(UAVObject *) if (systemAlarms.Alarm[SystemAlarms::ALARM_SYSTEMCONFIGURATION] > SystemAlarms::ALARM_WARNING) { switch (systemAlarms.ExtendedAlarmStatus[SystemAlarms::EXTENDEDALARMSTATUS_SYSTEMCONFIGURATION]) { case SystemAlarms::EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT: - setWarning(tr("OneShot only works with Receiver Port settings marked with '+OneShot'\n" - "When using Receiver Port setting 'PPM_PIN6+OneShot' Bank 4 (output 6,9-10) must be set to PWM")); + setWarning(tr("OneShot only works with Receiver Port settings marked with '+OneShot'
" + "When using Receiver Port setting 'PPM_PIN6+OneShot' " + "Bank 4 (output 6,9-10) must be set to PWM")); return; } } From a9c442916ffe55b9f50e55454b1f756da83f80bf Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Wed, 18 Feb 2015 12:37:23 +0100 Subject: [PATCH 37/47] OP-1728 Remove keyboard focus on Spin/Checkboxes - Typo - Uncrustify --- .../src/plugins/config/configoutputwidget.cpp | 2 +- .../src/plugins/config/outputchannelform.cpp | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp index 93d367b9a..689e8ab2f 100644 --- a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp @@ -200,7 +200,7 @@ void ConfigOutputWidget::runChannelTests(bool state) // Add info at end if (!state && isDirty()) { QMessageBox mbox; - mbox.setText(QString(tr("You may want to save our neutral settings." ))); + mbox.setText(QString(tr("You may want to save your neutral settings."))); mbox.setStandardButtons(QMessageBox::Ok); mbox.setIcon(QMessageBox::Information); mbox.exec(); diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp index b14181951..a57a7126e 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp @@ -56,6 +56,13 @@ OutputChannelForm::OutputChannelForm(const int index, QWidget *parent) : ui.actuatorMax->setMinimum(MINOUTPUT_VALUE); ui.actuatorValue->setMinimum(MINOUTPUT_VALUE); + // Remove keyboard focus + ui.actuatorMin->setFocusPolicy(Qt::ClickFocus); + ui.actuatorMax->setFocusPolicy(Qt::ClickFocus); + ui.actuatorRev->setFocusPolicy(Qt::ClickFocus); + ui.actuatorLink->setFocusPolicy(Qt::ClickFocus); + ui.actuatorValue->setFocusPolicy(Qt::NoFocus); + setChannelRange(); disableMouseWheelEvents(); @@ -230,11 +237,11 @@ void OutputChannelForm::setRange(int minimum, int maximum) */ void OutputChannelForm::setChannelRange() { - int minValue = ui.actuatorMin->value(); - int maxValue = ui.actuatorMax->value(); + int minValue = ui.actuatorMin->value(); + int maxValue = ui.actuatorMax->value(); - int oldMini = ui.actuatorNeutral->minimum(); - int oldMaxi = ui.actuatorNeutral->maximum(); + int oldMini = ui.actuatorNeutral->minimum(); + int oldMaxi = ui.actuatorNeutral->maximum(); m_mixerType = outputMixerType(); @@ -313,7 +320,6 @@ void OutputChannelForm::reverseChannel(bool state) setChannelRange(); return; } - } /** From 8c6da7e7eef23b95c1406dfcccc0a3db4e68911e Mon Sep 17 00:00:00 2001 From: m_thread Date: Wed, 18 Feb 2015 13:33:15 +0100 Subject: [PATCH 38/47] OP-1685 Fixed some tooltip texts. --- .../openpilotgcs/src/plugins/config/output.ui | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/output.ui b/ground/openpilotgcs/src/plugins/config/output.ui index b77d04ac7..61c88a66f 100644 --- a/ground/openpilotgcs/src/plugins/config/output.ui +++ b/ground/openpilotgcs/src/plugins/config/output.ui @@ -318,7 +318,7 @@
- Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + <html><head/><body><p>Setup PWM rate here: usual value is 490 Hz for multirotor airframes.<br/>PWMSync and OneShot125 does not use this value.</p></body></html> @@ -399,7 +399,7 @@ - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + <html><head/><body><p>Setup PWM rate here: usual value is 490 Hz for multirotor airframes.<br/>PWMSync and OneShot125 does not use this value.</p></body></html> @@ -470,7 +470,7 @@ - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + <html><head/><body><p>Setup PWM rate here: usual value is 490 Hz for multirotor airframes.<br/>PWMSync and OneShot125 does not use this value.</p></body></html> @@ -541,7 +541,7 @@ - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + <html><head/><body><p>Setup PWM rate here: usual value is 490 Hz for multirotor airframes.<br/>PWMSync and OneShot125 does not use this value.</p></body></html> @@ -612,7 +612,7 @@ - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + <html><head/><body><p>Setup output mode. Use PWM or PWMSync with Standard ESCs.<br/>Several other ESCs like BLHeli 13+ can use the more advanced OneShot125.<br/>When using OneShot125 all values set in min/max and idle are divided by <br/>eight before being sent to esc (i.e. 1000 = 125, 2000 = 250).</p></body></html>
@@ -640,7 +640,7 @@ - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + <html><head/><body><p>Setup output mode. Use PWM or PWMSync with Standard ESCs.<br/>Several other ESCs like BLHeli 13+ can use the more advanced OneShot125.<br/>When using OneShot125 all values set in min/max and idle are divided by <br/>eight before being sent to esc (i.e. 1000 = 125, 2000 = 250).</p></body></html> @@ -688,8 +688,7 @@ - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value - + <html><head/><body><p>Setup PWM rate here: usual value is 490 Hz for multirotor airframes.<br/>PWMSync and OneShot125 does not use this value.</p></body></html> false @@ -763,7 +762,7 @@ - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + <html><head/><body><p>Setup output mode. Use PWM or PWMSync with Standard ESCs.<br/>Several other ESCs like BLHeli 13+ can use the more advanced OneShot125.<br/>When using OneShot125 all values set in min/max and idle are divided by <br/>eight before being sent to esc (i.e. 1000 = 125, 2000 = 250).</p></body></html> @@ -791,9 +790,7 @@ - Setup output mode. Use PWM or OneShot with Standard ESCs. -Several other ESCs like BLHeli 13+ can use the more advanced OneShot125. -When using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + <html><head/><body><p>Setup output mode. Use PWM or PWMSync with Standard ESCs.<br/>Several other ESCs like BLHeli 13+ can use the more advanced OneShot125.<br/>When using OneShot125 all values set in min/max and idle are divided by <br/>eight before being sent to esc (i.e. 1000 = 125, 2000 = 250).</p></body></html> @@ -821,7 +818,7 @@ When using OneShot125 all values set in min/max and idle are divided by eight be - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + <html><head/><body><p>Setup output mode. Use PWM or PWMSync with Standard ESCs.<br/>Several other ESCs like BLHeli 13+ can use the more advanced OneShot125.<br/>When using OneShot125 all values set in min/max and idle are divided by <br/>eight before being sent to esc (i.e. 1000 = 125, 2000 = 250).</p></body></html> @@ -849,7 +846,7 @@ When using OneShot125 all values set in min/max and idle are divided by eight be - Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + <html><head/><body><p>Setup PWM rate here: usual value is 490 Hz for multirotor airframes.<br/>PWMSync and OneShot125 does not use this value.</p></body></html> @@ -930,7 +927,7 @@ When using OneShot125 all values set in min/max and idle are divided by eight be - Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + <html><head/><body><p>Setup output mode. Use PWM or PWMSync with Standard ESCs.<br/>Several other ESCs like BLHeli 13+ can use the more advanced OneShot125.<br/>When using OneShot125 all values set in min/max and idle are divided by <br/>eight before being sent to esc (i.e. 1000 = 125, 2000 = 250).</p></body></html> From 1b805610efb0498eb59c1f37a188b3c9df658c65 Mon Sep 17 00:00:00 2001 From: m_thread Date: Wed, 18 Feb 2015 13:49:27 +0100 Subject: [PATCH 39/47] OP-1685 Fixed some more tooltip texts. --- .../openpilotgcs/src/plugins/config/outputchannelform.ui | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.ui b/ground/openpilotgcs/src/plugins/config/outputchannelform.ui index 459841ace..41420fb4a 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.ui +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.ui @@ -7,7 +7,7 @@ 0 0 768 - 54 + 55 @@ -289,8 +289,7 @@ margin:1px; Qt::StrongFocus - Minimum PWM value, beware of not overdriving your servo. -Using OneShot125 a value of 1000(uS) here will produce a pulse of 125(uS). + <html><head/><body><p>Minimum PWM value, beware of not overdriving your servo.<br/>Using OneShot125 a value of 1000(µs) here will produce a pulse of 125(µs).</p></body></html> Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -628,8 +627,7 @@ margin:1px; Qt::StrongFocus - Maximum value, beware of not overdriving your servo. -Using OneShot125 a value of 2000(uS) here will produce a pulse of 250(uS). + <html><head/><body><p>Minimum PWM value, beware of not overdriving your servo.<br/>Using OneShot125 a value of 1000(µs) here will produce a pulse of 125(µs).</p></body></html> Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter From 00f18b83e749a548659b7fa35aa95c032d1b1574 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Wed, 18 Feb 2015 14:22:18 +0100 Subject: [PATCH 40/47] OP-1337 translation update - 15.02 --- .../translations/openpilotgcs_fr.ts | 338 +++++++++++++----- 1 file changed, 257 insertions(+), 81 deletions(-) diff --git a/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts b/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts index 1fa713f73..ce3cddace 100644 --- a/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts +++ b/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts @@ -6649,15 +6649,13 @@ Applique et Enregistre tous les paramètres sur la SD Sortie - Output Update Speed Bof... - Fréquence Mise à Jour Sorties + Fréquence Mise à Jour Sorties - Channel: - Canal : + Canal : @@ -6763,16 +6761,58 @@ Applique et Enregistre tous les paramètres sur la SD Test en Temps Réel - Setup "RapidESC" here: usual value is 490 Hz for multirotor airframes. - Configurer ici "RapidESC" : 490Hz est une valeur classique pour les multirotors. + Configurer ici "RapidESC" : 490Hz est une valeur classique pour les multirotors. 490 + + + Output configuration + + + + + Bank(Channels): + + + + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + + + + + Setup output mode. Use PWM or OneShot with Standard ESCs.\nSeveral other ESCs like BLHeli 13+ can use the more advanced OneShot125.\nWhen using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + + + + + Setup PWM rate here: usual value is 490 Hz for multirotor airframes. OneShot and OneShot125 does not use this value + + + + + + Mode: + Mode : + + + + Setup output mode. Use PWM or OneShot with Standard ESCs. +Several other ESCs like BLHeli 13+ can use the more advanced OneShot125. +When using OneShot125 all values set in min/max and idle are divided by eight before being sent to esc (i.e. 1000 = 125, 2000 = 250). + + + + + Calibration status + Statut de l'étalonnage + outputChannelForm @@ -6786,20 +6826,14 @@ Applique et Enregistre tous les paramètres sur la SD Link Lien - - - # - - Channel Number Numéro Canal - Minimum PWM value, beware of not overdriving your servo. - Valeur minimum PWM, attention de respecter les limites de votre servo. + Valeur minimum PWM, attention de respecter les limites de votre servo. @@ -6832,9 +6866,8 @@ Applique et Enregistre tous les paramètres sur la SD Mode de sortie - Maximum PWM value, beware of not overdriving your servo. - Valeur maximum PWM, attention de respecter les limites de votre servo. + Valeur maximum PWM, attention de respecter les limites de votre servo. @@ -6843,13 +6876,40 @@ Applique et Enregistre tous les paramètres sur la SD - 0: + - - - - + # - Bank + + + + + Minimum PWM value, beware of not overdriving your servo. +Using OneShot125 a value of 1000(uS) here will produce a pulse of 125(uS). + + + + + 0 + 0 + + + + Bank number + + + + + 0 + + + + + Maximum value, beware of not overdriving your servo. +Using OneShot125 a value of 2000(uS) here will produce a pulse of 250(uS). + @@ -10529,7 +10589,7 @@ p, li { white-space: pre-wrap; } ConfigMultiRotorWidget - + Input Entrée @@ -10539,7 +10599,7 @@ p, li { white-space: pre-wrap; } Sortie - + @@ -10547,18 +10607,33 @@ p, li { white-space: pre-wrap; } - + Configuration OK Configuration OK - + <font color='red'>ERROR: Assign a Yaw channel</font> <font color='red'>ERREUR : Veuillez affecter le canal de Yaw</font> - + + Duplicate channel in motor outputs + Canaux en double dans le sorties moteur + + + + Channel already used + Canal déjà utilisé + + + + Select output channel for Accessory%1 RcInput + Sélectionnez le canal de sortie pour l'entrée RC Accessory%1 + + + <font color='red'>ERROR: Assign all %1 motor channels</font> <font color='red'>ERREUR : Veuillez affecter tous les %1 canaux moteurs</font> @@ -10645,7 +10720,7 @@ Voulez-vous toujours continuer ? Vous devrez reconfigurer manuellement les paramètres d'armement lorsque l'assistant sera terminé. Après la dernière étape de l'assistant, vous serez redirigé vers l'écran des Paramètres d'Armement. - + Next Suivant @@ -11734,7 +11809,7 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende. UploaderGadgetWidget - + Connected Device Périphérique Connecté @@ -11751,12 +11826,12 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende. - + Device Périphérique - + http://wiki.openpilot.org/display/Doc/Erase+board+settings @@ -11766,66 +11841,71 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende.En cours d'exécution - + Timed out while waiting for all boards to be disconnected! Bof Expiration du temps d'attente de la déconnexion de toutes les cartes ! - - + + Timed out while waiting for a board to be connected! Bof Expiration du temps dans l'attente d'une connexion de carte ! - + + To upgrade the OPLinkMini board please disconnect it from the USB port, press the Upgrade again button and follow instructions on screen. + Pour mettre à jour une carte OPLinkMini veuillez la déconnecterdu port USB, appuyez à nouveau sur le bouton de mise à jour et suivez les instructions à l'écran. + + + Timed out while waiting for a board to be fully connected! - Expiration du temps dans l'attente d'une connexion complète de carte ! + Expiration du temps dans l'attente d'une connexion complète de carte ! Failed to enter bootloader mode. - Échec du passage en mode bootloader. + Échec du passage en mode bootloader. Unknown board id '0x%1' - Carte inconnue id '0x%1' + Carte inconnue id '0x%1' Firmware image not found. - Image firmware non trouvée. + Image firmware non trouvée. Could not open firmware image for reading. - Impossible d'ouvrir l'image de firmware en lecture. + Impossible d'ouvrir l'image de firmware en lecture. Could not enter direct firmware upload mode. - Impossible de passer en mode DFU. + Impossible de passer en mode DFU. Firmware upload failed. - Échec du téléversement du firmware. + Échec du téléversement du firmware. Failed to upload firmware description. - Échec du téléversement de la description firmware. + Échec du téléversement de la description firmware. - + Timed out while booting. - Expiration du temps d'attente lors du démarrage. + Expiration du temps d'attente lors du démarrage. - + Please disconnect your OpenPilot board. Veuillez déconnecter votre carte OpenPilot. @@ -11848,7 +11928,7 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende.La carte doit être connectée à un port USB ! - + Waiting for all OpenPilot boards to be disconnected from USB. Attente de la déconnexion de toutes les cartes connectées en USB. @@ -11866,37 +11946,37 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende. Bringing the board into boot loader mode. Please wait. - Passage de la carte en mode bootloader. Veuillez patienter. + Passage de la carte en mode bootloader. Veuillez patienter. Step %1 - Étape %1 + Étape %1 Rebooting the board. Please wait. - Redémarrage de la carte. Veuillez patienter. + Redémarrage de la carte. Veuillez patienter. Rebooting and erasing the board. Please wait. - Redémarrage et effacement de la carte. Veuillez patienter. + Redémarrage et effacement de la carte. Veuillez patienter. Board was updated successfully. Press OK to finish. - La carte a été mise à jour avec succès. Appuyez sur OK pour terminer. + La carte a été mise à jour avec succès. Appuyez sur OK pour terminer. Something went wrong. - Quelque chose c'est mal passé. + Quelque chose c'est mal passé. Press OK to finish, you will have to manually upgrade the board. - Appuyez sur OK pour terminer, vous devrez mettre à jour votre carte manuellement. + Appuyez sur OK pour terminer, vous devrez mettre à jour votre carte manuellement. Bringing the board into boot loader mode. @@ -11986,7 +12066,7 @@ La carte sera redémarrée et tous les paramètres effacés. Veuillez vérifier que la carte n'est pas armée et appuyez à nouveau Réinitialiser pour continuer ou allumer/éteindre la carte pour forcer la réinitialisation. - + Annuler @@ -12818,6 +12898,76 @@ Les valeurs classiques sont de 100% en configuration + et 50% en configuration X Select the Multirotor frame type Sélectionner ici le type de châssis Multirotor + + + Select output channel for Accessory0 RcInput + Sélectionnez le canal de sortie pour l'entrée RC Accessory0 + + + + Accessory1 + + + + + RcOutput channels + Canaux de sortie RC + + + + RC Output + Sorties RC + + + + Accessory0 + + + + + RC Input + Entrées RC + + + + Select output channel for Accessory2 RcInput + Sélectionnez le canal de sortie pour l'entrée RC Accessory2 + + + + Select output channel for Accessory1 RcInput + Sélectionnez le canal de sortie pour l'entrée RC Accessory1 + + + + Accessory2 + + + + + RcOutput curve + Courbe de sortie RC + + + + Curve + Courbe + + + + Select output curve for Accessory0 RcInput + Sélectionnez la courbe de mixage pour l'entrée RC Accessory0 + + + + Select output curve for Accessory1 RcInput + Sélectionnez la courbe de mixage pour l'entrée RC Accessory1 + + + + Select output curve for Accessory2 RcInput + Sélectionnez la courbe de mixage pour l'entrée RC Accessory2 + RevoHWWidget @@ -12909,7 +13059,7 @@ Méfiez-vous de ne pas vous verrouiller l'accès ! OPLinkWidget - + Form Formulaire @@ -13060,9 +13210,8 @@ Méfiez-vous de ne pas vous verrouiller l'accès ! Tx Perdus - TX Resent - TX Renvoyés + TX Renvoyés @@ -13209,14 +13358,12 @@ Méfiez-vous de ne pas vous verrouiller l'accès ! Canal Mini - Channel Set - Canal fixe + Canal fixe - Sets the random sequence of channels to use for frequency hopping. - Fixe une séquence aléatoire de canaux à utiliser pour les sauts de fréquence. + Fixe une séquence aléatoire de canaux à utiliser pour les sauts de fréquence. @@ -13261,17 +13408,17 @@ Méfiez-vous de ne pas vous verrouiller l'accès ! Channel 0 is 430 MHz, channel 250 is 440 MHz, and the channel spacing is 40 KHz. - Canal 0 correspond à 430Mhz, canal 249 à 440Mhz, et l'espacement des canaux est de 40KHz. {0 ?} {430 ?} {250 ?} {440 ?} {40 ?} + Canal 0 correspond à 430Mhz, canal 250 à 440Mhz, et l'espacement des canaux est de 40KHz. 440.000 (MHz) - + 430.000 (MHz) - + @@ -13445,7 +13592,7 @@ p, li { white-space: pre-wrap; } ConfigOutputWidget - + The actuator module is in an error state. This can also occur because there are no inputs. Please fix these before testing outputs. Le module actionneur est en erreur. Cela peut aussi arriver lorsque il n'y a pas d'entrées (Rx radiocommande). Veuillez corriger cela avant de tester les sorties. @@ -13455,10 +13602,16 @@ p, li { white-space: pre-wrap; } Cette option démarre vos moteurs avec la valeur sélectionnée sur les curseurs, indépendamment de l'émetteur. Il est recommandé d'enlever les hélices des moteurs. Êtes-vous sûr de vouloir faire ça ? - + http://wiki.openpilot.org/x/WIGf + + + OneShot only works with MainPort settings marked with "+OneShot" +Using "PPM_PIN6+OneShot" bank 4 (output 6) must be set to PWM + + ConfigRevoHWWidget @@ -14298,36 +14451,25 @@ Veuillez vérifier le fichier. ConfigPipXtremeWidget - - - - Unbind - Dissocier + Dissocier - - - - Bind - Associer + Associer - Unknown - Inconnu + Inconnu - Information - Information + Information - To apply the changes when binding/unbinding the board must be rebooted or power cycled. détachement ou dissociation ~ unbinding ? tr Bof - Pour appliquer les changements d'association/dissociation la carte doit être redémarrée ou débranchée/rebranchée. + Pour appliquer les changements d'association/dissociation la carte doit être redémarrée ou débranchée/rebranchée. @@ -14640,7 +14782,7 @@ et même conduire au crash. A utiliser avec prudence. Personnalisé - + http://wiki.openpilot.org/x/44Cf @@ -14813,7 +14955,7 @@ et même conduire au crash. A utiliser avec prudence. TimedDialog - + Cancel Annuler @@ -15780,4 +15922,38 @@ p, li { white-space: pre-wrap; } <font color='red'>Le rédémarrage a échoué !</font><p>Veuillez effectuer un redémarrage manuel de la carte.<br>Pour redémarrer la carte contrôleur, envelez toutes les batteries ainsi que le câble USB pour au moins 30 secondes.<br>Après 30 secondes, connecter à nouveau la carte et attendez qu'elle soit connectée, cela peut prendre quelques secondes.<br>Ensuite cliquez sur Ok.</p> + + ConfigOPLinkWidget + + + + + + Unbind + Dissocier + + + + + + + Bind + Associer + + + + Unknown + Inconnu + + + + Information + Information + + + + To apply the changes when binding/unbinding the board must be rebooted or power cycled. + Pour appliquer les changements d'association/dissociation la carte doit être redémarrée ou débranchée/rebranchée. + + From d157b1f553a2165f003d36936562f43d98cb930d Mon Sep 17 00:00:00 2001 From: abeck70 Date: Wed, 7 Jan 2015 13:26:12 +1100 Subject: [PATCH 41/47] OP1670:Sanitycheck acro/rate+cruisecontrol --- flight/libraries/sanitycheck.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/flight/libraries/sanitycheck.c b/flight/libraries/sanitycheck.c index 3564898a6..d1969a2dd 100644 --- a/flight/libraries/sanitycheck.c +++ b/flight/libraries/sanitycheck.c @@ -287,6 +287,18 @@ static bool check_stabilization_settings(int index, bool multirotor, bool copter return false; } + + // if cruise control, ensure rate or acro are not set + if (modes[FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_THRUST] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_CRUISECONTROL) { + + for (uint32_t i = 0; i < FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_YAW; i++) { + if ((modes[i] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_RATE || + modes[i] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_ACRO)) { + return false; + } + } + } + // Warning: This assumes that certain conditions in the XML file are met. That // FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_MANUAL has the same numeric value for each channel // and is the same for STABILIZATIONDESIRED_STABILIZATIONMODE_MANUAL From bc94fbc2df51e3a4b90f2d57bc0e664fc3bb3c49 Mon Sep 17 00:00:00 2001 From: abeck70 Date: Thu, 19 Feb 2015 08:27:10 +1100 Subject: [PATCH 42/47] OP-1670 uncrustify sanitycheck --- flight/libraries/sanitycheck.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/flight/libraries/sanitycheck.c b/flight/libraries/sanitycheck.c index d1969a2dd..13bca13be 100644 --- a/flight/libraries/sanitycheck.c +++ b/flight/libraries/sanitycheck.c @@ -290,13 +290,12 @@ static bool check_stabilization_settings(int index, bool multirotor, bool copter // if cruise control, ensure rate or acro are not set if (modes[FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_THRUST] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_CRUISECONTROL) { - - for (uint32_t i = 0; i < FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_YAW; i++) { - if ((modes[i] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_RATE || - modes[i] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_ACRO)) { - return false; - } - } + for (uint32_t i = 0; i < FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_YAW; i++) { + if ((modes[i] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_RATE || + modes[i] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_ACRO)) { + return false; + } + } } // Warning: This assumes that certain conditions in the XML file are met. That From a70c9725729006c8582a690ebd515aa5c2123a0f Mon Sep 17 00:00:00 2001 From: James Duley Date: Thu, 19 Feb 2015 10:43:15 +1300 Subject: [PATCH 43/47] OP-1733_version-info.py_check_for_json_first --- make/scripts/version-info.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/make/scripts/version-info.py b/make/scripts/version-info.py index 67dd6d95f..889925700 100644 --- a/make/scripts/version-info.py +++ b/make/scripts/version-info.py @@ -113,15 +113,15 @@ class Repo: """Initialize object instance and read repo info""" self._path = path self._exec('rev-parse --verify HEAD') - if self._rc == 0: + if self._load_json(): + pass + elif self._rc == 0: self._hash = self._out.strip(' \t\n\r') self._get_origin() self._get_time() self._get_tag() self._get_branch() self._get_dirty() - elif self._load_json(): - pass else: self._hash = None self._origin = None From 89353a890c3a49b8e7da65e5c30ec7b6894c3941 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Wed, 18 Feb 2015 22:44:41 +0100 Subject: [PATCH 44/47] OP-1337 - 15.02 French update - Wizard and Oneshot --- .../translations/openpilotgcs_fr.ts | 86 ++++++++++++++----- 1 file changed, 64 insertions(+), 22 deletions(-) diff --git a/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts b/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts index ce3cddace..730541f42 100644 --- a/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts +++ b/ground/openpilotgcs/share/openpilotgcs/translations/openpilotgcs_fr.ts @@ -9669,19 +9669,32 @@ Veuillez sélectionner le type de multirotor désiré pour la configuration ci-d - - + + Start Démarrer - - + + + + + Output value : <b>%1</b> µs + Valeur de sortie : <b>%1</b> µs + + + + <html><head/><body><p><span style=" font-size:10pt;">To find </span><span style=" font-size:10pt; font-weight:600;">the neutral rate for this reversable motor</span><span style=" font-size:10pt;">, press the Start button below and slide the slider to the right or left until you find the value where the motor doesn't start. <br/><br/>When done press button again to stop.</span></p></body></html> + <html><head/><body><p><span style=" font-size:10pt;">Pour trouver </span><span style=" font-size:10pt; font-weight:600;">la valeur de neutre de ce moteur inversable</span><span style=" font-size:10pt;">, appuyez sur le bouton Démarrer et bouger le curseur à gauche ou à droite jusqu'à trouver la position centrale où le moteur ne démarre pas. <br/><br/>Lorsque c'est terminé, appuyer à nouveau sur le bouton pour arrêter.</span></p></body></html> + + + + Stop Arrêter - + The actuator module is in an error state. Please make sure the correct firmware version is used then restart the wizard and try again. If the problem persists please consult the openpilot.org support forum. @@ -9728,14 +9741,13 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande'; font-size:10pt;">En fonction du véhicule que vous avez sélectionné, les moteurs pilotés par des variateurs et/ou les servos contrôlés directement par la carte OpenPilot devront-être calibrés. Les étapes suivantes vous guideront en toute sécurité dans ce processus. </span></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">In this step we will set the neutral rate for the motor highlighted in the illustration to the right. <br />Please pay attention to the details and in particular the motors position and its rotation direction. Ensure the motors are spinning in the correct direction as shown in the diagram. Swap any 2 motor wires to change the direction of a motor. </span></p> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">To find </span><span style=" font-size:10pt; font-weight:600;">the neutral rate for this motor</span><span style=" font-size:10pt;">, press the Start button below and slide the slider to the right until the motor just starts to spin stable. <br /><br />When done press button again to stop.</span></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> @@ -9758,6 +9770,29 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Cochez "Inverser" pour changer la direction de mouvement du servo.</span></p></body></html> + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">In this step we will set the neutral rate for the motor highlighted in the illustration to the right. <br />Please pay attention to the details and in particular the motors position and its rotation direction. Ensure the motors are spinning in the correct direction as shown in the diagram. Swap any 2 motor wires to change the direction of a motor. </span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">A cette étapes nous allons ajuster le neutre du moteur mis en évidence dans l'illustration à droite. <br/>Veuillez faire attention aux détails et en particulier à la position et au sens de rotation du moteur concerné. Soyez certain que le moteur tourne dans le bon sens comme indiqué sur l'illustration ci-contre. Vous pouvez intervertir deux fils du moteur pour changer son sens de rotation. </span></p></body></html> + + + + <html><head/><body><p><span style=" font-size:10pt;">To find </span><span style=" font-size:10pt; font-weight:600;">the neutral rate for this motor</span><span style=" font-size:10pt;">, press the Start button below and slide the slider to the right until the motor just starts to spin stable. <br/><br/>When done press button again to stop.</span></p></body></html> + <html><head/><body><p><span style=" font-size:10pt;">Pour trouver </span><span style=" font-size:10pt; font-weight:600;">le neutre de ce moteur</span><span style=" font-size:10pt;">, appuyez sur le bouton "Démarrer" ci-dessous et bougez le curseur vers la droite jusqu'à ce que le moteur démarre et tourne de manière régulière. <br /><br />Lorsque c'est réglé, appuyez à nouveau sur le bouton pour arrêter.</span></p></body></html> + + + + Output value: 1000µs + Valeur de sortie : <b>1000</b> µs + RebootPage @@ -11597,7 +11632,7 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende.Écriture paramètres de stabilisation - + Writing mixer settings Écriture paramètres mixeur @@ -12508,12 +12543,12 @@ La carte sera redémarrée et tous les paramètres effacés. Source: - Source : + Source : The source of Curve 1 will always be Throttle - La source de la Courbe 1 est toujours Throttle + La source de la Courbe 1 est toujours Throttle @@ -13602,7 +13637,12 @@ p, li { white-space: pre-wrap; } Cette option démarre vos moteurs avec la valeur sélectionnée sur les curseurs, indépendamment de l'émetteur. Il est recommandé d'enlever les hélices des moteurs. Êtes-vous sûr de vouloir faire ça ? - + + You may want to save your neutral settings. + Vous pouvez enregistrer vos changements des réglages de neutre. + + + http://wiki.openpilot.org/x/WIGf @@ -13610,7 +13650,9 @@ p, li { white-space: pre-wrap; } OneShot only works with MainPort settings marked with "+OneShot" Using "PPM_PIN6+OneShot" bank 4 (output 6) must be set to PWM - + OneShot fonctionne uniquement avec les réglages de Mainport marqués avec "+OneShot" +En utilisant "PPM_PIN6+OneShot" la banque 4 (sortie 6) doit être réglée sur PWM + @@ -15729,7 +15771,7 @@ A noter : Pour le GPS OpenPilot v8, veuillez choisir l'option GPS U-Blox. - + %1 µs @@ -15904,22 +15946,22 @@ p, li { white-space: pre-wrap; } Reboot - Redémarrage + Redémarrage <html><head/><body><p>Please wait. Your controller is rebooting.<br/>This can take up to a minute.</p></body></html> - <html><head/><body><p>Veuillez patienter. Votre contrôleur redémarre<br/>Cela peut prendre jusqu'à une minute.</p></body></html> + <html><head/><body><p>Veuillez patienter. Votre contrôleur redémarre<br/>Cela peut prendre jusqu'à une minute.</p></body></html> Ok - Ok + Ok <font color='red'>Reboot failed!</font><p>Please perform a manual reboot by power cycling the board.<br>To power cycle the controller remove all batteries and the USB cable for at least 30 seconds.<br>After 30 seconds, plug in the board again and wait for it to connect, this can take a few seconds.<br>Then press Ok.</p> - <font color='red'>Le rédémarrage a échoué !</font><p>Veuillez effectuer un redémarrage manuel de la carte.<br>Pour redémarrer la carte contrôleur, envelez toutes les batteries ainsi que le câble USB pour au moins 30 secondes.<br>Après 30 secondes, connecter à nouveau la carte et attendez qu'elle soit connectée, cela peut prendre quelques secondes.<br>Ensuite cliquez sur Ok.</p> + <font color='red'>Le rédémarrage a échoué !</font><p>Veuillez effectuer un redémarrage manuel de la carte.<br>Pour redémarrer la carte contrôleur, envelez toutes les batteries ainsi que le câble USB pour au moins 30 secondes.<br>Après 30 secondes, connecter à nouveau la carte et attendez qu'elle soit connectée, cela peut prendre quelques secondes.<br>Cliquez ensuite sur Ok.</p> @@ -15930,7 +15972,7 @@ p, li { white-space: pre-wrap; } Unbind - Dissocier + Dissocier @@ -15938,22 +15980,22 @@ p, li { white-space: pre-wrap; } Bind - Associer + Associer Unknown - Inconnu + Inconnu Information - Information + Information To apply the changes when binding/unbinding the board must be rebooted or power cycled. - Pour appliquer les changements d'association/dissociation la carte doit être redémarrée ou débranchée/rebranchée. + Pour appliquer les changements d'association/dissociation la carte doit être redémarrée ou débranchée/rebranchée. From 745bf1a9db85b4d8b1a9776da342c94600848489 Mon Sep 17 00:00:00 2001 From: lilvinz Date: Wed, 19 Jun 2013 17:54:37 +0200 Subject: [PATCH 45/47] firmware_defs.mk: add support for build paths containing @ --- make/firmware-defs.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/make/firmware-defs.mk b/make/firmware-defs.mk index e0c5f6cc3..1b28ecf8f 100644 --- a/make/firmware-defs.mk +++ b/make/firmware-defs.mk @@ -95,14 +95,15 @@ gccversion: @$(ECHO) $(MSG_LOAD_FILE) $(call toprel, $@) $(V1) $(OBJCOPY) -O binary $< $@ +replace_special_chars = $(subst @,_,$(subst :,_,$(subst -,_,$(subst .,_,$(subst /,_,$1))))) %.bin.o: %.bin @$(ECHO) $(MSG_BIN_OBJ) $(call toprel, $@) $(V1) $(OBJCOPY) -I binary -O elf32-littlearm --binary-architecture arm \ --rename-section .data=.rodata,alloc,load,readonly,data,contents \ --wildcard \ - --redefine-sym _binary_$(subst :,_,$(subst -,_,$(subst .,_,$(subst /,_,$<))))_start=_binary_start \ - --redefine-sym _binary_$(subst :,_,$(subst -,_,$(subst .,_,$(subst /,_,$<))))_end=_binary_end \ - --redefine-sym _binary_$(subst :,_,$(subst -,_,$(subst .,_,$(subst /,_,$<))))_size=_binary_size \ + --redefine-sym _binary_$(call replace_special_chars,$<)_start=_binary_start \ + --redefine-sym _binary_$(call replace_special_chars,$<)_end=_binary_end \ + --redefine-sym _binary_$(call replace_special_chars,$<)_size=_binary_size \ $< $@ # Create extended listing file/disassambly from ELF output file. From 624767a18dfabc03c030481fc7a87e67b8c29367 Mon Sep 17 00:00:00 2001 From: James Duley Date: Fri, 20 Feb 2015 10:23:40 +1300 Subject: [PATCH 46/47] OP-1735 build fails with tidle in path:fixed --- make/firmware-defs.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/firmware-defs.mk b/make/firmware-defs.mk index 1b28ecf8f..f26fcc78d 100644 --- a/make/firmware-defs.mk +++ b/make/firmware-defs.mk @@ -95,7 +95,7 @@ gccversion: @$(ECHO) $(MSG_LOAD_FILE) $(call toprel, $@) $(V1) $(OBJCOPY) -O binary $< $@ -replace_special_chars = $(subst @,_,$(subst :,_,$(subst -,_,$(subst .,_,$(subst /,_,$1))))) +replace_special_chars = $(subst ~,_,$(subst @,_,$(subst :,_,$(subst -,_,$(subst .,_,$(subst /,_,$1)))))) %.bin.o: %.bin @$(ECHO) $(MSG_BIN_OBJ) $(call toprel, $@) $(V1) $(OBJCOPY) -I binary -O elf32-littlearm --binary-architecture arm \ From 911ddff2d5b7c23714ba6c026ec26f77beaad5ad Mon Sep 17 00:00:00 2001 From: James Duley Date: Fri, 20 Feb 2015 10:48:51 +1300 Subject: [PATCH 47/47] OP-1735 build fails with tidle in path: tidy after review comment --- make/firmware-defs.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/make/firmware-defs.mk b/make/firmware-defs.mk index f26fcc78d..b44012f9e 100644 --- a/make/firmware-defs.mk +++ b/make/firmware-defs.mk @@ -71,6 +71,9 @@ MSG_FLASH_IMG = $(QUOTE) FLASH_IMG $(MSG_EXTRA) $(QUOTE) # to the top of the source tree. toprel = $(subst $(realpath $(ROOT_DIR))/,,$(abspath $(1))) +# Function to replace special characters like is done for the symbols. +replace_special_chars = $(subst ~,_,$(subst @,_,$(subst :,_,$(subst -,_,$(subst .,_,$(subst /,_,$1)))))) + # Display compiler version information. .PHONY: gccversion gccversion: @@ -95,7 +98,6 @@ gccversion: @$(ECHO) $(MSG_LOAD_FILE) $(call toprel, $@) $(V1) $(OBJCOPY) -O binary $< $@ -replace_special_chars = $(subst ~,_,$(subst @,_,$(subst :,_,$(subst -,_,$(subst .,_,$(subst /,_,$1)))))) %.bin.o: %.bin @$(ECHO) $(MSG_BIN_OBJ) $(call toprel, $@) $(V1) $(OBJCOPY) -I binary -O elf32-littlearm --binary-architecture arm \