From 004f5a32a9a7be0be97a332252a3d60025305b69 Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Mon, 6 Oct 2014 21:23:35 +0200 Subject: [PATCH 1/8] OP-1528 Enable Telemetry on the Flexi-IO (receiver) port on the Revo --- .../targets/boards/revolution/board_hw_defs.c | 47 +++++++++++++++++++ .../boards/revolution/firmware/pios_board.c | 14 +++++- shared/uavobjectdefinition/hwsettings.xml | 2 +- 3 files changed, 60 insertions(+), 3 deletions(-) diff --git a/flight/targets/boards/revolution/board_hw_defs.c b/flight/targets/boards/revolution/board_hw_defs.c index 3a7cf115f..63b784f09 100644 --- a/flight/targets/boards/revolution/board_hw_defs.c +++ b/flight/targets/boards/revolution/board_hw_defs.c @@ -1092,6 +1092,53 @@ static const struct pios_usart_cfg pios_usart_hkosd_flexi_cfg = { }, }; +static const struct pios_usart_cfg pios_usart_rcvrport_cfg = { + .regs = USART6, + .remap = GPIO_AF_USART6, + .init = { + .USART_BaudRate = 57600, + .USART_WordLength = USART_WordLength_8b, + .USART_Parity = USART_Parity_No, + .USART_StopBits = USART_StopBits_1, + .USART_HardwareFlowControl = USART_HardwareFlowControl_None, + .USART_Mode = USART_Mode_Rx | USART_Mode_Tx, + }, + .irq = { + .init = { + .NVIC_IRQChannel = USART6_IRQn, + .NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID, + .NVIC_IRQChannelSubPriority = 0, + .NVIC_IRQChannelCmd = ENABLE, + }, + }, + + .tx = { + // * 7: PC6 = TIM8 CH1, USART6 TX + .gpio = GPIOC, + .init = { + .GPIO_Pin = GPIO_Pin_6, + .GPIO_Speed = GPIO_Speed_2MHz, + .GPIO_Mode = GPIO_Mode_AF, + .GPIO_OType = GPIO_OType_PP, + .GPIO_PuPd = GPIO_PuPd_UP + }, + .pin_source = GPIO_PinSource6, + }, + + .rx = { + // * 8: PC7 = TIM8 CH2, USART6 RX + .gpio = GPIOC, + .init = { + .GPIO_Pin = GPIO_Pin_7, + .GPIO_Speed = GPIO_Speed_2MHz, + .GPIO_Mode = GPIO_Mode_AF, + .GPIO_OType = GPIO_OType_PP, + .GPIO_PuPd = GPIO_PuPd_UP + }, + .pin_source = GPIO_PinSource7, + } +}; + #if defined(PIOS_INCLUDE_COM) #include diff --git a/flight/targets/boards/revolution/firmware/pios_board.c b/flight/targets/boards/revolution/firmware/pios_board.c index 9f66deb6d..cea0f4460 100644 --- a/flight/targets/boards/revolution/firmware/pios_board.c +++ b/flight/targets/boards/revolution/firmware/pios_board.c @@ -880,25 +880,35 @@ void PIOS_Board_Init(void) case HWSETTINGS_RM_RCVRPORT_PPM: case HWSETTINGS_RM_RCVRPORT_PPMOUTPUTS: case HWSETTINGS_RM_RCVRPORT_PPMPWM: + case HWSETTINGS_RM_RCVRPORT_PPMTELEMETRY: #if defined(PIOS_INCLUDE_PPM) + PIOS_Board_configure_ppm(&pios_ppm_cfg); + if (hwsettings_rcvrport == HWSETTINGS_RM_RCVRPORT_PPMOUTPUTS) { // configure servo outputs and the remaining 5 inputs as outputs pios_servo_cfg = &pios_servo_cfg_out_in_ppm; } - PIOS_Board_configure_ppm(&pios_ppm_cfg); - // enable pwm on the remaining channels if (hwsettings_rcvrport == HWSETTINGS_RM_RCVRPORT_PPMPWM) { PIOS_Board_configure_pwm(&pios_pwm_ppm_cfg); } + if (hwsettings_rcvrport == HWSETTINGS_RM_RCVRPORT_PPMTELEMETRY) { + PIOS_Board_configure_com(&pios_usart_rcvrport_cfg, PIOS_COM_TELEM_RF_RX_BUF_LEN, PIOS_COM_TELEM_RF_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_telem_rf_id); + } + break; #endif /* PIOS_INCLUDE_PPM */ case HWSETTINGS_RM_RCVRPORT_OUTPUTS: // configure only the servo outputs pios_servo_cfg = &pios_servo_cfg_out_in; break; + case HWSETTINGS_RM_RCVRPORT_TELEMETRY: + if (hwsettings_rcvrport == HWSETTINGS_RM_RCVRPORT_PPMTELEMETRY) { + PIOS_Board_configure_com(&pios_usart_rcvrport_cfg, PIOS_COM_TELEM_RF_RX_BUF_LEN, PIOS_COM_TELEM_RF_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_telem_rf_id); + } + break; } diff --git a/shared/uavobjectdefinition/hwsettings.xml b/shared/uavobjectdefinition/hwsettings.xml index 09b79d388..a190a1b47 100644 --- a/shared/uavobjectdefinition/hwsettings.xml +++ b/shared/uavobjectdefinition/hwsettings.xml @@ -12,7 +12,7 @@ - + From 0555f7e0ec59de3f066b6fc0d763d594b6397c3b Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Tue, 7 Oct 2014 00:44:06 +0200 Subject: [PATCH 2/8] OP-1528 Add GUI support for Telemetry and Telemetry+PPM over the Flexi-IO port. --- .../src/plugins/config/configrevohwwidget.cpp | 36 + .../src/plugins/config/configrevohwwidget.h | 1 + .../src/plugins/config/configrevohwwidget.ui | 768 +++++++++--------- 3 files changed, 433 insertions(+), 372 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configrevohwwidget.cpp b/ground/openpilotgcs/src/plugins/config/configrevohwwidget.cpp index 902716058..ae224bd6c 100644 --- a/ground/openpilotgcs/src/plugins/config/configrevohwwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configrevohwwidget.cpp @@ -65,6 +65,8 @@ ConfigRevoHWWidget::ConfigRevoHWWidget(QWidget *parent) : ConfigTaskWidget(paren addWidgetBinding("HwSettings", "GPSSpeed", m_ui->cbMainGPSSpeed); addWidgetBinding("HwSettings", "ComUsbBridgeSpeed", m_ui->cbMainComSpeed); + addWidgetBinding("HwSettings", "TelemetrySpeed", m_ui->cbRcvrTelemSpeed); + // Add Gps protocol configuration addWidgetBinding("GPSSettings", "DataProtocol", m_ui->cbMainGPSProtocol); addWidgetBinding("GPSSettings", "DataProtocol", m_ui->cbFlexiGPSProtocol); @@ -95,6 +97,7 @@ void ConfigRevoHWWidget::setupCustomCombos() connect(m_ui->cbFlexi, SIGNAL(currentIndexChanged(int)), this, SLOT(flexiPortChanged(int))); connect(m_ui->cbMain, SIGNAL(currentIndexChanged(int)), this, SLOT(mainPortChanged(int))); + connect(m_ui->cbRcvr, SIGNAL(currentIndexChanged(int)), this, SLOT(rcvrPortChanged(int))); } void ConfigRevoHWWidget::refreshWidgetsValues(UAVObject *obj) @@ -105,6 +108,7 @@ void ConfigRevoHWWidget::refreshWidgetsValues(UAVObject *obj) usbVCPPortChanged(0); mainPortChanged(0); flexiPortChanged(0); + rcvrPortChanged(0); m_refreshing = false; } @@ -196,6 +200,10 @@ void ConfigRevoHWWidget::flexiPortChanged(int index) if (m_ui->cbMain->currentIndex() == HwSettings::RM_MAINPORT_TELEMETRY) { m_ui->cbMain->setCurrentIndex(HwSettings::RM_MAINPORT_DISABLED); } + if (m_ui->cbRcvr->currentIndex() == HwSettings::RM_RCVRPORT_PPMTELEMETRY + || m_ui->cbRcvr->currentIndex() == HwSettings::RM_RCVRPORT_TELEMETRY) { + m_ui->cbRcvr->setCurrentIndex(HwSettings::RM_RCVRPORT_DISABLED); + } break; case HwSettings::RM_FLEXIPORT_GPS: // Add Gps protocol configuration @@ -247,6 +255,10 @@ void ConfigRevoHWWidget::mainPortChanged(int index) if (m_ui->cbFlexi->currentIndex() == HwSettings::RM_FLEXIPORT_TELEMETRY) { m_ui->cbFlexi->setCurrentIndex(HwSettings::RM_FLEXIPORT_DISABLED); } + if (m_ui->cbRcvr->currentIndex() == HwSettings::RM_RCVRPORT_PPMTELEMETRY + || m_ui->cbRcvr->currentIndex() == HwSettings::RM_RCVRPORT_TELEMETRY) { + m_ui->cbRcvr->setCurrentIndex(HwSettings::RM_RCVRPORT_DISABLED); + } break; case HwSettings::RM_MAINPORT_GPS: // Add Gps protocol configuration @@ -279,6 +291,30 @@ void ConfigRevoHWWidget::mainPortChanged(int index) } } +void ConfigRevoHWWidget::rcvrPortChanged(int index) +{ + Q_UNUSED(index); + + switch (m_ui->cbRcvr->currentIndex()) { + case HwSettings::RM_RCVRPORT_TELEMETRY: + case HwSettings::RM_RCVRPORT_PPMTELEMETRY: + m_ui->lblRcvrSpeed->setVisible(true); + m_ui->cbRcvrTelemSpeed->setVisible(true); + + if (m_ui->cbFlexi->currentIndex() == HwSettings::RM_FLEXIPORT_TELEMETRY) { + m_ui->cbFlexi->setCurrentIndex(HwSettings::RM_FLEXIPORT_DISABLED); + } + if (m_ui->cbMain->currentIndex() == HwSettings::RM_FLEXIPORT_TELEMETRY) { + m_ui->cbMain->setCurrentIndex(HwSettings::RM_FLEXIPORT_DISABLED); + } + break; + default: + m_ui->lblRcvrSpeed->setVisible(false); + m_ui->cbRcvrTelemSpeed->setVisible(false); + break; + } +} + void ConfigRevoHWWidget::openHelp() { QDesktopServices::openUrl(QUrl(tr("http://wiki.openpilot.org/x/GgDBAQ"), QUrl::StrictMode)); diff --git a/ground/openpilotgcs/src/plugins/config/configrevohwwidget.h b/ground/openpilotgcs/src/plugins/config/configrevohwwidget.h index abb079839..436982fef 100644 --- a/ground/openpilotgcs/src/plugins/config/configrevohwwidget.h +++ b/ground/openpilotgcs/src/plugins/config/configrevohwwidget.h @@ -57,6 +57,7 @@ private slots: void usbHIDPortChanged(int index); void flexiPortChanged(int index); void mainPortChanged(int index); + void rcvrPortChanged(int index); void openHelp(); }; diff --git a/ground/openpilotgcs/src/plugins/config/configrevohwwidget.ui b/ground/openpilotgcs/src/plugins/config/configrevohwwidget.ui index 71fe01a23..f199499cb 100644 --- a/ground/openpilotgcs/src/plugins/config/configrevohwwidget.ui +++ b/ground/openpilotgcs/src/plugins/config/configrevohwwidget.ui @@ -121,9 +121,9 @@ 0 - 0 - 810 - 665 + -87 + 789 + 847 @@ -139,6 +139,45 @@ 12 + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -192,81 +231,100 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - 0 - 0 - - + + + - USB HID Function + Protocol + + + Qt::PlainText + + + Qt::AlignCenter + + + + + + + + + + + + + Qt::Horizontal + + + + 80 + 10 + + + + + + + + Speed Qt::AlignBottom|Qt::AlignHCenter - - + + - Qt::Horizontal + Qt::Vertical QSizePolicy::Fixed - 50 - 10 + 20 + 20 - - + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 13 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 13 + + + + + + Qt::Horizontal @@ -281,17 +339,201 @@ - - + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 13 + + + + + + + + 0 + + + + + true + + + + + + + + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 90 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 120 + 10 + + + + + + + + + 0 + 0 + + - Protocol + Receiver Port - Qt::AlignCenter + Qt::AlignBottom|Qt::AlignHCenter - + + + + + 0 + 0 + + + + Sonar Port + + + Qt::AlignBottom|Qt::AlignHCenter + + + + + + + Speed + + + Qt::AlignBottom|Qt::AlignHCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 120 + 10 + + + + + + + + + + + false + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 70 + 10 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + Main Port + + + Qt::AlignBottom|Qt::AlignHCenter + + + + + + + + + + Flexi Port + + + Qt::AlignBottom|Qt::AlignHCenter + + + + @@ -322,28 +564,12 @@ - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - + 0 - + true @@ -358,64 +584,8 @@ - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 70 - 10 - - - - - - - - Flexi Port - - - Qt::AlignBottom|Qt::AlignHCenter - - - - - - - false - - - - - - - - - - Main Port - - - Qt::AlignBottom|Qt::AlignHCenter - - - - - - - true - - - - - + + Qt::Horizontal @@ -430,13 +600,80 @@ - - + + + + Protocol + + + Qt::AlignCenter + + - - + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 50 + 10 + + + - + + + + + + + + + 0 + 0 + + + + Speed + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + + + + + + + Qt::Vertical + + + + 0 + 50 + + + + + + + + + + true + + + + @@ -452,71 +689,10 @@ - - - - - 0 - 0 - - - - Sonar Port - - - Qt::AlignBottom|Qt::AlignHCenter - - - - - - - - 0 - 0 - - - - Receiver Port - - - Qt::AlignBottom|Qt::AlignHCenter - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 25 - - - + + - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 120 - 10 - - - - - @@ -532,177 +708,25 @@ - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 120 - - - + + - - + + + + + 0 + 0 + + - Speed + USB HID Function Qt::AlignBottom|Qt::AlignHCenter - - - - 0 - - - - - true - - - - - - - - - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 120 - 10 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 13 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 13 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 13 - - - - - - - - Qt::Horizontal - - - - 80 - 10 - - - - - - - - Speed - - - Qt::AlignBottom|Qt::AlignHCenter - - - - - - - Protocol - - - Qt::PlainText - - - Qt::AlignCenter - - - - - - - - - @@ -908,8 +932,8 @@ Beware of not locking yourself out! - + From aaebc25eff0c3202766a16b124d270bb4378e838 Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Wed, 8 Oct 2014 00:31:31 +0200 Subject: [PATCH 3/8] OP-1528 Fix Telemetry-only over the Flexi-IO port --- flight/targets/boards/revolution/firmware/pios_board.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/flight/targets/boards/revolution/firmware/pios_board.c b/flight/targets/boards/revolution/firmware/pios_board.c index cea0f4460..b1c418dae 100644 --- a/flight/targets/boards/revolution/firmware/pios_board.c +++ b/flight/targets/boards/revolution/firmware/pios_board.c @@ -905,9 +905,7 @@ void PIOS_Board_Init(void) pios_servo_cfg = &pios_servo_cfg_out_in; break; case HWSETTINGS_RM_RCVRPORT_TELEMETRY: - if (hwsettings_rcvrport == HWSETTINGS_RM_RCVRPORT_PPMTELEMETRY) { - PIOS_Board_configure_com(&pios_usart_rcvrport_cfg, PIOS_COM_TELEM_RF_RX_BUF_LEN, PIOS_COM_TELEM_RF_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_telem_rf_id); - } + PIOS_Board_configure_com(&pios_usart_rcvrport_cfg, PIOS_COM_TELEM_RF_RX_BUF_LEN, PIOS_COM_TELEM_RF_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_telem_rf_id); break; } From bedb749f72e111db8f098c34adc8c598f201174d Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Fri, 10 Oct 2014 17:57:24 +0200 Subject: [PATCH 4/8] OP-1534 Add expo and acro insanity factor to TxPID --- flight/modules/TxPID/txpid.c | 31 +++++++++++++ .../src/plugins/config/configtxpidwidget.cpp | 45 +++++++++++++++++++ shared/uavobjectdefinition/txpidsettings.xml | 3 +- 3 files changed, 78 insertions(+), 1 deletion(-) diff --git a/flight/modules/TxPID/txpid.c b/flight/modules/TxPID/txpid.c index a1e5fd995..ca21c2771 100644 --- a/flight/modules/TxPID/txpid.c +++ b/flight/modules/TxPID/txpid.c @@ -83,6 +83,7 @@ static void updatePIDs(UAVObjEvent *ev); static uint8_t update(float *var, float val); static uint8_t updateUint8(uint8_t *var, float val); +static uint8_t updateInt8(int8_t *var, float val); static float scale(float val, float inMin, float inMax, float outMin, float outMax); /** @@ -331,9 +332,24 @@ static void updatePIDs(UAVObjEvent *ev) case TXPIDSETTINGS_PIDS_YAWATTITUDERESP: needsUpdateBank |= updateUint8(&bank.YawMax, value); break; + case TXPIDSETTINGS_PIDS_ROLLEXPO: + needsUpdateBank |= updateInt8(&bank.StickExpo.Roll, value); + break; + case TXPIDSETTINGS_PIDS_PITCHEXPO: + needsUpdateBank |= updateInt8(&bank.StickExpo.Pitch, value); + break; + case TXPIDSETTINGS_PIDS_ROLLPITCHEXPO: + needsUpdateBank |= updateInt8(&bank.StickExpo.Roll, value); + break; + case TXPIDSETTINGS_PIDS_YAWEXPO: + needsUpdateBank |= updateInt8(&bank.StickExpo.Yaw, value); + break; case TXPIDSETTINGS_PIDS_GYROTAU: needsUpdateStab |= update(&stab.GyroTau, value); break; + case TXPIDSETTINGS_PIDS_ACROPLUSFACTOR: + needsUpdateBank |= update(&bank.AcroInsanityFactor, value); + break; default: PIOS_Assert(0); } @@ -430,6 +446,21 @@ static uint8_t updateUint8(uint8_t *var, float val) return 0; } +/** + * Updates var using val if needed. + * \returns 1 if updated, 0 otherwise + */ +static uint8_t updateInt8(int8_t *var, float val) +{ + int8_t roundedVal = (int8_t)roundf(val); + + if (*var != roundedVal) { + *var = roundedVal; + return 1; + } + return 0; +} + /** * @} */ diff --git a/ground/openpilotgcs/src/plugins/config/configtxpidwidget.cpp b/ground/openpilotgcs/src/plugins/config/configtxpidwidget.cpp index 0f0e7fa87..4787056c4 100644 --- a/ground/openpilotgcs/src/plugins/config/configtxpidwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configtxpidwidget.cpp @@ -145,6 +145,25 @@ static bool isAttitudeOption(int pidOption) } } +static bool isExpoOption(int pidOption) +{ + switch (pidOption) { + case TxPIDSettings::PIDS_ROLLEXPO: + case TxPIDSettings::PIDS_PITCHEXPO: + case TxPIDSettings::PIDS_ROLLPITCHEXPO: + case TxPIDSettings::PIDS_YAWEXPO: + return true; + + default: + return false; + } +} + +static bool isAcroPlusFactorOption(int pidOption) +{ + return pidOption == TxPIDSettings::PIDS_ACROPLUSFACTOR; +} + template static float defaultValueForPidOption(const StabilizationSettingsBankX *bank, int pidOption) { @@ -260,6 +279,18 @@ static float defaultValueForPidOption(const StabilizationSettingsBankX *bank, in case TxPIDSettings::PIDS_YAWATTITUDERESP: return bank->getYawMax(); + case TxPIDSettings::PIDS_ROLLEXPO: + return bank->getStickExpo_Roll(); + + case TxPIDSettings::PIDS_PITCHEXPO: + return bank->getStickExpo_Pitch(); + + case TxPIDSettings::PIDS_ROLLPITCHEXPO: + return bank->getStickExpo_Roll(); + + case TxPIDSettings::PIDS_YAWEXPO: + return bank->getStickExpo_Yaw(); + case -1: // The PID Option field was uninitialized. return 0.0f; @@ -337,6 +368,20 @@ void ConfigTxPIDWidget::updateSpinBoxProperties(int selectedPidOption) maxPID->setSingleStep(1); minPID->setDecimals(0); maxPID->setDecimals(0); + } else if (isExpoOption(selectedPidOption)) { + minPID->setRange(-100, 100); + maxPID->setRange(-100, 100); + minPID->setSingleStep(1); + maxPID->setSingleStep(1); + minPID->setDecimals(0); + maxPID->setDecimals(0); + } else if (isAcroPlusFactorOption(selectedPidOption)) { + minPID->setRange(0, 1); + maxPID->setRange(0, 1); + minPID->setSingleStep(0.01); + maxPID->setSingleStep(0.01); + minPID->setDecimals(2); + maxPID->setDecimals(2); } else { minPID->setRange(0, 99.99); maxPID->setRange(0, 99.99); diff --git a/shared/uavobjectdefinition/txpidsettings.xml b/shared/uavobjectdefinition/txpidsettings.xml index c1bd56740..28035452b 100644 --- a/shared/uavobjectdefinition/txpidsettings.xml +++ b/shared/uavobjectdefinition/txpidsettings.xml @@ -19,7 +19,8 @@ Pitch Attitude.Kp, Pitch Attitude.Ki, Pitch Attitude.ILimit, Pitch Attitude.Resp, Roll+Pitch Attitude.Kp, Roll+Pitch Attitude.Ki, Roll+Pitch Attitude.ILimit, Roll+Pitch Attitude.Resp, Yaw Attitude.Kp, Yaw Attitude.Ki, Yaw Attitude.ILimit, Yaw Attitude.Resp, - GyroTau" + Roll.Expo, Pitch.Expo, Roll+Pitch.Expo, Yaw.Expo, + GyroTau,AcroPlusFactor" defaultvalue="Disabled"/> From c03d390269bcfb3d4b7485f8940923a1d29a9525 Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Fri, 10 Oct 2014 18:49:18 +0200 Subject: [PATCH 5/8] OP-1534 Update both roll and pitch with TxPID Roll+Pitch.Expo option --- flight/modules/TxPID/txpid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/flight/modules/TxPID/txpid.c b/flight/modules/TxPID/txpid.c index ca21c2771..c4e94fbc8 100644 --- a/flight/modules/TxPID/txpid.c +++ b/flight/modules/TxPID/txpid.c @@ -340,6 +340,7 @@ static void updatePIDs(UAVObjEvent *ev) break; case TXPIDSETTINGS_PIDS_ROLLPITCHEXPO: needsUpdateBank |= updateInt8(&bank.StickExpo.Roll, value); + needsUpdateBank |= updateInt8(&bank.StickExpo.Pitch, value); break; case TXPIDSETTINGS_PIDS_YAWEXPO: needsUpdateBank |= updateInt8(&bank.StickExpo.Yaw, value); From 3285519380ba9ed8b529099ad3b9b008994050b8 Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Fri, 10 Oct 2014 23:51:04 +0200 Subject: [PATCH 6/8] OP-1536 Send only the available bytes, not the entire buffer, to the USB CDC RX callback function --- flight/pios/stm32f4xx/pios_usbhook.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flight/pios/stm32f4xx/pios_usbhook.c b/flight/pios/stm32f4xx/pios_usbhook.c index 259861b14..dc276c491 100644 --- a/flight/pios/stm32f4xx/pios_usbhook.c +++ b/flight/pios/stm32f4xx/pios_usbhook.c @@ -418,7 +418,9 @@ static uint8_t PIOS_USBHOOK_CLASS_DataOut(void *pdev, uint8_t epnum) if ((epnum_idx < NELEMENTS(usb_epout_table)) && usb_epout_table[epnum_idx].cb) { struct usb_ep_entry *ep = &(usb_epout_table[epnum_idx]); - if (!ep->cb(ep->context, epnum_idx, ep->max_len)) { + uint16_t len = USBD_GetRxCount(pdev, epnum); + PIOS_Assert(ep->max_len >= len); + if (!ep->cb(ep->context, epnum_idx, len)) { /* NOTE: use real endpoint number including direction bit */ DCD_SetEPStatus(pdev, epnum, USB_OTG_EP_RX_NAK); } From 8300e61717593eb69253ee16e893ad0d552b26cc Mon Sep 17 00:00:00 2001 From: m_thread Date: Mon, 13 Oct 2014 14:57:15 +0200 Subject: [PATCH 7/8] OP-1539 Fixed limits for AcroInsanityFactor field. --- shared/uavobjectdefinition/stabilizationbank.xml | 2 +- shared/uavobjectdefinition/stabilizationsettingsbank1.xml | 2 +- shared/uavobjectdefinition/stabilizationsettingsbank2.xml | 2 +- shared/uavobjectdefinition/stabilizationsettingsbank3.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shared/uavobjectdefinition/stabilizationbank.xml b/shared/uavobjectdefinition/stabilizationbank.xml index 23185c1c0..bbd9516dc 100644 --- a/shared/uavobjectdefinition/stabilizationbank.xml +++ b/shared/uavobjectdefinition/stabilizationbank.xml @@ -16,7 +16,7 @@ - + diff --git a/shared/uavobjectdefinition/stabilizationsettingsbank1.xml b/shared/uavobjectdefinition/stabilizationsettingsbank1.xml index 94d62265b..48c123fd7 100644 --- a/shared/uavobjectdefinition/stabilizationsettingsbank1.xml +++ b/shared/uavobjectdefinition/stabilizationsettingsbank1.xml @@ -16,7 +16,7 @@ - + diff --git a/shared/uavobjectdefinition/stabilizationsettingsbank2.xml b/shared/uavobjectdefinition/stabilizationsettingsbank2.xml index 6ffda04cf..5fb580ae0 100644 --- a/shared/uavobjectdefinition/stabilizationsettingsbank2.xml +++ b/shared/uavobjectdefinition/stabilizationsettingsbank2.xml @@ -16,7 +16,7 @@ - + diff --git a/shared/uavobjectdefinition/stabilizationsettingsbank3.xml b/shared/uavobjectdefinition/stabilizationsettingsbank3.xml index 12c8b56ff..046cbff6c 100644 --- a/shared/uavobjectdefinition/stabilizationsettingsbank3.xml +++ b/shared/uavobjectdefinition/stabilizationsettingsbank3.xml @@ -16,7 +16,7 @@ - + From a69932fa351a790df7537b2b5ff905ce622ace10 Mon Sep 17 00:00:00 2001 From: m_thread Date: Mon, 13 Oct 2014 16:42:29 +0200 Subject: [PATCH 8/8] OP-1457 Disabling Feed Forward tab when vehicle is Fixed Wing. --- .../openpilotgcs/src/plugins/config/configvehicletypewidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp index c2f64300d..d012f3ecf 100644 --- a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp @@ -174,6 +174,7 @@ ConfigVehicleTypeWidget::~ConfigVehicleTypeWidget() void ConfigVehicleTypeWidget::switchAirframeType(int index) { m_aircraft->airframesWidget->setCurrentWidget(getVehicleConfigWidget(index)); + m_aircraft->tabWidget->setTabEnabled(1, index != 1); } /**