mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
LP-446 - Fixes from review
This commit is contained in:
parent
9def29d927
commit
4e81bbdd57
@ -1799,7 +1799,7 @@ void ConfigInputWidget::updatePositionSlider()
|
||||
{
|
||||
ManualControlSettings::DataFields manualSettingsDataPriv = manualSettingsObj->getData();
|
||||
|
||||
QWidget *fmodes[] = {
|
||||
QWidget *fmsModes[] = {
|
||||
ui->fmsModePos1,
|
||||
ui->fmsModePos2,
|
||||
ui->fmsModePos3,
|
||||
@ -1807,7 +1807,7 @@ void ConfigInputWidget::updatePositionSlider()
|
||||
ui->fmsModePos5,
|
||||
ui->fmsModePos6
|
||||
};
|
||||
QWidget *pidbanks[] = {
|
||||
QWidget *pidBanks[] = {
|
||||
ui->pidBankSs1_0,
|
||||
ui->pidBankSs1_1,
|
||||
ui->pidBankSs1_2,
|
||||
@ -1815,7 +1815,7 @@ void ConfigInputWidget::updatePositionSlider()
|
||||
ui->pidBankSs1_4,
|
||||
ui->pidBankSs1_5
|
||||
};
|
||||
QWidget *assisstecontrols[] = {
|
||||
QWidget *assistControls[] = {
|
||||
ui->assistControlPos1,
|
||||
ui->assistControlPos2,
|
||||
ui->assistControlPos3,
|
||||
@ -1827,9 +1827,9 @@ void ConfigInputWidget::updatePositionSlider()
|
||||
for (quint32 i = 0; i < FlightModeSettings::FLIGHTMODEPOSITION_NUMELEM; i++) {
|
||||
bool enabled = i < manualSettingsDataPriv.FlightModeNumber;
|
||||
|
||||
fmodes[i]->setEnabled(enabled);
|
||||
pidbanks[i]->setEnabled(enabled);
|
||||
assisstecontrols[i]->setEnabled(enabled);
|
||||
fmsModes[i]->setEnabled(enabled);
|
||||
pidBanks[i]->setEnabled(enabled);
|
||||
assistControls[i]->setEnabled(enabled);
|
||||
setComboBoxItemEnabled(ui->failsafeFlightMode, i, enabled);
|
||||
setComboBoxItemEnabled(ui->failsafeBatteryCriticalFlightMode, i, enabled);
|
||||
setComboBoxItemEnabled(ui->failsafeBatteryWarningFlightMode, i, enabled);
|
||||
@ -2141,7 +2141,7 @@ void ConfigInputWidget::updateReceiverActivityStatus()
|
||||
|
||||
void ConfigInputWidget::failsafeBatteryWarningFlightModeChanged(int index)
|
||||
{
|
||||
hwSettingsData = hwSettingsObj->getData();
|
||||
HwSettings::DataFields hwSettingsData = hwSettingsObj->getData();
|
||||
bool batteryModuleEnabled = (hwSettingsData.OptionalModules[HwSettings::OPTIONALMODULES_BATTERY] == HwSettings::OPTIONALMODULES_ENABLED);
|
||||
|
||||
ui->failsafeBatteryWarningFlightMode->setEnabled(batteryModuleEnabled && index != -1);
|
||||
@ -2150,7 +2150,7 @@ void ConfigInputWidget::failsafeBatteryWarningFlightModeChanged(int index)
|
||||
|
||||
void ConfigInputWidget::failsafeBatteryCriticalFlightModeChanged(int index)
|
||||
{
|
||||
hwSettingsData = hwSettingsObj->getData();
|
||||
HwSettings::DataFields hwSettingsData = hwSettingsObj->getData();
|
||||
bool batteryModuleEnabled = (hwSettingsData.OptionalModules[HwSettings::OPTIONALMODULES_BATTERY] == HwSettings::OPTIONALMODULES_ENABLED);
|
||||
|
||||
ui->failsafeBatteryCriticalFlightMode->setEnabled(batteryModuleEnabled && index != -1);
|
||||
@ -2182,7 +2182,7 @@ void ConfigInputWidget::enableControlsChanged(bool enabled)
|
||||
{
|
||||
ui->failsafeFlightMode->setEnabled(enabled && ui->failsafeFlightMode->currentIndex() != -1);
|
||||
|
||||
hwSettingsData = hwSettingsObj->getData();
|
||||
HwSettings::DataFields hwSettingsData = hwSettingsObj->getData();
|
||||
bool batteryModuleEnabled = (hwSettingsData.OptionalModules[HwSettings::OPTIONALMODULES_BATTERY] == HwSettings::OPTIONALMODULES_ENABLED);
|
||||
ui->failsafeBatteryWarningFlightMode->setEnabled(batteryModuleEnabled && enabled && ui->failsafeBatteryWarningFlightMode->currentIndex() != -1);
|
||||
ui->failsafeBatteryCriticalFlightMode->setEnabled(batteryModuleEnabled && enabled && ui->failsafeBatteryCriticalFlightMode->currentIndex() != -1);
|
||||
|
@ -146,7 +146,6 @@ private:
|
||||
SystemSettings::DataFields systemSettingsData;
|
||||
|
||||
HwSettings *hwSettingsObj;
|
||||
HwSettings::DataFields hwSettingsData;
|
||||
|
||||
typedef struct {
|
||||
ManualControlSettings::DataFields manualSettingsData;
|
||||
|
Loading…
x
Reference in New Issue
Block a user