mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Merge branch 'rel-nano-15.05' into corvuscorax/fixedwingautotakeofftest
This commit is contained in:
commit
a41ef23659
@ -1,4 +1,10 @@
|
|||||||
Release Notes - OpenPilot - Version RELEASE-15.05 RC6
|
Release Notes - OpenPilot - Version RELEASE-15.05 RC7
|
||||||
|
|
||||||
|
RC7 changes relative to RC6:
|
||||||
|
1. Nano hardware page fixes
|
||||||
|
2. Upgrade google map version
|
||||||
|
3. xtal frequency changes again to suit an sbus receiver.
|
||||||
|
4. OP-1875 reinit EKF on changes to AuxMagSettings
|
||||||
|
|
||||||
RC6 changes relative to RC5:
|
RC6 changes relative to RC5:
|
||||||
1. Altvario AltHold PID updates
|
1. Altvario AltHold PID updates
|
||||||
|
@ -123,7 +123,7 @@ void ConfigRevoHWWidget::updateObjectsFromWidgets()
|
|||||||
// If any port is configured to be GPS port, enable GPS module if it is not enabled.
|
// If any port is configured to be GPS port, enable GPS module if it is not enabled.
|
||||||
// Otherwise disable GPS module.
|
// Otherwise disable GPS module.
|
||||||
if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_GPS)
|
if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_GPS)
|
||||||
|| isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_GPS)) {
|
|| isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_GPS)) {
|
||||||
data.OptionalModules[HwSettings::OPTIONALMODULES_GPS] = HwSettings::OPTIONALMODULES_ENABLED;
|
data.OptionalModules[HwSettings::OPTIONALMODULES_GPS] = HwSettings::OPTIONALMODULES_ENABLED;
|
||||||
} else {
|
} else {
|
||||||
data.OptionalModules[HwSettings::OPTIONALMODULES_GPS] = HwSettings::OPTIONALMODULES_DISABLED;
|
data.OptionalModules[HwSettings::OPTIONALMODULES_GPS] = HwSettings::OPTIONALMODULES_DISABLED;
|
||||||
@ -168,7 +168,7 @@ void ConfigRevoHWWidget::usbVCPPortChanged(int index)
|
|||||||
|
|
||||||
// _USBTELEMETRY modes are mutual exclusive
|
// _USBTELEMETRY modes are mutual exclusive
|
||||||
if (isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_USBTELEMETRY)
|
if (isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_USBTELEMETRY)
|
||||||
&& isComboboxOptionSelected(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_USBTELEMETRY)) {
|
&& isComboboxOptionSelected(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_USBTELEMETRY)) {
|
||||||
setComboboxSelectedOption(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_DISABLED);
|
setComboboxSelectedOption(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_DISABLED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -179,7 +179,7 @@ void ConfigRevoHWWidget::usbHIDPortChanged(int index)
|
|||||||
|
|
||||||
// _USBTELEMETRY modes are mutual exclusive
|
// _USBTELEMETRY modes are mutual exclusive
|
||||||
if (isComboboxOptionSelected(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_USBTELEMETRY)
|
if (isComboboxOptionSelected(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_USBTELEMETRY)
|
||||||
&& isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_USBTELEMETRY)) {
|
&& isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_USBTELEMETRY)) {
|
||||||
setComboboxSelectedOption(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_DISABLED);
|
setComboboxSelectedOption(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_DISABLED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ void ConfigRevoNanoHWWidget::updateObjectsFromWidgets()
|
|||||||
// If any port is configured to be GPS port, enable GPS module if it is not enabled.
|
// If any port is configured to be GPS port, enable GPS module if it is not enabled.
|
||||||
// Otherwise disable GPS module.
|
// Otherwise disable GPS module.
|
||||||
if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_GPS)
|
if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_GPS)
|
||||||
|| isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_GPS)) {
|
|| isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_GPS)) {
|
||||||
data.OptionalModules[HwSettings::OPTIONALMODULES_GPS] = HwSettings::OPTIONALMODULES_ENABLED;
|
data.OptionalModules[HwSettings::OPTIONALMODULES_GPS] = HwSettings::OPTIONALMODULES_ENABLED;
|
||||||
} else {
|
} else {
|
||||||
data.OptionalModules[HwSettings::OPTIONALMODULES_GPS] = HwSettings::OPTIONALMODULES_DISABLED;
|
data.OptionalModules[HwSettings::OPTIONALMODULES_GPS] = HwSettings::OPTIONALMODULES_DISABLED;
|
||||||
@ -165,7 +165,7 @@ void ConfigRevoNanoHWWidget::usbVCPPortChanged(int index)
|
|||||||
|
|
||||||
// _USBTELEMETRY modes are mutual exclusive
|
// _USBTELEMETRY modes are mutual exclusive
|
||||||
if (isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_USBTELEMETRY)
|
if (isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_USBTELEMETRY)
|
||||||
&& isComboboxOptionSelected(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_USBTELEMETRY)) {
|
&& isComboboxOptionSelected(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_USBTELEMETRY)) {
|
||||||
setComboboxSelectedOption(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_DISABLED);
|
setComboboxSelectedOption(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_DISABLED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -176,7 +176,7 @@ void ConfigRevoNanoHWWidget::usbHIDPortChanged(int index)
|
|||||||
|
|
||||||
// _USBTELEMETRY modes are mutual exclusive
|
// _USBTELEMETRY modes are mutual exclusive
|
||||||
if (isComboboxOptionSelected(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_USBTELEMETRY)
|
if (isComboboxOptionSelected(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_USBTELEMETRY)
|
||||||
&& isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_USBTELEMETRY)) {
|
&& isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_USBTELEMETRY)) {
|
||||||
setComboboxSelectedOption(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_DISABLED);
|
setComboboxSelectedOption(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_DISABLED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -213,6 +213,7 @@ bool ConfigTaskWidget::isComboboxOptionSelected(QComboBox *combo, int optionValu
|
|||||||
{
|
{
|
||||||
bool ok;
|
bool ok;
|
||||||
int value = combo->currentData().toInt(&ok);
|
int value = combo->currentData().toInt(&ok);
|
||||||
|
|
||||||
return ok ? value == optionValue : false;
|
return ok ? value == optionValue : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,14 +221,18 @@ int ConfigTaskWidget::getComboboxSelectedOption(QComboBox *combo)
|
|||||||
{
|
{
|
||||||
bool ok;
|
bool ok;
|
||||||
int index = combo->currentData().toInt(&ok);
|
int index = combo->currentData().toInt(&ok);
|
||||||
return ok ? index : -1;
|
|
||||||
|
return ok ? index : combo->currentIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigTaskWidget::setComboboxSelectedOption(QComboBox *combo, int optionValue)
|
void ConfigTaskWidget::setComboboxSelectedOption(QComboBox *combo, int optionValue)
|
||||||
{
|
{
|
||||||
int index = combo->findData(QVariant(optionValue));
|
int index = combo->findData(QVariant(optionValue));
|
||||||
|
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
combo->setCurrentIndex(index);
|
combo->setCurrentIndex(index);
|
||||||
|
} else {
|
||||||
|
combo->setCurrentIndex(optionValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,7 +244,7 @@ int ConfigTaskWidget::getComboboxIndexForOption(QComboBox *combo, int optionValu
|
|||||||
void ConfigTaskWidget::enableComboBoxOptionItem(QComboBox *combo, int optionValue, bool enable)
|
void ConfigTaskWidget::enableComboBoxOptionItem(QComboBox *combo, int optionValue, bool enable)
|
||||||
{
|
{
|
||||||
combo->model()->setData(combo->model()->index(getComboboxIndexForOption(combo, optionValue), 0),
|
combo->model()->setData(combo->model()->index(getComboboxIndexForOption(combo, optionValue), 0),
|
||||||
!enable ? QVariant(0) : QVariant(1 | 32), Qt::UserRole - 1);
|
!enable ? QVariant(0) : QVariant(1 | 32), Qt::UserRole - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigTaskWidget::saveObjectToSD(UAVObject *obj)
|
void ConfigTaskWidget::saveObjectToSD(UAVObject *obj)
|
||||||
@ -1039,7 +1044,7 @@ void ConfigTaskWidget::loadWidgetLimits(QWidget *widget, UAVObjectField *field,
|
|||||||
cb->clear();
|
cb->clear();
|
||||||
QStringList options = field->getOptions();
|
QStringList options = field->getOptions();
|
||||||
|
|
||||||
for(int optionIndex = 0; optionIndex < options.count(); optionIndex++) {
|
for (int optionIndex = 0; optionIndex < options.count(); optionIndex++) {
|
||||||
if (hasLimits) {
|
if (hasLimits) {
|
||||||
if (m_currentBoardId > -1 && field->isWithinLimits(options.at(optionIndex), index, m_currentBoardId)) {
|
if (m_currentBoardId > -1 && field->isWithinLimits(options.at(optionIndex), index, m_currentBoardId)) {
|
||||||
cb->addItem(options.at(optionIndex), QVariant(optionIndex));
|
cb->addItem(options.at(optionIndex), QVariant(optionIndex));
|
||||||
|
Loading…
Reference in New Issue
Block a user