Preliminary T18 support (#7581)

This commit is contained in:
3djc
2020-06-22 21:15:47 +02:00
committed by GitHub
parent 02b61fff24
commit 2d01916055
76 changed files with 952 additions and 426 deletions
+2
View File
@@ -351,6 +351,8 @@ elseif(PCB STREQUAL X10 AND PCBREV STREQUAL T16)
set(FLAVOUR t16)
elseif(PCB STREQUAL X10 AND PCBREV STREQUAL TX16S)
set(FLAVOUR tx16s)
elseif(PCB STREQUAL X10 AND PCBREV STREQUAL T18)
set(FLAVOUR t18)
else()
string(TOLOWER ${PCB} FLAVOUR)
endif()
+10
View File
@@ -190,6 +190,16 @@
<file>images/simulator/JumperT16/left_tele.png</file>
<file>images/simulator/JumperT16/right_ent.png</file>
<file>images/simulator/JumperT16/right_rtn.png</file>
<file>images/simulator/JumperT18/left.png</file>
<file>images/simulator/JumperT18/right.png</file>
<file>images/simulator/JumperT18/top.png</file>
<file>images/simulator/JumperT18/bottom.png</file>
<file>images/simulator/JumperT18/left_mdl.png</file>
<file>images/simulator/JumperT18/left_page.png</file>
<file>images/simulator/JumperT18/left_sys.png</file>
<file>images/simulator/JumperT18/left_tele.png</file>
<file>images/simulator/JumperT18/right_ent.png</file>
<file>images/simulator/JumperT18/right_rtn.png</file>
<file>images/simulator/TX16S/left.png</file>
<file>images/simulator/TX16S/right.png</file>
<file>images/simulator/TX16S/top.png</file>
+6
View File
@@ -81,6 +81,8 @@ uint32_t Boards::getFourCC(Type board)
return 0x3D78746F;
case BOARD_JUMPER_T16:
return 0x3F78746F;
case BOARD_JUMPER_T18:
return 0x4078746F;
case BOARD_RADIOMASTER_TX16S:
return 0x3878746F;
case BOARD_UNKNOWN:
@@ -116,6 +118,7 @@ int Boards::getEEpromSize(Board::Type board)
case BOARD_X10:
case BOARD_X10_EXPRESS:
case BOARD_JUMPER_T16:
case BOARD_JUMPER_T18:
case BOARD_RADIOMASTER_TX16S:
return 0;
}
@@ -147,6 +150,7 @@ int Boards::getFlashSize(Type board)
case BOARD_X10:
case BOARD_X10_EXPRESS:
case BOARD_JUMPER_T16:
case BOARD_JUMPER_T18:
case BOARD_RADIOMASTER_TX16S:
return FSIZE_HORUS;
case BOARD_UNKNOWN:
@@ -507,6 +511,8 @@ QString Boards::getBoardName(Board::Type board)
return "Horus X10/X10S Express";
case BOARD_JUMPER_T16:
return "Jumper T16";
case BOARD_JUMPER_T18:
return "Jumper T18";
case BOARD_RADIOMASTER_TX16S:
return "Radiomaster TX16S";
default:
+8 -2
View File
@@ -51,9 +51,10 @@ namespace Board {
BOARD_JUMPER_T12,
BOARD_JUMPER_T16,
BOARD_RADIOMASTER_TX16S,
BOARD_JUMPER_T18,
};
constexpr int BOARD_TYPE_MAX = BOARD_RADIOMASTER_TX16S ;
constexpr int BOARD_TYPE_MAX = BOARD_JUMPER_T18;
enum PotType
{
@@ -207,6 +208,11 @@ inline bool IS_JUMPER_T16(Board::Type board)
return board == Board::BOARD_JUMPER_T16;
}
inline bool IS_JUMPER_T18(Board::Type board)
{
return board == Board::BOARD_JUMPER_T18;
}
inline bool IS_RADIOMASTER_TX16S(Board::Type board)
{
return board == Board::BOARD_RADIOMASTER_TX16S;
@@ -214,7 +220,7 @@ inline bool IS_RADIOMASTER_TX16S(Board::Type board)
inline bool IS_FAMILY_T16(Board::Type board)
{
return board == Board::BOARD_JUMPER_T16 || board == Board::BOARD_RADIOMASTER_TX16S;
return board == Board::BOARD_JUMPER_T16 || board == Board::BOARD_RADIOMASTER_TX16S || board == Board::BOARD_JUMPER_T18;
}
inline bool IS_TARANIS_XLITE(Board::Type board)
@@ -142,6 +142,7 @@ class GeneralSettings {
unsigned int countryCode;
bool jitterFilter;
bool rtcCheckDisable;
bool keysBacklight;
unsigned int imperial;
char ttsLanguage[2+1];
int beepVolume;
+1 -1
View File
@@ -26,8 +26,8 @@
#define STR_MULTI_SUBTYPE QT_TRANSLATE_NOOP("Multiprotocols", "Subtype")
#define STR_MULTI_VIDFREQ QT_TRANSLATE_NOOP("Multiprotocols", "Video TX frequency")
#define STR_MULTI_RFTUNE QT_TRANSLATE_NOOP("Multiprotocols", "CC2500 frequency fine tune")
#define STR_MULTI_RFPOWER QT_TRANSLATE_NOOP("Multiprotocols", "RF power")
#define STR_MULTI_TELEMETRY QT_TRANSLATE_NOOP("Multiprotocols", "Telemetry")
#define STR_MULTI_RFPOWER QT_TRANSLATE_NOOP("Multiprotocols", "Radio output power")
#define STR_MULTI_SERVOFREQ QT_TRANSLATE_NOOP("Multiprotocols", "Servo output frequency")
#define STR_MULTI_OPTION QT_TRANSLATE_NOOP("Multiprotocols", "Option value")
#define STR_MULTI_FIXEDID QT_TRANSLATE_NOOP("Multiprotocols", "Fixed ID value")
@@ -2607,7 +2607,13 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
else
internalField.Append(new SpareBitsField<2>(this));
internalField.Append(new BoolField<1>(this, generalData.rtcCheckDisable));
internalField.Append(new SpareBitsField<2>(this));
if (IS_JUMPER_T18(board)) {
internalField.Append(new BoolField<1>(this, generalData.keysBacklight));
internalField.Append(new SpareBitsField<1>(this));
}
else {
internalField.Append(new SpareBitsField<2>(this));
}
for (int i=0; i<4; i++) {
internalField.Append(new SignedField<16>(this, generalData.trainer.calib[i]));
@@ -62,6 +62,8 @@ const char * OpenTxEepromInterface::getName()
return "OpenTX for Jumper T12";
case BOARD_JUMPER_T16:
return "OpenTX for Jumper T16";
case BOARD_JUMPER_T18:
return "OpenTX for Jumper T18";
case BOARD_RADIOMASTER_TX16S:
return "OpenTX for Radiomaster TX16S";
case BOARD_TARANIS_X9D:
@@ -738,7 +740,7 @@ bool OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
case PULSES_ACCST_ISRM_D16:
return IS_ACCESS_RADIO(board, id);
case PULSES_MULTIMODULE:
return id.contains("internalmulti") || IS_RADIOMASTER_TX16S(board);
return id.contains("internalmulti") || IS_RADIOMASTER_TX16S(board) || IS_JUMPER_T18(board);
default:
return false;
}
@@ -1276,6 +1278,13 @@ void registerOpenTxFirmwares()
firmware->addOptionsGroup({opt_bt, opt_internal_gps});
registerOpenTxFirmware(firmware);
/* Jumper T18 board */
firmware = new OpenTxFirmware("opentx-t18", Firmware::tr("Jumper T18"), BOARD_JUMPER_T18);
addOpenTxFrskyOptions(firmware);
firmware->addOption("bluetooth", Firmware::tr("Support for bluetooth module"));
registerOpenTxFirmware(firmware);
addOpenTxRfOptions(firmware, FLEX);
/* 9XR-Pro */
firmware = new OpenTxFirmware("opentx-9xrpro", Firmware::tr("Turnigy 9XR-PRO"), BOARD_9XRPRO);
addOpenTxArm9xOptions(firmware, false);
@@ -197,6 +197,12 @@ ui(new Ui::GeneralSetup)
ui->label_OFFBright->hide();
}
if (!IS_JUMPER_T18(firmware->getBoard())) {
ui->keysBl_ChkB->hide();
ui->keysBl_ChkB->setDisabled(true);
ui->label_KeysBl->hide();
}
if (!firmware->getCapability(SoundMod)) {
ui->soundModeCB->setDisabled(true);
ui->label_soundMode->hide();
+402 -388
View File
@@ -554,348 +554,13 @@
</item>
<item row="0" column="3">
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,0">
<item row="2" column="1">
<widget class="QSpinBox" name="volume_SB">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>23</number>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="re_label">
<property name="text">
<string>RotEnc Navigation</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QCheckBox" name="blAlarm_ChkB">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="stickReverseLB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Stick reverse</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QComboBox" name="backlightswCB">
<property name="toolTip">
<string/>
</property>
<property name="statusTip">
<string/>
</property>
<property name="whatsThis">
<string>This is the switch selectrion for turning on the backlight (if installed).
</string>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="blAlarm_LB">
<property name="text">
<string>Backlight flash on alarm</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Backlight Auto OFF after</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Backlight Switch</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="varioR0_SB">
<property name="suffix">
<string> ms</string>
</property>
<property name="minimum">
<number>200</number>
</property>
<property name="maximum">
<number>1000</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
<property name="value">
<number>500</number>
</property>
</widget>
</item>
<item row="18" column="0">
<widget class="QLabel" name="VoiceLang_label">
<property name="text">
<string>Voice Language</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="varioP0_SB">
<property name="suffix">
<string> Hz</string>
</property>
<property name="minimum">
<number>300</number>
</property>
<property name="maximum">
<number>1100</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
<property name="value">
<number>700</number>
</property>
</widget>
</item>
<item row="14" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="stickReverse1">
<property name="text">
<string notr="true">1</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="stickReverse2">
<property name="text">
<string notr="true">2</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="stickReverse3">
<property name="text">
<string notr="true">3</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="stickReverse4">
<property name="text">
<string notr="true">4</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<widget class="QLabel" name="varioR0_label">
<property name="text">
<string>Vario repeat at zero</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="varioP0_label">
<property name="text">
<string>Vario pitch at zero</string>
</property>
</widget>
</item>
<item row="15" column="0">
<widget class="QLabel" name="label_faimode">
<property name="text">
<string>FAI Mode</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="label_OFFBright">
<property name="text">
<string>Backlight OFF Brightness</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QSpinBox" name="BLBright_SB">
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QSpinBox" name="backlightautoSB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string/>
</property>
<property name="statusTip">
<string/>
</property>
<property name="whatsThis">
<string>If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds.</string>
</property>
<property name="suffix">
<string> sec</string>
</property>
<property name="maximum">
<number>600</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="speakerPitchSB">
<property name="toolTip">
<string/>
</property>
<property name="statusTip">
<string/>
</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; font-size:8pt;&quot;&gt;LCD Screen Contrast&lt;/span&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;&lt;span style=&quot; font-size:8pt;&quot;&gt;Values can be 20-45&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="varioPMax_SB">
<property name="suffix">
<string> Hz</string>
</property>
<property name="minimum">
<number>1300</number>
</property>
<property name="maximum">
<number>2900</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
<property name="value">
<number>1700</number>
</property>
</widget>
</item>
<item row="17" column="0">
<widget class="QLabel" name="label_timezone">
<property name="text">
<string>Timeshift from UTC</string>
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="QSpinBox" name="OFFBright_SB">
<property name="minimum">
<number>5</number>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item row="16" column="1">
<widget class="QComboBox" name="countrycode_CB">
<item>
<property name="text">
<string>America</string>
</property>
</item>
<item>
<property name="text">
<string>Japan</string>
</property>
</item>
<item>
<property name="text">
<string>Europe</string>
</property>
</item>
</widget>
</item>
<item row="15" column="1">
<widget class="QCheckBox" name="faimode_CB">
<property name="toolTip">
<string>If you enable FAI, only RSSI and RxBt sensors will keep working. This function cannot be disabled by the radio.</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="soundModeCB">
<item>
<property name="text">
<string>Beeper</string>
</property>
</item>
<item>
<property name="text">
<string>Speaker</string>
</property>
</item>
<item>
<property name="text">
<string>BeeperVoice</string>
</property>
</item>
<item>
<property name="text">
<string>SpeakerVoice</string>
</property>
</item>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_BLBright">
<property name="text">
<string>Backlight Brightness</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout_9" columnstretch="1,0,1,0">
<item row="0" column="0">
@@ -992,24 +657,288 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="12" column="0">
<widget class="QLabel" name="backlightColor_label">
<item row="19" column="1">
<widget class="QComboBox" name="voiceLang_CB"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_soundMode">
<property name="text">
<string>Backlight color</string>
<string>Sound Mode</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="varioPMax_label">
<item row="9" column="1">
<widget class="QCheckBox" name="blAlarm_ChkB">
<property name="text">
<string>Vario pitch at max</string>
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_speakerPitch">
<item row="15" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="stickReverse1">
<property name="text">
<string notr="true">1</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="stickReverse2">
<property name="text">
<string notr="true">2</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="stickReverse3">
<property name="text">
<string notr="true">3</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="stickReverse4">
<property name="text">
<string notr="true">4</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="1">
<widget class="QComboBox" name="backlightswCB">
<property name="toolTip">
<string/>
</property>
<property name="statusTip">
<string/>
</property>
<property name="whatsThis">
<string>This is the switch selectrion for turning on the backlight (if installed).
</string>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="varioP0_SB">
<property name="suffix">
<string> Hz</string>
</property>
<property name="minimum">
<number>300</number>
</property>
<property name="maximum">
<number>1100</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
<property name="value">
<number>700</number>
</property>
</widget>
</item>
<item row="21" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="varioR0_SB">
<property name="suffix">
<string> ms</string>
</property>
<property name="minimum">
<number>200</number>
</property>
<property name="maximum">
<number>1000</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
<property name="value">
<number>500</number>
</property>
</widget>
</item>
<item row="15" column="0">
<widget class="QLabel" name="stickReverseLB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Speaker Pitch (spkr only)</string>
<string>Stick reverse</string>
</property>
</widget>
</item>
<item row="20" column="1">
<widget class="QLineEdit" name="registrationId">
<property name="inputMask">
<string>nnnnnnNN</string>
</property>
<property name="maxLength">
<number>8</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="soundModeCB">
<item>
<property name="text">
<string>Beeper</string>
</property>
</item>
<item>
<property name="text">
<string>Speaker</string>
</property>
</item>
<item>
<property name="text">
<string>BeeperVoice</string>
</property>
</item>
<item>
<property name="text">
<string>SpeakerVoice</string>
</property>
</item>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="label_OFFBright">
<property name="text">
<string>Backlight OFF Brightness</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="volume_SB">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>23</number>
</property>
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="re_label">
<property name="text">
<string>RotEnc Navigation</string>
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="QSpinBox" name="OFFBright_SB">
<property name="minimum">
<number>5</number>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Backlight Switch</string>
</property>
</widget>
</item>
<item row="17" column="1">
<widget class="QComboBox" name="countrycode_CB">
<item>
<property name="text">
<string>America</string>
</property>
</item>
<item>
<property name="text">
<string>Japan</string>
</property>
</item>
<item>
<property name="text">
<string>Europe</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="varioP0_label">
<property name="text">
<string>Vario pitch at zero</string>
</property>
</widget>
</item>
<item row="16" column="1">
<widget class="QCheckBox" name="faimode_CB">
<property name="toolTip">
<string>If you enable FAI, only RSSI and RxBt sensors will keep working. This function cannot be disabled by the radio.</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Backlight Auto OFF after</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="varioPMax_SB">
<property name="suffix">
<string> Hz</string>
</property>
<property name="minimum">
<number>1300</number>
</property>
<property name="maximum">
<number>2900</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
<property name="value">
<number>1700</number>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QSpinBox" name="BLBright_SB">
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item row="16" column="0">
<widget class="QLabel" name="label_faimode">
<property name="text">
<string>FAI Mode</string>
</property>
</widget>
</item>
@@ -1044,31 +973,56 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="16" column="0">
<item row="12" column="0">
<widget class="QLabel" name="backlightColor_label">
<property name="text">
<string>Backlight color</string>
</property>
</widget>
</item>
<item row="20" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Owner Registration ID</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QSpinBox" name="backlightautoSB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string/>
</property>
<property name="statusTip">
<string/>
</property>
<property name="whatsThis">
<string>If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds.</string>
</property>
<property name="suffix">
<string> sec</string>
</property>
<property name="maximum">
<number>600</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
<item row="17" column="0">
<widget class="QLabel" name="countrycode_label">
<property name="text">
<string>Country Code</string>
</property>
</widget>
</item>
<item row="13" column="1">
<widget class="QComboBox" name="re_CB"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_soundMode">
<property name="text">
<string>Sound Mode</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_volume">
<property name="text">
<string>Speaker Volume</string>
</property>
</widget>
</item>
<item row="17" column="1">
<item row="18" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QSpinBox" name="timezoneSB">
@@ -1098,36 +1052,96 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="18" column="1">
<widget class="QComboBox" name="voiceLang_CB"/>
</item>
<item row="20" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="19" column="0">
<widget class="QLabel" name="label">
<item row="10" column="0">
<widget class="QLabel" name="label_BLBright">
<property name="text">
<string>Owner Registration ID</string>
<string>Backlight Brightness</string>
</property>
</widget>
</item>
<item row="19" column="1">
<widget class="QLineEdit" name="registrationId">
<property name="inputMask">
<string>nnnnnnNN</string>
<item row="6" column="0">
<widget class="QLabel" name="varioR0_label">
<property name="text">
<string>Vario repeat at zero</string>
</property>
<property name="maxLength">
<number>8</number>
</widget>
</item>
<item row="19" column="0">
<widget class="QLabel" name="VoiceLang_label">
<property name="text">
<string>Voice Language</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="blAlarm_LB">
<property name="text">
<string>Backlight flash on alarm</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="varioPMax_label">
<property name="text">
<string>Vario pitch at max</string>
</property>
</widget>
</item>
<item row="14" column="1">
<widget class="QComboBox" name="re_CB"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_speakerPitch">
<property name="text">
<string>Speaker Pitch (spkr only)</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_volume">
<property name="text">
<string>Speaker Volume</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="speakerPitchSB">
<property name="toolTip">
<string/>
</property>
<property name="statusTip">
<string/>
</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; font-size:8pt;&quot;&gt;LCD Screen Contrast&lt;/span&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;&lt;span style=&quot; font-size:8pt;&quot;&gt;Values can be 20-45&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_KeysBl">
<property name="text">
<string>Keys Backlight</string>
</property>
</widget>
</item>
<item row="13" column="1">
<widget class="QCheckBox" name="keysBl_ChkB">
<property name="text">
<string/>
</property>
</widget>
</item>
Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

+2
View File
@@ -14,6 +14,7 @@ set(simulation_SRCS
simulateduiwidgetX12.cpp
simulateduiwidgetJumperT12.cpp
simulateduiwidgetJumperT16.cpp
simulateduiwidgetJumperT18.cpp
simulateduiwidgetTX16S.cpp
simulatorinterface.cpp
simulatormainwindow.cpp
@@ -39,6 +40,7 @@ set(simulation_UIS
simulateduiwidgetX12.ui
simulateduiwidgetJumperT12.ui
simulateduiwidgetJumperT16.ui
simulateduiwidgetJumperT18.ui
simulateduiwidgetTX16S.ui
simulatormainwindow.ui
simulatorstartupdialog.ui
@@ -113,6 +113,7 @@ namespace Ui {
class SimulatedUIWidgetX12;
class SimulatedUIWidgetJumperT12;
class SimulatedUIWidgetJumperT16;
class SimulatedUIWidgetJumperT18;
class SimulatedUIWidgetTX16S;
}
@@ -252,6 +253,18 @@ class SimulatedUIWidgetJumperT16: public SimulatedUIWidget
Ui::SimulatedUIWidgetJumperT16 * ui;
};
class SimulatedUIWidgetJumperT18: public SimulatedUIWidget
{
Q_OBJECT
public:
explicit SimulatedUIWidgetJumperT18(SimulatorInterface * simulator, QWidget * parent = nullptr);
virtual ~SimulatedUIWidgetJumperT18();
private:
Ui::SimulatedUIWidgetJumperT18 * ui;
};
class SimulatedUIWidgetTX16S: public SimulatedUIWidget
{
Q_OBJECT
@@ -0,0 +1,69 @@
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
// NOTE: RadioUiAction(NUMBER,...): NUMBER relates to enum EnumKeys in the specific board.h
#include "simulateduiwidget.h"
#include "ui_simulateduiwidgetJumperT18.h"
SimulatedUIWidgetJumperT18::SimulatedUIWidgetJumperT18(SimulatorInterface *simulator, QWidget * parent):
SimulatedUIWidget(simulator, parent),
ui(new Ui::SimulatedUIWidgetJumperT18)
{
RadioUiAction * act;
ui->setupUi(this);
// add actions in order of appearance on the help menu
act = new RadioUiAction(3, QList<int>() << Qt::Key_Up, SIMU_STR_HLP_KEY_UP, SIMU_STR_HLP_ACT_MDL);
addRadioWidget(ui->leftbuttons->addArea(QRect(60, 90, 80, 35), "JumperT18/left_mdl.png", act));
act = new RadioUiAction(6, QList<int>() << Qt::Key_Left, SIMU_STR_HLP_KEY_LFT, SIMU_STR_HLP_ACT_SYS);
addRadioWidget(ui->leftbuttons->addArea(QRect(25, 5, 100, 40), "JumperT18/left_sys.png", act));
act = new RadioUiAction(5, QList<int>() << Qt::Key_Right, SIMU_STR_HLP_KEY_RGT, SIMU_STR_HLP_ACT_TELE);
addRadioWidget(ui->leftbuttons->addArea(QRect(60, 180, 80, 35), "JumperT18/left_tele.png", act));
act = new RadioUiAction(4, QList<int>() << Qt::Key_Down << Qt::Key_Delete << Qt::Key_Escape << Qt::Key_Backspace,
SIMU_STR_HLP_KEY_DN % "<br>" % SIMU_STR_HLP_KEYS_EXIT, SIMU_STR_HLP_ACT_RTN);
addRadioWidget(ui->rightbuttons->addArea(QRect(20, 5, 100, 40), "JumperT18/right_rtn.png", act));
act = new RadioUiAction(1, QList<int>() << Qt::Key_PageDown, SIMU_STR_HLP_KEY_PGDN, SIMU_STR_HLP_ACT_PGDN);
addRadioWidget(ui->leftbuttons->addArea(QRect(60, 140, 80, 35), "JumperT18/left.png", act));
m_scrollUpAction = new RadioUiAction(-1, QList<int>() << Qt::Key_Minus, SIMU_STR_HLP_KEY_MIN % "|" % SIMU_STR_HLP_MOUSE_UP, SIMU_STR_HLP_ACT_ROT_LFT);
m_scrollDnAction = new RadioUiAction(-1, QList<int>() << Qt::Key_Plus << Qt::Key_Equal, SIMU_STR_HLP_KEY_PLS % "|" % SIMU_STR_HLP_MOUSE_DN, SIMU_STR_HLP_ACT_ROT_RGT);
connectScrollActions();
m_mouseMidClickAction = new RadioUiAction(2, QList<int>() << Qt::Key_Enter << Qt::Key_Return, SIMU_STR_HLP_KEYS_ACTIVATE, SIMU_STR_HLP_ACT_ROT_DN);
addRadioWidget(ui->rightbuttons->addArea(QRect(25, 90, 70, 130), "JumperT18/right_ent.png", m_mouseMidClickAction));
addRadioWidget(ui->leftbuttons->addArea(QRect(10, 245, 30, 30), "JumperT18/left_scrnsht.png", m_screenshotAction));
m_backlightColors << QColor(47, 123, 227);
setLcd(ui->lcd);
}
SimulatedUIWidgetJumperT18::~SimulatedUIWidgetJumperT18()
{
delete ui;
}
@@ -0,0 +1,197 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SimulatedUIWidgetJumperT18</class>
<widget class="QWidget" name="SimulatedUIWidgetJumperT18">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>825</width>
<height>292</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>825</width>
<height>292</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>825</width>
<height>292</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="2" rowspan="3">
<widget class="ButtonsWidget" name="rightbuttons" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>131 </width>
<height>289</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>131</width>
<height>289</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/JumperT18/right.png)</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="LcdWidget" name="lcd" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>480</width>
<height>272</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>480</width>
<height>272</height>
</size>
</property>
<property name="font">
<font>
<pointsize>5</pointsize>
</font>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="3">
<widget class="ButtonsWidget" name="leftbuttons" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>131</width>
<height>289</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>131</width>
<height>289</height>
</size>
</property>
<property name="mouseTracking">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/JumperT18/left.png);</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QWidget" name="top" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>480</width>
<height>10</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>480</width>
<height>10</height>
</size>
</property>
<property name="font">
<font>
<pointsize>5</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/JumperT18/top.png)</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QWidget" name="bottom" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>480</width>
<height>10</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>480</width>
<height>10</height>
</size>
</property>
<property name="font">
<font>
<pointsize>5</pointsize>
<kerning>false</kerning>
</font>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/JumperT18/bottom.png)</string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>LcdWidget</class>
<extends>QWidget</extends>
<header>lcdwidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonsWidget</class>
<extends>QWidget</extends>
<header>buttonswidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
@@ -86,7 +86,7 @@ void SimulatorStartupDialog::changeEvent(QEvent *e)
// FIXME : need a better way to check for this
bool SimulatorStartupDialog::usesCategorizedStorage(const QString & name)
{
return name.contains(QRegExp("(x12|x10|horus|16)", Qt::CaseInsensitive));
return name.contains(QRegExp("(x12|x10|horus|16|18)", Qt::CaseInsensitive));
}
bool SimulatorStartupDialog::usesCategorizedStorage()
@@ -94,6 +94,9 @@ SimulatorWidget::SimulatorWidget(QWidget * parent, SimulatorInterface * simulato
case Board::BOARD_JUMPER_T16:
radioUiWidget = new SimulatedUIWidgetJumperT16(simulator, this);
break;
case Board::BOARD_JUMPER_T18:
radioUiWidget = new SimulatedUIWidgetJumperT18(simulator, this);
break;
case Board::BOARD_RADIOMASTER_TX16S:
radioUiWidget = new SimulatedUIWidgetTX16S(simulator, this);
break;