[Companion] Horus analog input names fixed
This commit is contained in:
@@ -789,6 +789,58 @@ int OpenTxFirmware::getCapability(Capability capability)
|
||||
}
|
||||
}
|
||||
|
||||
QString OpenTxFirmware::getAnalogInputName(unsigned int index)
|
||||
{
|
||||
if (index < 4) {
|
||||
const QString sticks[] = { QObject::tr("Rud"),
|
||||
QObject::tr("Ele"),
|
||||
QObject::tr("Thr"),
|
||||
QObject::tr("Ail") };
|
||||
return sticks[index];
|
||||
}
|
||||
|
||||
index -= 4;
|
||||
|
||||
if (IS_9X(board) || IS_2560(board) || IS_SKY9X(board)) {
|
||||
const QString pots[] = { QObject::tr("P1"),
|
||||
QObject::tr("P2"),
|
||||
QObject::tr("P3") };
|
||||
return CHECK_IN_ARRAY(pots, index);
|
||||
}
|
||||
else if (IS_TARANIS_X9E(board)) {
|
||||
const QString pots[] = { QObject::tr("F1"),
|
||||
QObject::tr("F2"),
|
||||
QObject::tr("F3"),
|
||||
QObject::tr("F4"),
|
||||
QObject::tr("S1"),
|
||||
QObject::tr("S2"),
|
||||
QObject::tr("LS"),
|
||||
QObject::tr("RS") };
|
||||
return CHECK_IN_ARRAY(pots, index);
|
||||
}
|
||||
else if (IS_TARANIS(board)) {
|
||||
const QString pots[] = {QObject::tr("S1"),
|
||||
QObject::tr("S2"),
|
||||
QObject::tr("S3"),
|
||||
QObject::tr("LS"),
|
||||
QObject::tr("RS")};
|
||||
return CHECK_IN_ARRAY(pots, index);
|
||||
}
|
||||
else if (IS_HORUS(board)) {
|
||||
const QString pots[] = {QObject::tr("S1"),
|
||||
QObject::tr("6P"),
|
||||
QObject::tr("S2"),
|
||||
QObject::tr("L1"),
|
||||
QObject::tr("L2"),
|
||||
QObject::tr("LS"),
|
||||
QObject::tr("RS")};
|
||||
return CHECK_IN_ARRAY(pots, index);
|
||||
}
|
||||
else {
|
||||
return "???";
|
||||
}
|
||||
}
|
||||
|
||||
Firmware::Switch OpenTxFirmware::getSwitch(unsigned int index)
|
||||
{
|
||||
if (board == BOARD_X7D) {
|
||||
|
||||
Reference in New Issue
Block a user