Merge pull request #6618 from opentx/bsongis/x9dp_2019_companion_support
X9D+ 2019 Companion support
This commit is contained in:
@@ -70,6 +70,7 @@ uint32_t Boards::getFourCC(Type board)
|
||||
return 0x3578746F;
|
||||
case BOARD_TARANIS_X9D:
|
||||
case BOARD_TARANIS_X9DP:
|
||||
case BOARD_TARANIS_X9DP_2019:
|
||||
return 0x3378746F;
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
return 0x3C78746F;
|
||||
@@ -113,6 +114,7 @@ const int Boards::getEEpromSize(Board::Type board)
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
case BOARD_TARANIS_X9D:
|
||||
case BOARD_TARANIS_X9DP:
|
||||
case BOARD_TARANIS_X9DP_2019:
|
||||
case BOARD_TARANIS_X9E:
|
||||
case BOARD_JUMPER_T12:
|
||||
return EESIZE_TARANIS;
|
||||
@@ -147,6 +149,7 @@ const int Boards::getFlashSize(Type board)
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
case BOARD_TARANIS_X9D:
|
||||
case BOARD_TARANIS_X9DP:
|
||||
case BOARD_TARANIS_X9DP_2019:
|
||||
case BOARD_TARANIS_X9E:
|
||||
case BOARD_JUMPER_T12:
|
||||
return FSIZE_TARANIS;
|
||||
@@ -223,7 +226,7 @@ const SwitchInfo Boards::getSwitchInfo(Board::Type board, int index)
|
||||
{SWITCH_2POS, "SF"},
|
||||
{SWITCH_3POS, "SG"},
|
||||
{SWITCH_TOGGLE, "SH"},
|
||||
{SWITCH_3POS, "SI"},
|
||||
{board == Board::BOARD_TARANIS_X9DP_2019 ? SWITCH_TOGGLE : SWITCH_3POS, "SI"},
|
||||
{SWITCH_3POS, "SJ"},
|
||||
{SWITCH_3POS, "SK"},
|
||||
{SWITCH_3POS, "SL"},
|
||||
@@ -318,6 +321,8 @@ const int Boards::getCapability(Board::Type board, Board::Capability capability)
|
||||
return 6;
|
||||
else if (IS_TARANIS_XLITE(board))
|
||||
return 4;
|
||||
else if (board == Board::BOARD_TARANIS_X9DP_2019)
|
||||
return 9;
|
||||
else if (IS_HORUS_OR_TARANIS(board))
|
||||
return 8;
|
||||
else
|
||||
@@ -483,6 +488,8 @@ const QString Boards::getBoardName(Board::Type board)
|
||||
return "Taranis X9D";
|
||||
case BOARD_TARANIS_X9DP:
|
||||
return "Taranis X9D+";
|
||||
case BOARD_TARANIS_X9DP_2019:
|
||||
return "Taranis X9D+ 2019";
|
||||
case BOARD_TARANIS_X9E:
|
||||
return "Taranis X9E";
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
|
||||
@@ -42,13 +42,14 @@ namespace Board {
|
||||
BOARD_TARANIS_X7,
|
||||
BOARD_TARANIS_X9D,
|
||||
BOARD_TARANIS_X9DP,
|
||||
BOARD_TARANIS_X9DP_2019,
|
||||
BOARD_TARANIS_X9E,
|
||||
BOARD_X12S,
|
||||
BOARD_X10,
|
||||
BOARD_TARANIS_XLITE,
|
||||
BOARD_TARANIS_XLITES,
|
||||
BOARD_TARANIS_X9LITE,
|
||||
BOARD_JUMPER_T12
|
||||
BOARD_JUMPER_T12,
|
||||
};
|
||||
|
||||
constexpr int BOARD_TYPE_MAX = BOARD_JUMPER_T12 ;
|
||||
@@ -196,8 +197,8 @@ class Boards
|
||||
#define IS_TARANIS_XLITES(board) (board==Board::BOARD_TARANIS_XLITES)
|
||||
#define IS_TARANIS_X7(board) (board==Board::BOARD_TARANIS_X7)
|
||||
#define IS_TARANIS_X9LITE(board) (board==Board::BOARD_TARANIS_X9LITE)
|
||||
#define IS_TARANIS_X9(board) (board==Board::BOARD_TARANIS_X9D || board==Board::BOARD_TARANIS_X9DP || board==Board::BOARD_TARANIS_X9E)
|
||||
#define IS_TARANIS_X9D(board) (board==Board::BOARD_TARANIS_X9D || board==Board::BOARD_TARANIS_X9DP)
|
||||
#define IS_TARANIS_X9(board) (board==Board::BOARD_TARANIS_X9D || board==Board::BOARD_TARANIS_X9DP || board==Board::BOARD_TARANIS_X9DP_2019 || board==Board::BOARD_TARANIS_X9E)
|
||||
#define IS_TARANIS_X9D(board) (board==Board::BOARD_TARANIS_X9D || board==Board::BOARD_TARANIS_X9DP || board==Board::BOARD_TARANIS_X9DP_2019)
|
||||
#define IS_TARANIS_PLUS(board) (board==Board::BOARD_TARANIS_X9DP || board==Board::BOARD_TARANIS_X9E)
|
||||
#define IS_TARANIS_X9E(board) (board==Board::BOARD_TARANIS_X9E)
|
||||
#define IS_TARANIS(board) (IS_TARANIS_X9(board) || IS_TARANIS_X7(board) || IS_TARANIS_X9LITE(board) || IS_TARANIS_XLITE(board) || IS_JUMPER_T12(board))
|
||||
|
||||
@@ -72,6 +72,8 @@ const char * OpenTxEepromInterface::getName()
|
||||
return "OpenTX for FrSky Taranis X9D";
|
||||
case BOARD_TARANIS_X9DP:
|
||||
return "OpenTX for FrSky Taranis X9D+";
|
||||
case BOARD_TARANIS_X9DP_2019:
|
||||
return "OpenTX for FrSky Taranis X9D+ 2019";
|
||||
case BOARD_TARANIS_X9E:
|
||||
return "OpenTX for FrSky Taranis X9E";
|
||||
case BOARD_TARANIS_X7:
|
||||
@@ -1209,6 +1211,12 @@ void registerOpenTxFirmwares()
|
||||
addPPMInternalModuleHack(firmware);
|
||||
registerOpenTxFirmware(firmware);
|
||||
|
||||
/* FrSky Taranis X9D+ 2019 board */
|
||||
firmware = new OpenTxFirmware("opentx-x9d+2019", Firmware::tr("FrSky Taranis X9D+ 2019"), BOARD_TARANIS_X9DP_2019);
|
||||
addOpenTxTaranisOptions(firmware);
|
||||
addPPMInternalModuleHack(firmware);
|
||||
registerOpenTxFirmware(firmware);
|
||||
|
||||
/* FrSky Taranis X9D board */
|
||||
firmware = new OpenTxFirmware("opentx-x9d", Firmware::tr("FrSky Taranis X9D"), BOARD_TARANIS_X9D);
|
||||
firmware->addOption("haptic", Firmware::tr("Haptic module installed"));
|
||||
|
||||
@@ -128,13 +128,13 @@ RawSourceRange RawSource::getRange(const ModelData * model, const GeneralSetting
|
||||
case TELEMETRY_SOURCE_T2_MAX:
|
||||
result.min = -30;
|
||||
result.max = 225;
|
||||
result.unit = trUtf8("°C");
|
||||
result.unit = tr("°C");
|
||||
break;
|
||||
case TELEMETRY_SOURCE_HDG:
|
||||
result.step = 2;
|
||||
result.max = 360;
|
||||
result.offset = 256;
|
||||
result.unit = trUtf8("°");
|
||||
result.unit = tr("°");
|
||||
break;
|
||||
case TELEMETRY_SOURCE_RPM:
|
||||
case TELEMETRY_SOURCE_RPM_MAX:
|
||||
|
||||
@@ -52,9 +52,9 @@ QString SensorData::unitString() const
|
||||
case UNIT_FEET:
|
||||
return tr("f");
|
||||
case UNIT_CELSIUS:
|
||||
return trUtf8("°C");
|
||||
return tr("°C");
|
||||
case UNIT_FAHRENHEIT:
|
||||
return trUtf8("°F");
|
||||
return tr("°F");
|
||||
case UNIT_PERCENT:
|
||||
return tr("%");
|
||||
case UNIT_MAH:
|
||||
@@ -70,9 +70,9 @@ QString SensorData::unitString() const
|
||||
case UNIT_G:
|
||||
return tr("g");
|
||||
case UNIT_DEGREE:
|
||||
return trUtf8("°");
|
||||
return tr("°");
|
||||
case UNIT_RADIANS:
|
||||
return trUtf8("Rad");
|
||||
return tr("Rad");
|
||||
case UNIT_HOURS:
|
||||
return tr("hours");
|
||||
case UNIT_MINUTES:
|
||||
|
||||
@@ -443,7 +443,7 @@ void Helpers::populateFileComboBox(QComboBox * b, const QSet<QString> & set, con
|
||||
bool added = false;
|
||||
// Convert set into list and sort it alphabetically case insensitive
|
||||
QStringList list = QStringList::fromSet(set);
|
||||
qSort(list.begin(), list.end(), caseInsensitiveLessThan);
|
||||
std::sort(list.begin(), list.end(), caseInsensitiveLessThan);
|
||||
foreach (QString entry, list) {
|
||||
b->addItem(entry);
|
||||
if (entry == current) {
|
||||
|
||||
@@ -830,7 +830,7 @@ void LogsDialog::plotLogs()
|
||||
foreach (QModelIndex index, selection) {
|
||||
selectedRows.append(index.row());
|
||||
}
|
||||
qSort(selectedRows.begin(), selectedRows.end());
|
||||
std::sort(selectedRows.begin(), selectedRows.end());
|
||||
} else {
|
||||
hasLogSelection = false;
|
||||
rowCount = ui->logTable->rowCount();
|
||||
|
||||
@@ -323,13 +323,13 @@ QString MainWindow::seekCodeString(const QByteArray & qba, const QString & label
|
||||
{
|
||||
int posLabel = qba.indexOf(label);
|
||||
if (posLabel < 0)
|
||||
return QString::null;
|
||||
return QString();
|
||||
int start = qba.indexOf("\"", posLabel + label.length());
|
||||
if (start < 0)
|
||||
return QString::null;
|
||||
return QString();
|
||||
int end = qba.indexOf("\"", start + 1);
|
||||
if (end < 0)
|
||||
return QString::null;
|
||||
return QString();
|
||||
return qba.mid(start + 1, end - start - 1);
|
||||
}
|
||||
|
||||
@@ -529,10 +529,10 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
|
||||
QAbstractButton *rnButton = nullptr;
|
||||
msgBox.setText(tr("Firmware %1 does not seem to have ever been downloaded.\nVersion %2 is available.\nDo you want to download it now?\n\nWe recommend you view the release notes using the button below to learn about any changes that may be important to you.")
|
||||
.arg(Firmware::getCurrentVariant()->getId()).arg(fullVersionString));
|
||||
QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole);
|
||||
msgBox.addButton(trUtf8("No"), QMessageBox::NoRole);
|
||||
QAbstractButton *YesButton = msgBox.addButton(tr("Yes"), QMessageBox::YesRole);
|
||||
msgBox.addButton(tr("No"), QMessageBox::NoRole);
|
||||
if (!rn.isEmpty()) {
|
||||
rnButton = msgBox.addButton(trUtf8("Release Notes"), QMessageBox::ActionRole);
|
||||
rnButton = msgBox.addButton(tr("Release Notes"), QMessageBox::ActionRole);
|
||||
}
|
||||
msgBox.setIcon(QMessageBox::Question);
|
||||
msgBox.resize(0, 0);
|
||||
@@ -558,10 +558,10 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
|
||||
QAbstractButton *rnButton = nullptr;
|
||||
msgBox.setText(tr("A new version of %1 firmware is available:\n - current is %2\n - newer is %3\n\nDo you want to download it now?\n\nWe recommend you view the release notes using the button below to learn about any changes that may be important to you.")
|
||||
.arg(Firmware::getCurrentVariant()->getId()).arg(currentVersionString).arg(fullVersionString));
|
||||
QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole);
|
||||
msgBox.addButton(trUtf8("No"), QMessageBox::NoRole);
|
||||
QAbstractButton *YesButton = msgBox.addButton(tr("Yes"), QMessageBox::YesRole);
|
||||
msgBox.addButton(tr("No"), QMessageBox::NoRole);
|
||||
if (!rn.isEmpty()) {
|
||||
rnButton = msgBox.addButton(trUtf8("Release Notes"), QMessageBox::ActionRole);
|
||||
rnButton = msgBox.addButton(tr("Release Notes"), QMessageBox::ActionRole);
|
||||
}
|
||||
msgBox.setIcon(QMessageBox::Question);
|
||||
msgBox.resize(0,0);
|
||||
|
||||
@@ -483,7 +483,7 @@ void InputsPanel::expolistWidget_doubleClicked(QModelIndex index)
|
||||
|
||||
void InputsPanel::exposDeleteList(QList<int> list, bool clearName)
|
||||
{
|
||||
qSort(list.begin(), list.end());
|
||||
std::sort(list.begin(), list.end());
|
||||
|
||||
int iDec = 0;
|
||||
foreach(int idx, list) {
|
||||
|
||||
@@ -222,7 +222,7 @@ void MixesPanel::mixerlistWidget_doubleClicked(QModelIndex index)
|
||||
|
||||
void MixesPanel::mixersDeleteList(QList<int> list)
|
||||
{
|
||||
qSort(list.begin(), list.end());
|
||||
std::sort(list.begin(), list.end());
|
||||
|
||||
int iDec = 0;
|
||||
foreach(int idx, list) {
|
||||
|
||||
@@ -160,11 +160,11 @@ void Node::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
|
||||
if (option->state & QStyle::State_Sunken) {
|
||||
gradient.setCenter(ballHeight, ballHeight);
|
||||
gradient.setFocalPoint(ballHeight, ballHeight);
|
||||
gradient.setColorAt(1, nodecolor.light(180));
|
||||
gradient.setColorAt(0, nodecolor.light(120));
|
||||
gradient.setColorAt(1, nodecolor.lighter(180));
|
||||
gradient.setColorAt(0, nodecolor.lighter(120));
|
||||
} else {
|
||||
gradient.setColorAt(0, nodecolor);
|
||||
gradient.setColorAt(1, nodecolor.dark(120));
|
||||
gradient.setColorAt(1, nodecolor.darker(120));
|
||||
}
|
||||
painter->setBrush(gradient);
|
||||
painter->setPen(QPen(Qt::black, 0));
|
||||
|
||||
@@ -925,7 +925,7 @@ SetupPanel::SetupPanel(QWidget * parent, ModelData & model, GeneralSettings & ge
|
||||
prevFocus = timers[i]->getLastFocus();
|
||||
}
|
||||
else {
|
||||
foreach(QLabel *label, findChildren<QLabel *>(QRegExp(QString("label_timer%1").arg(i+1)))) {
|
||||
foreach(QLabel *label, findChildren<QLabel *>(QRegularExpression(QString("label_timer%1").arg(i+1)))) {
|
||||
label->hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,14 +45,14 @@ joystickDialog::joystickDialog(QWidget *parent, int stick) :
|
||||
};
|
||||
memcpy(jscal, jscaltmp, sizeof (jscal));
|
||||
|
||||
foreach(QComboBox *cb, findChildren<QComboBox *>(QRegExp("jsmapCB_[0-9]+"))) {
|
||||
foreach(QComboBox *cb, findChildren<QComboBox *>(QRegularExpression("jsmapCB_[0-9]+"))) {
|
||||
populateSourceCombo(cb);
|
||||
sticks[cb->property("channel").toUInt()] = cb;
|
||||
}
|
||||
foreach(QCheckBox *ib, findChildren<QCheckBox *>(QRegExp("ChInv_[0-9]+"))) {
|
||||
foreach(QCheckBox *ib, findChildren<QCheckBox *>(QRegularExpression("ChInv_[0-9]+"))) {
|
||||
invert[ib->property("channel").toUInt()] = ib;
|
||||
}
|
||||
foreach(QSlider *sl, findChildren<QSlider *>(QRegExp("Ch_[0-9]+"))) {
|
||||
foreach(QSlider *sl, findChildren<QSlider *>(QRegularExpression("Ch_[0-9]+"))) {
|
||||
sliders[sl->property("channel").toUInt()] = sl;
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,11 @@ QWidget * RadioOutputsWidget::createLogicalSwitch(QWidget * parent, int switchNo
|
||||
QFont font = swtch->font();
|
||||
font.setBold(true);
|
||||
swtch->setFont(font);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
|
||||
swtch->setMinimumWidth(swtch->fontMetrics().width("99") + 10);
|
||||
#else
|
||||
swtch->setMinimumWidth(swtch->fontMetrics().horizontalAdvance("99") + 10);
|
||||
#endif
|
||||
font.setBold(false);
|
||||
swtch->setFont(font);
|
||||
swtch->setText(QString("%1").arg(switchNo+1, 2, 10, QChar('0')));
|
||||
|
||||
@@ -100,7 +100,7 @@ void SimulatorLoader::registerSimulators()
|
||||
path.truncate(path.lastIndexOf('\\'));
|
||||
dir.setPath(path);
|
||||
#else
|
||||
dir = SIMULATOR_LIB_SEARCH_PATH;
|
||||
dir.setPath(SIMULATOR_LIB_SEARCH_PATH);
|
||||
#endif
|
||||
registerSimulators(dir);
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ SimulatorWidget::SimulatorWidget(QWidget * parent, SimulatorInterface * simulato
|
||||
break;
|
||||
case Board::BOARD_TARANIS_X9D:
|
||||
case Board::BOARD_TARANIS_X9DP:
|
||||
case Board::BOARD_TARANIS_X9DP_2019:
|
||||
radioUiWidget = new SimulatedUIWidgetX9(simulator, this);
|
||||
break;
|
||||
case Board::BOARD_TARANIS_XLITE:
|
||||
|
||||
@@ -444,7 +444,11 @@ QLayout *VirtualJoystickWidget::createNodeValueLayout(QChar type, QLabel *& valL
|
||||
val->setObjectName(QString("val_%1").arg(type));
|
||||
val->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||
val->setAlignment(Qt::AlignCenter);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
|
||||
val->setMinimumWidth(val->fontMetrics().width("-100 "));
|
||||
#else
|
||||
val->setMinimumWidth(val->fontMetrics().horizontalAdvance("-100 "));
|
||||
#endif
|
||||
QVBoxLayout * layout = new QVBoxLayout();
|
||||
layout->setContentsMargins(2, 2, 2, 2);
|
||||
layout->setSpacing(2);
|
||||
|
||||
@@ -6,6 +6,7 @@ import sys
|
||||
import subprocess
|
||||
import shutil
|
||||
import filelock
|
||||
|
||||
from fwoptions import *
|
||||
|
||||
# Error codes
|
||||
@@ -100,6 +101,14 @@ elif options[optcount] == "x9d+":
|
||||
maxsize = 65536 * 8
|
||||
board = BOARD_TARANIS
|
||||
board_family = BOARD_FAMILY_ARM
|
||||
elif options[optcount] == "x9d+2019":
|
||||
command_options["PCB"] = "X9D+"
|
||||
command_options["PCBREV"] = "2019"
|
||||
command_options["MULTI_SPORT"] = "ON"
|
||||
firmware_options = options_taranis_x9dp
|
||||
maxsize = 65536 * 8
|
||||
board = BOARD_TARANIS
|
||||
board_family = BOARD_FAMILY_ARM
|
||||
elif options[optcount] == "x9e":
|
||||
command_options["PCB"] = "X9E"
|
||||
command_options["MULTI_SPORT"] = "ON"
|
||||
|
||||
@@ -35,7 +35,7 @@ docker run -dit --name companion -v /home/opentx/${docker}:/opentx ${docker}
|
||||
docker exec companion sh -c "mkdir -p build && cd build && cmake /opentx/code && cp radio/src/stamp.h /opentx/binaries/stamp-opentx.txt"
|
||||
cp -f ${workdir}/binaries/stamp-opentx.txt ${output}/firmware
|
||||
# These radios are currently not enabled
|
||||
echo "#define BLOCK \"x9d,x9d+,x9e,x10,x12s\"" >> ${output}/firmware/stamp-opentx.txt
|
||||
echo "#define BLOCK \"x10,x12s\"" >> ${output}/firmware/stamp-opentx.txt
|
||||
docker exec companion rm -rf build
|
||||
|
||||
echo "Check if Linux companion is needed"
|
||||
|
||||
Reference in New Issue
Block a user