1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 00:05:17 +03:00

Model Setup reworked again!

This commit is contained in:
Bertrand Songis 2013-12-22 17:01:41 +01:00
parent 5b7654e475
commit e16500de9e
22 changed files with 1281 additions and 4449 deletions

View file

@ -424,7 +424,6 @@ class GeneralSettings {
int timezone;
bool optrexDisplay;
unsigned int inactivityTimer;
bool throttleReversed;
bool minuteBeep;
bool preBeep;
bool flashBeep;
@ -871,7 +870,6 @@ enum Capability {
Mixes,
MixesWithoutExpo,
Timers,
TimerTriggerB,
TimeDivisions,
minuteBeep,
countdownBeep,
@ -881,7 +879,6 @@ enum Capability {
ModelVoice,
MultiLangVoice,
ModelImage,
InstantTrimSW,
Pots,
Switches,
SwitchesPositions,
@ -925,7 +922,6 @@ enum Capability {
TrainerSwitch,
ModelTrainerEnable,
Timer2ThrTrig,
HasTTrace,
HasExpoNames,
HasMixerNames,
HasChNames,
@ -935,14 +931,11 @@ enum Capability {
HasPPMStart,
HasGeneralUnits,
HasFAIMode,
NoTimerDirs,
NoThrExpo,
OptrexDisplay,
PPMExtCtrl,
PPMFrameLength,
MixFmTrim,
gsSwitchMask,
pmSwitchMask,
BLonStickMove,
DSM2Indexes,
Telemetry,
@ -986,8 +979,6 @@ enum Capability {
HasBrightness,
HasContrast,
PerModelTimers,
PerModelThrottleWarning,
PerModelThrottleInvert,
SlowScale,
SlowRange,
PermTimers,

View file

@ -133,7 +133,6 @@ t_Er9xGeneral::t_Er9xGeneral(GeneralSettings &c9x)
disableAlarmWarning = c9x.disableAlarmWarning;
stickMode = c9x.stickMode;
inactivityTimer = c9x.inactivityTimer - 10;
throttleReversed = c9x.throttleReversed;
minuteBeep = c9x.minuteBeep;
preBeep = c9x.preBeep;
flashBeep = c9x.flashBeep;
@ -207,7 +206,6 @@ Er9xGeneral::operator GeneralSettings ()
result.disableAlarmWarning = disableAlarmWarning;
result.stickMode = std::max((uint8_t)0, std::min(stickMode, (uint8_t)3));
result.inactivityTimer = inactivityTimer + 10;
result.throttleReversed = throttleReversed;
result.minuteBeep = minuteBeep;
result.preBeep = preBeep;
result.flashBeep = flashBeep;

View file

@ -304,8 +304,6 @@ int Er9xInterface::getCapability(const Capability capability)
return TM_HASTELEMETRY|TM_HASWSHH;
case TelemetryUnits:
return 1;
case TimerTriggerB:
return 1;
case TelemetryMaxMultiplier:
return 2;
case MaxVolume:
@ -323,7 +321,6 @@ int Er9xInterface::getCapability(const Capability capability)
case HasStickScroll:
case HasAltitudeSel:
case HasContrast:
case InstantTrimSW:
case HasVolume:
case HasBlInvert:
case ModelVoice:

View file

@ -164,7 +164,6 @@ t_Ersky9xGeneral::t_Ersky9xGeneral(GeneralSettings &c9x)
disableAlarmWarning = c9x.disableAlarmWarning;
stickMode = c9x.stickMode;
inactivityTimer = c9x.inactivityTimer - 10;
throttleReversed = c9x.throttleReversed;
minuteBeep = c9x.minuteBeep;
preBeep = c9x.preBeep;
flashBeep = c9x.flashBeep;
@ -237,7 +236,6 @@ Ersky9xGeneral::operator GeneralSettings ()
result.disableAlarmWarning = disableAlarmWarning;
result.stickMode = std::max((uint8_t)0, std::min(stickMode, (uint8_t)3));
result.inactivityTimer = inactivityTimer + 10;
result.throttleReversed = throttleReversed;
result.minuteBeep = minuteBeep;
result.preBeep = preBeep;
result.flashBeep = flashBeep;

View file

@ -338,8 +338,6 @@ int Ersky9xInterface::getCapability(const Capability capability)
return 1;
case OptrexDisplay:
return 1;
case TimerTriggerB:
return 2;
case HasAltitudeSel:
case HasCurrentCalibration:
case HasVolume:
@ -354,8 +352,6 @@ int Ersky9xInterface::getCapability(const Capability capability)
case GvarsAsSources:
case GvarsAsWeight:
return 1;
case InstantTrimSW:
return 1;
case TelemetryMaxMultiplier:
return 2;
case LCDWidth:

View file

@ -134,7 +134,6 @@ Gruvin9xGeneral_v103::operator GeneralSettings ()
result.disableAlarmWarning = disableAlarmWarning;
result.stickMode = stickMode;
result.inactivityTimer = inactivityTimer;
result.throttleReversed = throttleReversed;
result.minuteBeep = minuteBeep;
result.preBeep = preBeep;
result.flashBeep = flashBeep;
@ -188,7 +187,6 @@ t_Gruvin9xGeneral_v104::t_Gruvin9xGeneral_v104(GeneralSettings &c9x)
disableAlarmWarning = c9x.disableAlarmWarning;
stickMode = c9x.stickMode;
inactivityTimer = c9x.inactivityTimer;
throttleReversed = c9x.throttleReversed;
minuteBeep = c9x.minuteBeep;
preBeep = c9x.preBeep;
flashBeep = c9x.flashBeep;
@ -234,7 +232,6 @@ Gruvin9xGeneral_v104::operator GeneralSettings ()
result.disableAlarmWarning = disableAlarmWarning;
result.stickMode = stickMode;
result.inactivityTimer = inactivityTimer;
result.throttleReversed = throttleReversed;
result.minuteBeep = minuteBeep;
result.preBeep = preBeep;
result.flashBeep = flashBeep;

View file

@ -1866,8 +1866,9 @@ Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardE
internalField.Append(new UnsignedField<8>(generalData.inactivityTimer));
if (IS_STOCK(board) && version >= 215) {
internalField.Append(new UnsignedField<3>(generalData.mavbaud));
} else {
internalField.Append(new BoolField<1>(generalData.throttleReversed));
}
else {
internalField.Append(new SpareBitsField<1>());
internalField.Append(new BoolField<1>(generalData.minuteBeep));
internalField.Append(new BoolField<1>(generalData.preBeep));
}

View file

@ -684,8 +684,6 @@ int Open9xInterface::getCapability(const Capability capability)
return 1;
case FSSwitch:
return 1;
case HasTTrace:
return 1;
case CustomCurves:
return 1;
case MixesWithoutExpo:
@ -700,10 +698,6 @@ int Open9xInterface::getCapability(const Capability capability)
return (IS_TARANIS(board) ? 6 : 0);
case HasCvNames:
return (IS_TARANIS(board) ? 1 : 0);
case NoTimerDirs:
return 1;
case NoThrExpo:
return 1;
case Telemetry:
return TM_HASTELEMETRY|TM_HASOFFSET|TM_HASWSHH;
case TelemetryBars:
@ -770,10 +764,6 @@ int Open9xInterface::getCapability(const Capability capability)
case HasBrightness:
return (IS_ARM(board) ? true : false);
case PerModelTimers:
case PerModelThrottleWarning:
case PerModelThrottleInvert:
return 1;
case pmSwitchMask:
return 1;
case SlowScale:
return (IS_ARM(board) ? 10 : 2);
@ -817,12 +807,15 @@ int Open9xInterface::isAvailable(Protocol proto, int port)
case PXX_XJT_D8:
case PXX_XJT_LR12:
case PXX_DJT:
case LP45:
case DSM2:
case DSMX:
return 1;
default:
return 0;
}
break;
case 2:
case -1:
switch (proto) {
case PPM:
return 1;

View file

@ -101,7 +101,6 @@ t_Th9xGeneral::t_Th9xGeneral(GeneralSettings &c9x)
trainer = c9x.trainer;
adcFilt = c9x.filterInput;
// keySpeed
thr0pos = c9x.throttleReversed;
disableThrottleWarning = c9x.disableThrottleWarning;
disableSwitchWarning = (c9x.switchWarning != -1);
disableMemoryWarning = c9x.disableMemoryWarning;
@ -158,7 +157,6 @@ Th9xGeneral::operator GeneralSettings ()
}
result.stickMode = stickMode;
result.inactivityTimer = inactivityMin;
result.throttleReversed = thr0pos;
result.filterInput = adcFilt;
return result;
}

View file

@ -174,18 +174,6 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
ui->PPMSimLB->hide();
ui->PPMSimChkB->hide();
}
if (GetEepromInterface()->getCapability(PerModelThrottleWarning)) {
ui->thrwarnChkB->setDisabled(true);
ui->thrwarnChkB->hide();
ui->thrwarnLabel->hide();
}
if (GetEepromInterface()->getCapability(pmSwitchMask)) {
ui->swwarn_label->hide();
ui->swtchWarnCB->hide();
ui->swtchWarnChkB->hide();
layout()->removeItem(ui->swwarn_layout);
}
if (!GetEepromInterface()->getCapability( HasPxxCountry)) {
ui->countrycode_label->hide();
ui->countrycode_CB->hide();
@ -322,11 +310,8 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
ui->swID0ChkB->hide();
ui->swID1ChkB->hide();
ui->swID2ChkB->hide();
ui->swtchWarnChkB->hide();
this->layout()->removeItem(ui->switchMaskLayout);
} else {
ui->swtchWarnCB->setDisabled(true);
ui->swtchWarnCB->hide();
setSwitchDefPos();
}
if (!GetEepromInterface()->getCapability(TelemetryAlarm)) {
@ -340,12 +325,6 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
} else {
populateRotEncCB(ui->re_CB, g_eeGeneral.reNavigation, renumber);
}
if (GetEepromInterface()->getCapability(PerModelThrottleInvert)) {
ui->label_thrrev->hide();
ui->thrrevChkB->hide();
} else {
ui->thrrevChkB->setChecked(g_eeGeneral.throttleReversed);
}
ui->telalarmsChkB->setChecked(g_eeGeneral.enableTelemetryAlarm);
ui->PotScrollEnableChkB->setChecked(!g_eeGeneral.disablePotScroll);
ui->BandGapEnableChkB->setChecked(!g_eeGeneral.disableBG);
@ -359,9 +338,6 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
ui->StickScrollChkB->setChecked(g_eeGeneral.stickScroll);
ui->PPMSimChkB->setChecked(g_eeGeneral.enablePpmsim);
ui->inputfilterCB->setCurrentIndex(g_eeGeneral.filterInput);
ui->thrwarnChkB->setChecked(!g_eeGeneral.disableThrottleWarning); //Default is zero=checked
ui->swtchWarnChkB->setChecked(g_eeGeneral.switchWarning == -1);
ui->swtchWarnCB->setCurrentIndex(g_eeGeneral.switchWarning == -1 ? 2 : g_eeGeneral.switchWarning);
ui->memwarnChkB->setChecked(!g_eeGeneral.disableMemoryWarning); //Default is zero=checked
ui->alarmwarnChkB->setChecked(!g_eeGeneral.disableAlarmWarning);//Default is zero=checked
ui->enableTelemetryAlarmChkB->setChecked(g_eeGeneral.enableTelemetryAlarm);
@ -622,36 +598,12 @@ void GeneralEdit::on_inactimerSB_editingFinished()
updateSettings();
}
void GeneralEdit::on_thrrevChkB_stateChanged(int )
{
g_eeGeneral.throttleReversed = ui->thrrevChkB->isChecked() ? 1 : 0;
updateSettings();
}
void GeneralEdit::on_inputfilterCB_currentIndexChanged(int index)
{
g_eeGeneral.filterInput = index;
updateSettings();
}
void GeneralEdit::on_thrwarnChkB_stateChanged(int )
{
g_eeGeneral.disableThrottleWarning = ui->thrwarnChkB->isChecked() ? 0 : 1;
updateSettings();
}
void GeneralEdit::on_swtchWarnCB_currentIndexChanged(int index)
{
g_eeGeneral.switchWarning = (index == 2 ? -1 : index);
updateSettings();
}
void GeneralEdit::on_swtchWarnChkB_stateChanged(int )
{
g_eeGeneral.switchWarning = ui->swtchWarnChkB->isChecked() ? -1 : 0;
updateSettings();
}
void GeneralEdit::on_memwarnChkB_stateChanged(int )
{
g_eeGeneral.disableMemoryWarning = ui->memwarnChkB->isChecked() ? 0 : 1;

View file

@ -123,12 +123,8 @@ private slots:
void on_channelorderCB_currentIndexChanged(int index);
void on_beeperCB_currentIndexChanged(int index);
void on_memwarnChkB_stateChanged(int );
void on_swtchWarnCB_currentIndexChanged(int index);
void on_swtchWarnChkB_stateChanged(int );
void on_telalarmsChkB_stateChanged(int );
void on_thrwarnChkB_stateChanged(int );
void on_inputfilterCB_currentIndexChanged(int index);
void on_thrrevChkB_stateChanged(int );
void on_inactimerSB_editingFinished();
void on_backlightautoSB_editingFinished();
void on_backlightswCB_currentIndexChanged(int index);

View file

@ -117,6 +117,13 @@ These will be relevant for all models in the same EEPROM.</string>
<string>Setup</string>
</attribute>
<layout class="QGridLayout" name="gridLayout" columnstretch="1,0,0,0,0">
<item row="19" column="4">
<widget class="QCheckBox" name="PPMSimChkB">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="volume_SB">
<property name="sizePolicy">
@ -130,7 +137,7 @@ These will be relevant for all models in the same EEPROM.</string>
</property>
</widget>
</item>
<item row="29" column="3" colspan="2">
<item row="28" column="3" colspan="2">
<layout class="QHBoxLayout" name="pxxCountry">
<item>
<widget class="QLabel" name="countrycode_label">
@ -160,13 +167,6 @@ These will be relevant for all models in the same EEPROM.</string>
</item>
</layout>
</item>
<item row="19" column="4">
<widget class="QCheckBox" name="PPMSimChkB">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="24" column="0">
<widget class="QLabel" name="mavbaud_label">
<property name="text">
@ -174,7 +174,7 @@ These will be relevant for all models in the same EEPROM.</string>
</property>
</widget>
</item>
<item row="30" column="3" colspan="2">
<item row="29" column="3" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="VoiceLang_label">
@ -188,49 +188,7 @@ These will be relevant for all models in the same EEPROM.</string>
</item>
</layout>
</item>
<item row="25" column="1">
<layout class="QHBoxLayout" name="swwarn_layout">
<item>
<widget class="QComboBox" name="swtchWarnCB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>Switches Up</string>
</property>
</item>
<item>
<property name="text">
<string>Switches Down</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QCheckBox" name="swtchWarnChkB">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item row="30" column="0">
<item row="29" column="0">
<widget class="QLabel" name="units_label">
<property name="text">
<string>Measurement Units</string>
@ -476,13 +434,6 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="19" column="0">
<widget class="QLabel" name="label_thrrev">
<property name="text">
<string>Reverse Throttle Operation</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLabel" name="label_HL">
<property name="text">
@ -490,7 +441,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="32" column="1">
<item row="31" column="1">
<widget class="QComboBox" name="stickmodeCB">
<property name="toolTip">
<string/>
@ -551,26 +502,40 @@ Mode 4:
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_12">
<item row="18" column="4">
<widget class="QCheckBox" name="crosstrimChkB">
<property name="text">
<string>Beeper Mode</string>
<string/>
</property>
</widget>
</item>
<item row="13" column="4">
<widget class="QSpinBox" name="blOnStickMoveSB">
<property name="suffix">
<string> sec</string>
<item row="12" column="0">
<widget class="QLabel" name="label_displayType">
<property name="text">
<string>LCD Display Type</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="hapticStrengthSB">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>600</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
<item row="13" column="3">
<widget class="QLabel" name="label_blOnStickMove">
<property name="text">
<string>BackLight On Stick Move</string>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QSpinBox" name="speakerPitchSB">
<property name="toolTip">
@ -598,23 +563,37 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="19" column="1">
<widget class="QCheckBox" name="thrrevChkB">
<property name="whatsThis">
<string>Reverse throttle operation.
If this is checked the throttle will be reversed. Idle will be forward, trim will also be reversed and the throttle warning will be reversed as well.
</string>
<item row="13" column="4">
<widget class="QSpinBox" name="blOnStickMoveSB">
<property name="suffix">
<string> sec</string>
</property>
<property name="text">
<string/>
<property name="maximum">
<number>600</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
<item row="13" column="3">
<widget class="QLabel" name="label_blOnStickMove">
<item row="1" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>BackLight On Stick Move</string>
<string>Beeper Mode</string>
</property>
</widget>
</item>
<item row="30" column="0">
<widget class="QLabel" name="label_timezone">
<property name="text">
<string>Timeshift from UTC</string>
</property>
</widget>
</item>
<item row="17" column="3">
<widget class="QLabel" name="re_label">
<property name="text">
<string>RotEnc Navigation</string>
</property>
</widget>
</item>
@ -637,47 +616,6 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi
</property>
</widget>
</item>
<item row="17" column="3">
<widget class="QLabel" name="re_label">
<property name="text">
<string>RotEnc Navigation</string>
</property>
</widget>
</item>
<item row="31" column="0">
<widget class="QLabel" name="label_timezone">
<property name="text">
<string>Timeshift from UTC</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="hapticStrengthSB">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>5</number>
</property>
</widget>
</item>
<item row="18" column="4">
<widget class="QCheckBox" name="crosstrimChkB">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="label_displayType">
<property name="text">
<string>LCD Display Type</string>
</property>
</widget>
</item>
<item row="22" column="0">
<widget class="QLabel" name="label_frskyintalarm">
<property name="text">
@ -685,14 +623,7 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi
</property>
</widget>
</item>
<item row="21" column="0">
<widget class="QLabel" name="thrwarnLabel">
<property name="text">
<string>Throttle Startup Warning</string>
</property>
</widget>
</item>
<item row="26" column="0" colspan="5">
<item row="25" column="0" colspan="5">
<layout class="QHBoxLayout" name="switchMaskLayout">
<item>
<widget class="QCheckBox" name="swTHRChkB">
@ -775,7 +706,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="31" column="3" colspan="2">
<item row="30" column="3" colspan="2">
<layout class="QHBoxLayout" name="gpsFormatLayout">
<item>
<widget class="QLabel" name="gpsFormatLabel">
@ -800,7 +731,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="29" column="1">
<item row="28" column="1">
<widget class="QCheckBox" name="faimode_CB">
<property name="toolTip">
<string>If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio.</string>
@ -810,7 +741,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="32" column="4">
<item row="31" column="4">
<widget class="QComboBox" name="channelorderCB">
<property name="toolTip">
<string/>
@ -948,48 +879,6 @@ This is used by the templated to determine which channel goes to what number out
</item>
</widget>
</item>
<item row="20" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
<string>Alarm Warning</string>
</property>
</widget>
</item>
<item row="20" column="1">
<widget class="QCheckBox" name="alarmwarnChkB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;Warnings&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These will define startup warnings.&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Throttle warning - will alert if the throttle is not at idle during startup&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Switch warning - will alert if switches are not in their defaul position&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Memory warning - will alert if there's not a lot of memory left&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Silent mode warning - will alert you if the beeper is set to quiet (0)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="16" column="3">
<widget class="QLabel" name="label_hideOwnerName">
<property name="text">
@ -1046,7 +935,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="29" column="0">
<item row="28" column="0">
<widget class="QLabel" name="label_faimode">
<property name="text">
<string>FAI Mode</string>
@ -1163,7 +1052,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="31" column="1">
<item row="30" column="1">
<widget class="QSpinBox" name="timezoneSB">
<property name="minimum">
<number>-14</number>
@ -1176,7 +1065,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="30" column="1">
<item row="29" column="1">
<widget class="QComboBox" name="units_CB">
<item>
<property name="text">
@ -1190,7 +1079,7 @@ p, li { white-space: pre-wrap; }
</item>
</widget>
</item>
<item row="32" column="3">
<item row="31" column="3">
<widget class="QLabel" name="label_13">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
@ -1203,7 +1092,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="32" column="0">
<item row="31" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Stick Mode</string>
@ -1247,41 +1136,6 @@ p, li { white-space: pre-wrap; }
</property>
</spacer>
</item>
<item row="20" column="4">
<widget class="QCheckBox" name="memwarnChkB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;Warnings&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These will define startup warnings.&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Throttle warning - will alert if the throttle is not at idle during startup&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Switch warning - will alert if switches are not in their defaul position&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Memory warning - will alert if there's not a lot of memory left&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Silent mode warning - will alert you if the beeper is set to quiet (0)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QComboBox" name="displayTypeCB">
<item>
@ -1345,13 +1199,6 @@ p, li { white-space: pre-wrap; }
</item>
</widget>
</item>
<item row="20" column="3">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Memory Startup Warning</string>
</property>
</widget>
</item>
<item row="11" column="4">
<widget class="QSpinBox" name="BLBright_SB">
<property name="maximum">
@ -1532,32 +1379,6 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="21" column="1">
<widget class="QCheckBox" name="thrwarnChkB">
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;Warnings&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These will define startup warnings.&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Throttle warning - will alert if the throttle is not at idle during startup&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Switch warning - will alert if switches are not in their defaul position&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Memory warning - will alert if there's not a lot of memory left&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Silent mode warning - will alert you if the beeper is set to quiet (0)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="tristate">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_soundMode">
<property name="text">
@ -1565,7 +1386,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="33" column="0" colspan="2">
<item row="32" column="0" colspan="2">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -1684,7 +1505,7 @@ Acceptable values are 5v..10v</string>
</property>
</widget>
</item>
<item row="27" column="0">
<item row="26" column="0">
<widget class="QLabel" name="ro_label">
<property name="text">
<string>Readonly Unlock</string>
@ -1726,13 +1547,6 @@ Acceptable values are 5v..10v</string>
</property>
</widget>
</item>
<item row="25" column="0">
<widget class="QLabel" name="swwarn_label">
<property name="text">
<string>Switch Startup Warning</string>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
@ -1740,7 +1554,7 @@ Acceptable values are 5v..10v</string>
</property>
</widget>
</item>
<item row="27" column="1" colspan="3">
<item row="26" column="1" colspan="3">
<layout class="QGridLayout" name="TaranisReadOnlyUnlock" rowstretch="0,0" columnstretch="0,0,0,0,0,0,0,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
@ -2268,6 +2082,90 @@ Acceptable values are 5v..10v</string>
</item>
</layout>
</item>
<item row="19" column="1">
<widget class="QCheckBox" name="alarmwarnChkB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;Warnings&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These will define startup warnings.&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Throttle warning - will alert if the throttle is not at idle during startup&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Switch warning - will alert if switches are not in their defaul position&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Memory warning - will alert if there's not a lot of memory left&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Silent mode warning - will alert you if the beeper is set to quiet (0)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="19" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
<string>Alarm Warning</string>
</property>
</widget>
</item>
<item row="21" column="1">
<widget class="QCheckBox" name="memwarnChkB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;Warnings&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These will define startup warnings.&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Throttle warning - will alert if the throttle is not at idle during startup&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Switch warning - will alert if switches are not in their defaul position&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Memory warning - will alert if there's not a lot of memory left&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Silent mode warning - will alert you if the beeper is set to quiet (0)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="21" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Memory Startup Warning</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabTrainer">
@ -3607,8 +3505,6 @@ p, li { white-space: pre-wrap; }
<tabstop>beepMinuteChkB</tabstop>
<tabstop>beepCountDownChkB</tabstop>
<tabstop>beepFlashChkB</tabstop>
<tabstop>swtchWarnCB</tabstop>
<tabstop>swtchWarnChkB</tabstop>
<tabstop>swTHRChkB</tabstop>
<tabstop>swRUDChkB</tabstop>
<tabstop>swELEChkB</tabstop>

View file

@ -567,63 +567,22 @@ void populateGvarUseCB(QComboBox *b, unsigned int phase)
}
}
void populateTimerSwitchCB(QComboBox *b, int value, int extrafields)
void populateTimerSwitchCB(QComboBox *b, int value)
{
b->clear();
uint8_t endvalue=128;
uint8_t count=0;
if (extrafields==2)
endvalue=192;
for (int i=-128; i<endvalue; i++) {
for (int i=-128; i<128; i++) {
QString timerMode = getTimerMode(i);
if (!timerMode.isEmpty()) {
b->addItem(getTimerMode(i), i);
if (i==value)
b->setCurrentIndex(b->count()-1);
if (extrafields==2 && (i<0 || (i>3 && i <TMRMODE_FIRST_CHPERC))) {
QModelIndex index = b->model()->index(count, 0);
// This is the effective 'disable' flag
QVariant v(0);
//the magic
b->model()->setData(index, v, Qt::UserRole - 1);
}
count++;
}
}
b->setMaxVisibleItems(10);
}
void populateTimerSwitchBCB(QComboBox *b, int value, int extrafields)
{
b->clear();
if (extrafields!=2) {
int startvalue=-128;
int endvalue=128;
if (extrafields==1) {
startvalue=-25;
endvalue=26;
}
for (int i=startvalue; i<endvalue; i++) {
QString timerMode = getTimerMode(i);
if (!timerMode.isEmpty()) {
b->addItem(getTimerMode(i), i);
if (i==value)
b->setCurrentIndex(b->count()-1);
}
}
} else {
for (int i=-33; i<66; i++) {
QString timerMode = getTimerModeB(i);
if (!timerMode.isEmpty()) {
b->addItem(timerMode, i);
if (i==value)
b->setCurrentIndex(b->count()-1);
}
}
}
b->setMaxVisibleItems(10);
}
QString getTimerMode(int tm) {
QString stt = "OFFABSTHsTH%THt";

View file

@ -45,8 +45,7 @@ void populateGvarUseCB(QComboBox *b, unsigned int phase);
void populateCurvesCB(QComboBox *b, int value);
void populateCustomScreenFieldCB(QComboBox *b, unsigned int value, bool last, int hubproto);
void populateExpoCurvesCB(QComboBox *b, int value);
void populateTimerSwitchCB(QComboBox *b, int value, int extrafields=0);
void populateTimerSwitchBCB(QComboBox *b, int value, int extrafields=0);
void populateTimerSwitchCB(QComboBox *b, int value);
QString getCustomSwitchStr(CustomSwData * customSw, const ModelData & model);
QString getProtocolStr(const int proto);

View file

@ -38,6 +38,8 @@ set(modeledit_HDRS
)
set(modeledit_UIS
setup_timer.ui
setup_module.ui
flightmode.ui
telemetry_analog.ui
)

View file

@ -191,7 +191,7 @@ void FlightMode::update()
trimsSlider[i]->setRange(-trimsMax, +trimsMax);
trimsValue[i]->setRange(-trimsMax, +trimsMax);
int chn = CONVERT_MODE(i+1)-1;
if (chn == 2/*TODO constant*/ && generalSettings.throttleReversed)
if (chn == 2/*TODO constant*/ && model.throttleReversed)
trimsSlider[i]->setInvertedAppearance(true);
trimUpdate(i);

File diff suppressed because it is too large Load diff

View file

@ -5,11 +5,65 @@
#include <QVector>
#include <QCheckBox>
#include <QSlider>
#include <QSpinBox>
namespace Ui {
class Setup;
class Timer;
class Module;
}
class TimerPanel : public ModelPanel
{
Q_OBJECT
public:
TimerPanel(QWidget *parent, ModelData & model, TimerData & timer);
virtual ~TimerPanel();
virtual void update();
private slots:
void on_mode_currentIndexChanged(int index);
void on_value_editingFinished();
void on_persistent_toggled(bool checked);
void on_minuteBeep_toggled(bool checked);
void on_countdownBeep_toggled(bool checked);
private:
TimerData & timer;
Ui::Timer *ui;
};
class ModulePanel : public ModelPanel
{
Q_OBJECT
public:
ModulePanel(QWidget *parent, ModelData & model, ModuleData & module, int moduleIdx);
virtual ~ModulePanel();
virtual void update();
private slots:
void on_protocol_currentIndexChanged(int index);
void on_ppmDelay_editingFinished();
void on_channelsCount_editingFinished();
void on_channelsStart_editingFinished();
void on_ppmPolarity_currentIndexChanged(int index);
void on_ppmFrameLength_editingFinished();
void on_rxNumber_editingFinished();
void on_failsafeMode_currentIndexChanged(int value);
void onFailsafeChannelChanged(int value);
private:
ModuleData & module;
int moduleIdx;
Ui::Module *ui;
QVector<QSpinBox *> failsafeSpins;
QVector<QSlider *> failsafeSliders;
};
class Setup : public ModelPanel
{
Q_OBJECT
@ -21,72 +75,25 @@ class Setup : public ModelPanel
virtual void update();
private slots:
void on_protocolCB_currentIndexChanged(int index);
void on_protocolCB_2_currentIndexChanged(int index);
void on_protocolCB_3_currentIndexChanged(int index);
void on_fsm1CB_currentIndexChanged(int index);
void on_fsm2CB_currentIndexChanged(int index);
void on_modelVoice_SB_editingFinished();
void on_T2ThrTrgChkB_toggled(bool checked);
void on_ttraceCB_currentIndexChanged(int index);
void on_instantTrim_CB_currentIndexChanged(int index);
void on_thrExpoChkB_toggled(bool checked);
void on_thrTrimChkB_toggled(bool checked);
void on_extendedLimitsChkB_toggled(bool checked);
void on_extendedTrimsChkB_toggled(bool checked);
void on_thrwarnChkB_toggled(bool checked);
void on_thrrevChkB_toggled(bool checked);
void on_timer1Perm_toggled(bool checked);
void on_timer2Perm_toggled(bool checked);
void on_timer1Minute_toggled(bool checked);
void on_timer2Minute_toggled(bool checked);
void on_timer1CountDownBeep_toggled(bool checked);
void on_timer2CountDownBeep_toggled(bool checked);
void fssldEdited();
void fssbEdited();
void fssldValueChanged();
void fssbValueChanged();
void on_ppmDelaySB_editingFinished();
void on_ppmDelaySB_2_editingFinished();
void on_ppmDelaySB_3_editingFinished();
void on_numChannelsSB_editingFinished();
void on_numChannelsSB_2_editingFinished();
void on_numChannelsSB_3_editingFinished();
void on_numChannelsStart_editingFinished();
void on_numChannelsStart_2_editingFinished();
void on_numChannelsStart_3_editingFinished();
// void void ModelEdit::on_numChannelsStart_3_editingFinished();
void on_pulsePolCB_currentIndexChanged(int index);
void on_pulsePolCB_2_currentIndexChanged(int index);
void on_pulsePolCB_3_currentIndexChanged(int index);
void on_ppmFrameLengthDSB_editingFinished();
void on_ppmFrameLengthDSB_2_editingFinished();
void on_ppmFrameLengthDSB_3_editingFinished();
void on_DSM_Type_currentIndexChanged(int index);
void on_DSM_Type_2_currentIndexChanged(int index);
void on_pxxRxNum_editingFinished();
void on_pxxRxNum_2_editingFinished();
// TODO void on_trimSWCB_currentIndexChanged(int index);
void on_trimIncCB_currentIndexChanged(int index);
void on_timer1DirCB_currentIndexChanged(int index);
void on_timer1ModeCB_currentIndexChanged(int index);
void on_timer1ValTE_editingFinished();
void on_timer1ModeBCB_currentIndexChanged(int index);
void on_timer2DirCB_currentIndexChanged(int index);
void on_timer2ModeCB_currentIndexChanged(int index);
void on_timer2ValTE_editingFinished();
void on_timer2ModeBCB_currentIndexChanged(int index);
void on_modelNameLE_editingFinished();
void on_modelImage_CB_currentIndexChanged(int index);
void on_name_editingFinished();
void on_throttleSource_currentIndexChanged(int index);
void on_throttleTrim_toggled(bool checked);
void on_extendedLimits_toggled(bool checked);
void on_extendedTrims_toggled(bool checked);
void on_throttleWarning_toggled(bool checked);
void on_throttleReverse_toggled(bool checked);
void on_image_currentIndexChanged(int index);
void on_trimIncrement_currentIndexChanged(int index);
void onBeepCenterToggled(bool checked);
void startupSwitchEdited(int value);
void onChildModified();
private:
Ui::Setup *ui;
QVector<QSlider *> startupSwitchesSliders;
QVector<QCheckBox *> centerBeepCheckboxes;
void tabModelEditSetup();
ModulePanel * modules[C9X_NUM_MODULES+1];
TimerPanel * timers[C9X_MAX_TIMERS];
void updateStartupSwitches();
void updateBeepCenter();
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,343 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Module</class>
<widget class="QWidget" name="Module">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>562</width>
<height>340</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="moduleGB">
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_69" rowstretch="0,0,0,0,0,0,0,0" columnstretch="0,0,0,0,0,0,0">
<item row="5" column="0">
<widget class="QLabel" name="label_failsafeMode">
<property name="text">
<string>Failsafe Mode</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="protocol"/>
</item>
<item row="3" column="4">
<widget class="QLabel" name="label_ppmDelay">
<property name="text">
<string>PPM delay</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="5">
<widget class="QSpinBox" name="ppmDelay">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="suffix">
<string> usec</string>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>800</number>
</property>
<property name="singleStep">
<number>50</number>
</property>
<property name="value">
<number>300</number>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QComboBox" name="ppmPolarity">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Negative</string>
</property>
</item>
<item>
<property name="text">
<string>Positive</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_rxNumber">
<property name="text">
<string>RX Number</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="trainerMode">
<item>
<property name="text">
<string>Master</string>
</property>
</item>
<item>
<property name="text">
<string>Slave</string>
</property>
</item>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_ppmPolarity">
<property name="text">
<string>Polarity</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_protocol">
<property name="text">
<string>Protocol</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_trainerMode">
<property name="text">
<string>Trainer Mode</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="rxNumber">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>125</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="ppmFrameLength">
<property name="suffix">
<string> mSec</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>12.500000000000000</double>
</property>
<property name="maximum">
<double>32.500000000000000</double>
</property>
<property name="singleStep">
<double>0.500000000000000</double>
</property>
<property name="value">
<double>22.500000000000000</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_ppmFrameLength">
<property name="text">
<string>PPM Frame Length</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="0" colspan="7">
<widget class="QLabel" name="label_module">
<property name="styleSheet">
<string notr="true">font-weight: bold;</string>
</property>
<property name="text">
<string>Label</string>
</property>
</widget>
</item>
<item row="2" column="5">
<widget class="QSpinBox" name="channelsCount">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="suffix">
<string>ch</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>16</number>
</property>
<property name="singleStep">
<number>2</number>
</property>
<property name="value">
<number>8</number>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QSpinBox" name="channelsStart">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="suffix">
<string>ch</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>32</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_channelsStart">
<property name="text">
<string>Start</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QLabel" name="label_channelsCount">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Channels</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="failsafeMode">
<item>
<property name="text">
<string>Hold</string>
</property>
</item>
<item>
<property name="text">
<string>Custom</string>
</property>
</item>
<item>
<property name="text">
<string>No Pulses</string>
</property>
</item>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_failsafeFrame">
<property name="text">
<string>Failsafe Positions</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="6" column="1" colspan="5">
<widget class="QFrame" name="failsafesFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QGridLayout" name="failsafesLayout"/>
</item>
</layout>
</widget>
</item>
<item row="7" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Timer</class>
<widget class="QWidget" name="Timer">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>726</width>
<height>54</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QTimeEdit" name="value">
<property name="accelerated">
<bool>true</bool>
</property>
<property name="currentSection">
<enum>QDateTimeEdit::MinuteSection</enum>
</property>
<property name="displayFormat">
<string>mm:ss</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="mode"/>
</item>
<item>
<widget class="QCheckBox" name="persistent">
<property name="text">
<string>Persistent</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="persistentValue">
<property name="text">
<string> (00:00:00)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="minuteBeep">
<property name="text">
<string>MinuteBeep</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="countdownBeep">
<property name="text">
<string>CountDownBeep</string>
</property>
</widget>
</item>
<item>
<spacer name="spacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>255</width>
<height>17</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -91,8 +91,6 @@ void saveGeneralSettings(GeneralSettings & settings, global_settings & gs)
gs.warnings(warns);
gs.beeper(settings.beeperMode);
sticks stks(settings.stickMode);
if (settings.throttleReversed)
stks.throttle_reverse(true);
gs.sticks(stks);
gs.inactivity_timer(settings.inactivityTimer);
if (settings.minuteBeep || settings.preBeep || settings.flashBeep) {