feat: Option for inverting rotary encoder direction (#1690)
* feat: Add option for rotary encoder direction Based heavily on opentx/opentx#8852 by @3djc * companion ui elements * Cleanup * Hook up UI, reading setting from yaml * Teach simulator about rotEncDirection * Simu and radio default scroll direction correction Otherwise the "default" would be the opposite to how it has always been * Remove what will be a confict with fix in #1586 * Wasn't using rotEncDirection consistently * Zorro RE dir is opp to TX16, TX12, TPro, X9D+2019
This commit is contained in:
@@ -200,6 +200,7 @@ Node convert<GeneralSettings>::encode(const GeneralSettings& rhs)
|
||||
node["noJitterFilter"] = (int)rhs.noJitterFilter;
|
||||
node["disableRtcWarning"] = (int)rhs.rtcCheckDisable; // TODO: verify
|
||||
node["keysBacklight"] = (int)rhs.keysBacklight;
|
||||
node["rotEncDirection"] = (int)rhs.rotEncDirection;
|
||||
node["imperial"] = rhs.imperial;
|
||||
node["ttsLanguage"] = rhs.ttsLanguage;
|
||||
node["beepVolume"] = rhs.beepVolume + 2;
|
||||
@@ -390,6 +391,7 @@ bool convert<GeneralSettings>::decode(const Node& node, GeneralSettings& rhs)
|
||||
node["noJitterFilter"] >> rhs.noJitterFilter; // new, but don't write old
|
||||
node["disableRtcWarning"] >> rhs.rtcCheckDisable; // TODO: verify
|
||||
node["keysBacklight"] >> rhs.keysBacklight;
|
||||
node["rotEncDirection"] >> rhs.rotEncDirection;
|
||||
node["imperial"] >> rhs.imperial;
|
||||
node["ttsLanguage"] >> rhs.ttsLanguage;
|
||||
node["beepVolume"] >> ioffset_int(rhs.beepVolume, 2);
|
||||
|
||||
@@ -167,7 +167,8 @@ enum Capability {
|
||||
HasTelemetryBaudrate,
|
||||
TopBarZones,
|
||||
HasModelsList,
|
||||
HasFlySkyGimbals
|
||||
HasFlySkyGimbals,
|
||||
RotaryEncoderNavigation
|
||||
};
|
||||
|
||||
class EEPROMInterface
|
||||
|
||||
@@ -228,6 +228,7 @@ class GeneralSettings {
|
||||
bool noJitterFilter;
|
||||
bool rtcCheckDisable;
|
||||
bool keysBacklight;
|
||||
bool rotEncDirection;
|
||||
unsigned int imperial;
|
||||
char ttsLanguage[TTS_LANGUAGE_LEN + 1];
|
||||
int beepVolume;
|
||||
|
||||
@@ -3035,10 +3035,11 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
||||
internalField.Append(new BoolField<1>(this, generalData.rtcCheckDisable));
|
||||
if (IS_JUMPER_T18(board)) {
|
||||
internalField.Append(new BoolField<1>(this, generalData.keysBacklight));
|
||||
internalField.Append(new SpareBitsField<1>(this));
|
||||
internalField.Append(new BoolField<1>(this, generalData.rotEncDirection));
|
||||
}
|
||||
else {
|
||||
internalField.Append(new SpareBitsField<2>(this));
|
||||
internalField.Append(new SpareBitsField<1>(this));
|
||||
internalField.Append(new BoolField<1>(this, generalData.rotEncDirection));
|
||||
}
|
||||
|
||||
for (int i=0; i<4; i++) {
|
||||
|
||||
@@ -766,6 +766,12 @@ int OpenTxFirmware::getCapability(::Capability capability)
|
||||
return IS_FAMILY_HORUS_OR_T16(board);
|
||||
case HasFlySkyGimbals:
|
||||
return (IS_RADIOMASTER_TX16S(board) && id.contains("flyskygimbals"));
|
||||
case RotaryEncoderNavigation:
|
||||
return (IS_TARANIS_X9E(board) || IS_TARANIS_X9DP_2019(board) ||
|
||||
IS_TARANIS_X7(board) || IS_JUMPER_TPRO(board) ||
|
||||
IS_TARANIS_X9LITE(board) || IS_RADIOMASTER_TX12(board) ||
|
||||
IS_RADIOMASTER_ZORRO(board) || IS_RADIOMASTER_TX16S(board) ||
|
||||
IS_JUMPER_T18(board));
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -125,6 +125,14 @@ ui(new Ui::GeneralSetup)
|
||||
ui->faimode_CB->setChecked(generalSettings.fai);
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(RotaryEncoderNavigation)) {
|
||||
ui->invertRotary_CB->hide();
|
||||
ui->invertRotary_label->hide();
|
||||
}
|
||||
else {
|
||||
ui->invertRotary_CB->setChecked(generalSettings.rotEncDirection);
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(HasPxxCountry)) {
|
||||
ui->countrycode_label->hide();
|
||||
ui->countrycode_CB->hide();
|
||||
@@ -475,6 +483,12 @@ void GeneralSetupPanel::on_faimode_CB_stateChanged(int)
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void GeneralSetupPanel::on_invertRotary_CB_stateChanged(int)
|
||||
{
|
||||
generalSettings.rotEncDirection = ui->invertRotary_CB->isChecked();
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void GeneralSetupPanel::on_speakerPitchSB_editingFinished()
|
||||
{
|
||||
generalSettings.speakerPitch = ui->speakerPitchSB->value();
|
||||
|
||||
@@ -49,6 +49,7 @@ class GeneralSetupPanel : public GeneralPanel
|
||||
void on_countrycode_CB_currentIndexChanged(int index);
|
||||
void on_units_CB_currentIndexChanged(int index);
|
||||
void on_faimode_CB_stateChanged(int );
|
||||
void on_invertRotary_CB_stateChanged(int);
|
||||
void on_speakerPitchSB_editingFinished();
|
||||
void on_timezoneSB_editingFinished();
|
||||
void on_adjustRTC_stateChanged(int);
|
||||
|
||||
@@ -561,6 +561,16 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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>Sound Mode</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">
|
||||
@@ -657,16 +667,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<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>Sound Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QCheckBox" name="blAlarm_ChkB">
|
||||
<property name="text">
|
||||
@@ -674,6 +674,174 @@
|
||||
</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="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="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="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>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="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="14" column="0">
|
||||
<widget class="QLabel" name="re_label">
|
||||
<property name="text">
|
||||
<string>RotEnc Navigation</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="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="22" 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="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
@@ -724,269 +892,6 @@
|
||||
</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>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>
|
||||
<item row="12" column="1">
|
||||
<layout class="QHBoxLayout" name="backlightColor_Layout">
|
||||
<item>
|
||||
<widget class="QLabel" name="backlightColor1_label">
|
||||
<property name="text">
|
||||
<string>Color 1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="backlightColor_SL">
|
||||
<property name="maximum">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="backlightColor2_label">
|
||||
<property name="text">
|
||||
<string>Color 2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<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">
|
||||
@@ -1052,43 +957,100 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_BLBright">
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Backlight Brightness</string>
|
||||
<string>Backlight Auto OFF after</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="varioR0_label">
|
||||
<property name="text">
|
||||
<string>Vario repeat at zero</string>
|
||||
<item row="10" column="1">
|
||||
<widget class="QSpinBox" name="BLBright_SB">
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="19" column="0">
|
||||
<widget class="QLabel" name="VoiceLang_label">
|
||||
<item row="16" column="0">
|
||||
<widget class="QLabel" name="label_faimode">
|
||||
<property name="text">
|
||||
<string>Voice Language</string>
|
||||
<string>FAI Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="blAlarm_LB">
|
||||
<property name="text">
|
||||
<string>Backlight flash on alarm</string>
|
||||
<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="5" column="0">
|
||||
<widget class="QLabel" name="varioPMax_label">
|
||||
<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>Vario pitch at max</string>
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<widget class="QComboBox" name="re_CB"/>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="backlightColor_label">
|
||||
<property name="text">
|
||||
<string>Backlight color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<layout class="QHBoxLayout" name="backlightColor_Layout">
|
||||
<item>
|
||||
<widget class="QLabel" name="backlightColor1_label">
|
||||
<property name="text">
|
||||
<string>Color 1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="backlightColor_SL">
|
||||
<property name="maximum">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="backlightColor2_label">
|
||||
<property name="text">
|
||||
<string>Color 2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="20" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Owner Registration ID</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_speakerPitch">
|
||||
@@ -1145,6 +1107,61 @@ p, li { white-space: pre-wrap; }
|
||||
</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="10" column="0">
|
||||
<widget class="QLabel" name="label_BLBright">
|
||||
<property name="text">
|
||||
<string>Backlight Brightness</string>
|
||||
</property>
|
||||
</widget>
|
||||
</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="19" column="0">
|
||||
<widget class="QLabel" name="VoiceLang_label">
|
||||
<property name="text">
|
||||
<string>Voice Language</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<widget class="QComboBox" name="re_CB"/>
|
||||
</item>
|
||||
<item row="21" column="0">
|
||||
<widget class="QLabel" name="invertRotary_label">
|
||||
<property name="text">
|
||||
<string>Invert Rotary</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="21" column="1">
|
||||
<widget class="QCheckBox" name="invertRotary_CB">
|
||||
<property name="toolTip">
|
||||
<string>Invert the direction of the rotary encoder</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
|
||||
@@ -854,7 +854,7 @@ PACK(struct RadioData {
|
||||
int8_t antennaMode:2 ENUM(AntennaModes);
|
||||
uint8_t disableRtcWarning:1;
|
||||
uint8_t keysBacklight:1;
|
||||
int8_t spare1:1 SKIP;
|
||||
int8_t rotEncDirection:1;
|
||||
NOBACKUP(uint8_t internalModule ENUM(ModuleType));
|
||||
NOBACKUP(TrainerData trainer);
|
||||
NOBACKUP(uint8_t view); // index of view in main screen
|
||||
|
||||
@@ -102,6 +102,7 @@ enum {
|
||||
ITEM_RADIO_SETUP_USB_MODE,
|
||||
CASE_JACK_DETECT(ITEM_RADIO_SETUP_JACK_MODE)
|
||||
ITEM_RADIO_SETUP_RX_CHANNEL_ORD,
|
||||
CASE_ROTARY_ENCODER(ITEM_RADIO_SETUP_ROTARY_INVERSE)
|
||||
ITEM_RADIO_SETUP_STICK_MODE_LABELS,
|
||||
ITEM_RADIO_SETUP_STICK_MODE,
|
||||
ITEM_RADIO_SETUP_MAX
|
||||
@@ -175,6 +176,7 @@ void menuRadioSetup(event_t event)
|
||||
0,
|
||||
0, // USB mode
|
||||
CASE_JACK_DETECT(0) // Jack mode
|
||||
CASE_ROTARY_ENCODER(0)
|
||||
0, COL_TX_MODE, 0, 1/*to force edit mode*/});
|
||||
|
||||
if (event == EVT_ENTRY) {
|
||||
@@ -658,6 +660,12 @@ void menuRadioSetup(event_t event)
|
||||
#endif
|
||||
break;
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
case ITEM_RADIO_SETUP_ROTARY_INVERSE:
|
||||
g_eeGeneral.rotEncDirection = editCheckBox(g_eeGeneral.rotEncDirection, RADIO_SETUP_2ND_COLUMN, y, STR_INVERT_ROTARY, attr, event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ITEM_RADIO_SETUP_STICK_MODE:
|
||||
lcdDrawChar(2*FW, y, '1'+reusableBuffer.generalSettings.stickMode, attr);
|
||||
for (uint8_t i=0; i<NUM_STICKS; i++) {
|
||||
|
||||
@@ -95,6 +95,7 @@ enum MenuRadioSetupItems {
|
||||
ITEM_RADIO_SETUP_SWITCHES_DELAY,
|
||||
ITEM_RADIO_SETUP_USB_MODE,
|
||||
ITEM_RADIO_SETUP_RX_CHANNEL_ORD,
|
||||
CASE_ROTARY_ENCODER(ITEM_RADIO_SETUP_ROTARY_INVERSE)
|
||||
ITEM_RADIO_SETUP_STICK_MODE_LABELS,
|
||||
ITEM_RADIO_SETUP_STICK_MODE,
|
||||
ITEM_RADIO_SETUP_MAX
|
||||
@@ -174,6 +175,7 @@ void menuRadioSetup(event_t event)
|
||||
0, // switches delay
|
||||
0, // USB mode
|
||||
0, // RX channels order
|
||||
CASE_ROTARY_ENCODER(0) // Invert rotary encoder
|
||||
LABEL(TX_MODE),
|
||||
0, // sticks mode
|
||||
1 /*to force edit mode*/
|
||||
@@ -588,6 +590,12 @@ void menuRadioSetup(event_t event)
|
||||
}
|
||||
break;
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
case ITEM_RADIO_SETUP_ROTARY_INVERSE:
|
||||
g_eeGeneral.rotEncDirection = editCheckBox(g_eeGeneral.rotEncDirection, RADIO_SETUP_2ND_COLUMN, y, STR_INVERT_ROTARY, attr, event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ITEM_RADIO_SETUP_STICK_MODE:
|
||||
lcdDrawChar(2*FW, y, '1'+reusableBuffer.generalSettings.stickMode, attr);
|
||||
for (uint8_t i=0; i<4; i++) {
|
||||
|
||||
@@ -496,6 +496,12 @@ void RadioSetupPage::build(FormWindow * window)
|
||||
new Choice(window, grid.getFieldSlot(), STR_USBMODES, USB_UNSELECTED_MODE, USB_MAX_MODE, GET_SET_DEFAULT(g_eeGeneral.USBMode));
|
||||
grid.nextLine();
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
new StaticText(window, grid.getLabelSlot(), STR_INVERT_ROTARY, 0, COLOR_THEME_PRIMARY1);
|
||||
new CheckBox(window, grid.getFieldSlot(), GET_SET_DEFAULT(g_eeGeneral.rotEncDirection));
|
||||
grid.nextLine();
|
||||
#endif
|
||||
|
||||
// RX channel order
|
||||
new StaticText(window, grid.getLabelSlot(), STR_RXCHANNELORD, 0, COLOR_THEME_PRIMARY1); // RAET->AETR
|
||||
choice = new Choice(window, grid.getFieldSlot(), 0, 4*3*2 - 1, GET_SET_DEFAULT(g_eeGeneral.templateSetup));
|
||||
|
||||
+6
-2
@@ -373,6 +373,7 @@ inline bool SPLASH_NEEDED()
|
||||
#endif
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
#define CASE_ROTARY_ENCODER(x) x,
|
||||
#define IS_ROTARY_ENCODER_NAVIGATION_ENABLE() true
|
||||
extern volatile rotenc_t rotencValue;
|
||||
#define ROTARY_ENCODER_NAVIGATION_VALUE rotencValue
|
||||
@@ -381,8 +382,11 @@ inline bool SPLASH_NEEDED()
|
||||
#define ROTENC_HIGHSPEED 50
|
||||
#define ROTENC_DELAY_MIDSPEED 32
|
||||
#define ROTENC_DELAY_HIGHSPEED 16
|
||||
#elif defined(RADIO_T8)
|
||||
constexpr uint8_t rotencSpeed = 1;
|
||||
#else
|
||||
#define CASE_ROTARY_ENCODER(x)
|
||||
#if defined(RADIO_T8)
|
||||
constexpr uint8_t rotencSpeed = 1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
constexpr uint8_t HEART_TIMER_10MS = 0x01;
|
||||
|
||||
@@ -366,7 +366,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -337,7 +337,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -337,7 +337,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -337,7 +337,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -345,7 +345,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -337,7 +337,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -387,7 +387,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -385,7 +385,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -337,7 +337,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -344,7 +344,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -383,7 +383,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -324,7 +324,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -332,7 +332,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -329,7 +329,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -331,7 +331,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -337,7 +337,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "rotEncDirection", 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
|
||||
@@ -71,6 +71,14 @@ void rotaryEncoderInit()
|
||||
NVIC_SetPriority(ROTARY_ENCODER_TIMER_IRQn, 7);
|
||||
}
|
||||
|
||||
#if defined(BOOT)
|
||||
#define INC_ROT 1
|
||||
#define INC_ROT_2 2
|
||||
#else
|
||||
#define INC_ROT (g_eeGeneral.rotEncDirection ? -1 : 1);
|
||||
#define INC_ROT_2 (g_eeGeneral.rotEncDirection ? -2 : 2);
|
||||
#endif
|
||||
|
||||
void rotaryEncoderCheck()
|
||||
{
|
||||
#if (defined(RADIO_FAMILY_T16) && !defined(RADIO_T18)) || defined(RADIO_TX12)
|
||||
@@ -82,22 +90,22 @@ void rotaryEncoderCheck()
|
||||
{
|
||||
if (pins == 3)
|
||||
{
|
||||
rotencValue += 2;
|
||||
rotencValue += INC_ROT_2;
|
||||
}
|
||||
else
|
||||
{
|
||||
rotencValue -= 2;
|
||||
rotencValue -= INC_ROT_2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((state & 0x01) ^ ((pins & 0x02) >> 1))
|
||||
{
|
||||
rotencValue -= 1;
|
||||
rotencValue -= INC_ROT;
|
||||
}
|
||||
else
|
||||
{
|
||||
rotencValue += 1;
|
||||
rotencValue += INC_ROT;
|
||||
}
|
||||
}
|
||||
state &= ~0x03;
|
||||
@@ -105,14 +113,14 @@ void rotaryEncoderCheck()
|
||||
#else
|
||||
uint8_t newPosition = ROTARY_ENCODER_POSITION();
|
||||
if (newPosition != rotencPosition && !(readKeys() & (1 << KEY_ENTER))) {
|
||||
#if defined(ROTARY_ENCODER_INVERT)
|
||||
if (!((rotencPosition & 0x01) ^ ((newPosition & 0x02) >> 1))) {
|
||||
#if defined(RADIO_ZORRO) // zorro def. rotation dir is inverse of other radios
|
||||
if (!(rotencPosition & 0x01) ^ ((newPosition & 0x02) >> 1)) {
|
||||
#else
|
||||
if ((rotencPosition & 0x01) ^ ((newPosition & 0x02) >> 1)) {
|
||||
#endif
|
||||
--rotencValue;
|
||||
rotencValue -= INC_ROT;
|
||||
} else {
|
||||
++rotencValue;
|
||||
rotencValue += INC_ROT;
|
||||
}
|
||||
rotencPosition = newPosition;
|
||||
#endif
|
||||
|
||||
@@ -277,6 +277,8 @@ void OpenTxSimulator::setInputValue(int type, uint8_t index, int16_t value)
|
||||
void OpenTxSimulator::rotaryEncoderEvent(int steps)
|
||||
{
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
(g_eeGeneral.rotEncDirection ? steps *= -1 : steps);
|
||||
|
||||
ROTARY_ENCODER_NAVIGATION_VALUE += steps * ROTARY_ENCODER_GRANULARITY;
|
||||
#else
|
||||
// TODO : this should probably be handled in the GUI
|
||||
|
||||
@@ -41,10 +41,6 @@ void rotaryEncoderInit();
|
||||
void rotaryEncoderCheck();
|
||||
#endif
|
||||
|
||||
#if defined(RADIO_ZORRO)
|
||||
#define ROTARY_ENCODER_INVERT
|
||||
#endif
|
||||
|
||||
#define FLASHSIZE 0x80000
|
||||
#define BOOTLOADER_SIZE 0x8000
|
||||
#define FIRMWARE_ADDRESS 0x08000000
|
||||
|
||||
@@ -474,6 +474,7 @@ const char STR_OWN[] = TR_OWN;
|
||||
const char STR_DATE[] = TR_DATE;
|
||||
const char STR_CHANNELS_MONITOR[] = TR_CHANNELS_MONITOR;
|
||||
const char STR_ROTARY_ENCODER[] = TR_ROTARY_ENCODER;
|
||||
const char STR_INVERT_ROTARY[] = TR_INVERT_ROTARY;
|
||||
const char STR_MIXERS_MONITOR[] = TR_MIXERS_MONITOR;
|
||||
const char STR_PATH_TOO_LONG[] = TR_PATH_TOO_LONG;
|
||||
const char STR_VIEW_TEXT[] = TR_VIEW_TEXT;
|
||||
|
||||
@@ -721,6 +721,7 @@ extern const char STR_GLOBAL_VAR[];
|
||||
extern const char STR_OWN[];
|
||||
extern const char STR_DATE[];
|
||||
extern const char STR_ROTARY_ENCODER[];
|
||||
extern const char STR_INVERT_ROTARY[];
|
||||
extern const char STR_CHANNELS_MONITOR[];
|
||||
extern const char STR_MIXERS_MONITOR[];
|
||||
extern const char STR_PATH_TOO_LONG[];
|
||||
|
||||
@@ -808,6 +808,7 @@
|
||||
#define TR_MONTH "月"
|
||||
#define TR_DAY "日"
|
||||
#define TR_ROTARY_ENCODER "滚轮"
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "通道查看器"
|
||||
#define TR_MIXERS_MONITOR "混控查看器"
|
||||
#define TR_PATH_TOO_LONG "路径太长"
|
||||
|
||||
@@ -848,6 +848,7 @@
|
||||
#define TR_DATE "Datum"
|
||||
#define TR_MONTHS { "Led", "Úno", "Bře", "Dub", "Kvě", "Čvn", "Čvc", "Srp", "Zář", "Říj", "Lis", "Pro" }
|
||||
#define TR_ROTARY_ENCODER "R.Enko"
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "MONITOR KANÁLU"
|
||||
#define TR_MIXERS_MONITOR "MONITOR MIXU"
|
||||
#define TR_PATH_TOO_LONG "Cesta je moc dlouhá"
|
||||
|
||||
@@ -850,6 +850,7 @@
|
||||
#define TR_DATE "Datum:"
|
||||
#define TR_MONTHS { "Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez" }
|
||||
#define TR_ROTARY_ENCODER "Drehgeber"
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "Kanal-Monitor==>"
|
||||
#define TR_MIXERS_MONITOR "==>Mischer Monitor"
|
||||
#define TR_PATH_TOO_LONG "Pfad zu Lang"
|
||||
|
||||
@@ -855,6 +855,7 @@
|
||||
#define TR_DATE "Date"
|
||||
#define TR_MONTHS { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }
|
||||
#define TR_ROTARY_ENCODER "R.E."
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "CHANNELS MONITOR"
|
||||
#define TR_MIXERS_MONITOR "MIXERS MONITOR"
|
||||
#define TR_PATH_TOO_LONG "Path too long"
|
||||
|
||||
@@ -853,6 +853,7 @@
|
||||
#define TR_DATE "Fecha"
|
||||
#define TR_MONTHS { "Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic" }
|
||||
#define TR_ROTARY_ENCODER "R.E."
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "MONITOR CANALES"
|
||||
#define TR_MIXERS_MONITOR "MONITOR MEZCLAS"
|
||||
#define TR_PATH_TOO_LONG "Path muy largo"
|
||||
|
||||
@@ -866,6 +866,7 @@
|
||||
#define TR_DATE "Date"
|
||||
#define TR_MONTHS { "Jan", "Fev", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }
|
||||
#define TR_ROTARY_ENCODER "R.E."
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "CHANNELS MONITOR"
|
||||
#define TR_MIXERS_MONITOR "MIXERS MONITOR"
|
||||
#define TR_PATH_TOO_LONG "Path too long"
|
||||
|
||||
@@ -871,6 +871,7 @@
|
||||
#define TR_DATE "Date"
|
||||
#define TR_MONTHS { "Jan", "Fév", "Mar", "Avr", "Mai", "Jun", "Jul", "Aou", "Sep", "Oct", "Nov", "Dec" }
|
||||
#define TR_ROTARY_ENCODER "Enc.Rot."
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "MONITEUR CANAUX"
|
||||
#define TR_MIXERS_MONITOR "MONITEUR MIXAGES "
|
||||
#define TR_PATH_TOO_LONG "Chemin trop long"
|
||||
|
||||
@@ -872,6 +872,7 @@
|
||||
#define TR_DATE "Data"
|
||||
#define TR_MONTHS { "Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic" }
|
||||
#define TR_ROTARY_ENCODER "R.E."
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "MONITOR CANALI"
|
||||
#define TR_MIXERS_MONITOR "MONITOR MIXER"
|
||||
#define TR_PATH_TOO_LONG "Path troppo lungo"
|
||||
|
||||
@@ -858,6 +858,7 @@
|
||||
#define TR_DATE "Datum:"
|
||||
#define TR_MONTHS { "Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec" }
|
||||
#define TR_ROTARY_ENCODER "Draaischakelaar"
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "Kanaal-Monitor==>"
|
||||
#define TR_MIXERS_MONITOR "==>MIXERS MONitor"
|
||||
#define TR_PATH_TOO_LONG "Pad te Lang"
|
||||
|
||||
@@ -869,6 +869,7 @@
|
||||
#define TR_DATE "Data"
|
||||
#define TR_MONTHS { "Jan", "Fev", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }
|
||||
#define TR_ROTARY_ENCODER "R.E."
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "MONITOR KANAŁÓW"
|
||||
#define TR_MIXERS_MONITOR "MONITOR MIKSER"
|
||||
#define TR_PATH_TOO_LONG "Ścieżka za długa"
|
||||
|
||||
@@ -877,6 +877,7 @@
|
||||
#define TR_DATE "Data"
|
||||
#define TR_MONTHS { "Jan", "Fev", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }
|
||||
#define TR_ROTARY_ENCODER "R.E."
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "CHANNELS MONITOR"
|
||||
#define TR_MIXERS_MONITOR "MIXERS MONITOR"
|
||||
#define TR_PATH_TOO_LONG "Path too long"
|
||||
|
||||
@@ -877,6 +877,7 @@
|
||||
#define TR_DATE "Datum"
|
||||
#define TR_MONTHS { "Jan", "Fev", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }
|
||||
#define TR_ROTARY_ENCODER "R.Enks"
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "Kanalöversikt"
|
||||
#define TR_MIXERS_MONITOR "MIXER-SKÄRM"
|
||||
#define TR_PATH_TOO_LONG "För lång sökväg"
|
||||
|
||||
@@ -809,6 +809,7 @@
|
||||
#define TR_MONTH "月"
|
||||
#define TR_DAY "日"
|
||||
#define TR_ROTARY_ENCODER "滾輪"
|
||||
#define TR_INVERT_ROTARY "Invert Rotary"
|
||||
#define TR_CHANNELS_MONITOR "通道查看器"
|
||||
#define TR_MIXERS_MONITOR "混控查看器"
|
||||
#define TR_PATH_TOO_LONG "路徑太長"
|
||||
|
||||
Reference in New Issue
Block a user