feat: Jumper T15 support (#5113)

Co-authored-by: 3djc <3djc@gh.com>
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
3djc
2024-06-07 17:51:49 +10:00
committed by GitHub
co-authored by 3djc philmoz
parent f6f6d2a85a
commit 26c96ccdd0
83 changed files with 3354 additions and 136 deletions
+2
View File
@@ -336,6 +336,8 @@ elseif(PCB STREQUAL X10 AND PCBREV STREQUAL TX16S)
set(FLAVOUR tx16s)
elseif(PCB STREQUAL X7 AND PCBREV STREQUAL T14)
set(FLAVOUR t14)
elseif(PCB STREQUAL X10 AND PCBREV STREQUAL T15)
set(FLAVOUR t15)
elseif(PCB STREQUAL X10 AND PCBREV STREQUAL T16)
set(FLAVOUR t16)
elseif(PCB STREQUAL X10 AND PCBREV STREQUAL T18)
+7
View File
@@ -261,6 +261,13 @@
<file>images/simulator/JumperT14/left.png</file>
<file>images/simulator/JumperT14/right.png</file>
<file>images/simulator/JumperT14/top.png</file>
<file>images/simulator/JumperT15/left.png</file>
<file>images/simulator/JumperT15/right.png</file>
<file>images/simulator/JumperT15/top.png</file>
<file>images/simulator/JumperT15/bottom.png</file>
<file>images/simulator/JumperT15/model.png</file>
<file>images/simulator/JumperT15/exit.png</file>
<file>images/simulator/JumperT15/page.png</file>
<file>images/simulator/JumperT16/left.png</file>
<file>images/simulator/JumperT16/right.png</file>
<file>images/simulator/JumperT16/top.png</file>
+5
View File
@@ -202,6 +202,7 @@ int Boards::getEEpromSize(Board::Type board)
case BOARD_HORUS_X12S:
case BOARD_X10:
case BOARD_X10_EXPRESS:
case BOARD_JUMPER_T15:
case BOARD_JUMPER_T16:
case BOARD_JUMPER_T18:
case BOARD_RADIOMASTER_TX16S:
@@ -252,6 +253,7 @@ int Boards::getFlashSize(Type board)
case BOARD_HORUS_X12S:
case BOARD_X10:
case BOARD_X10_EXPRESS:
case BOARD_JUMPER_T15:
case BOARD_JUMPER_T16:
case BOARD_JUMPER_T18:
case BOARD_RADIOMASTER_TX16S:
@@ -532,6 +534,8 @@ QString Boards::getBoardName(Board::Type board)
return "Jumper T-Pro V2";
case BOARD_JUMPER_T14:
return "Jumper T14";
case BOARD_JUMPER_T15:
return "Jumper T15";
case BOARD_JUMPER_T16:
return "Jumper T16";
case BOARD_JUMPER_T18:
@@ -668,6 +672,7 @@ int Boards::getDefaultInternalModules(Board::Type board)
case BOARD_RADIOMASTER_TX12_MK2:
case BOARD_IFLIGHT_COMMANDO8:
case BOARD_JUMPER_T14:
case BOARD_JUMPER_T15:
case BOARD_JUMPER_T20:
case BOARD_JUMPER_T20V2:
return (int)MODULE_TYPE_CROSSFIRE;
+7 -1
View File
@@ -62,6 +62,7 @@ namespace Board {
BOARD_TARANIS_X9LITES,
BOARD_JUMPER_T12,
BOARD_JUMPER_T14,
BOARD_JUMPER_T15,
BOARD_JUMPER_T16,
BOARD_RADIOMASTER_TX16S,
BOARD_JUMPER_T18,
@@ -434,6 +435,11 @@ inline bool IS_JUMPER_TPROV2(Board::Type board)
return board == Board::BOARD_JUMPER_TPROV2;
}
inline bool IS_JUMPER_T15(Board::Type board)
{
return board == Board::BOARD_JUMPER_T15;
}
inline bool IS_JUMPER_T16(Board::Type board)
{
return board == Board::BOARD_JUMPER_T16;
@@ -492,7 +498,7 @@ inline bool IS_RADIOMASTER_T8(Board::Type board)
inline bool IS_FAMILY_T16(Board::Type board)
{
return board == Board::BOARD_JUMPER_T16 || board == Board::BOARD_RADIOMASTER_TX16S || board == Board::BOARD_JUMPER_T18;
return board == Board::BOARD_JUMPER_T15 || board == Board::BOARD_JUMPER_T16 || board == Board::BOARD_RADIOMASTER_TX16S || board == Board::BOARD_JUMPER_T18;
}
inline bool IS_FAMILY_T12(Board::Type board)
@@ -70,6 +70,8 @@ const char * OpenTxEepromInterface::getName()
return "EdgeTX for Jumper T-Pro V2";
case BOARD_JUMPER_T14:
return "EdgeTX for Jumper T14";
case BOARD_JUMPER_T15:
return "EdgeTX for Jumper T15";
case BOARD_JUMPER_T16:
return "EdgeTX for Jumper T16";
case BOARD_JUMPER_T18:
@@ -710,7 +712,7 @@ int OpenTxFirmware::getCapability(::Capability capability)
case LcdHeight:
if (IS_FLYSKY_NV14(board) || IS_FLYSKY_EL18(board))
return 480;
else if (IS_FLYSKY_PL18(board))
else if (IS_FLYSKY_PL18(board) || IS_JUMPER_T15(board))
return 320;
else if (IS_FAMILY_HORUS_OR_T16(board))
return 272;
@@ -1440,6 +1442,12 @@ void registerOpenTxFirmwares()
addOpenTxRfOptions(firmware, NONE);
registerOpenTxFirmware(firmware);
/* Jumper T15 board */
firmware = new OpenTxFirmware(FIRMWAREID("t15"), Firmware::tr("Jumper T15"), BOARD_JUMPER_T15);
addOpenTxFrskyOptions(firmware);
addOpenTxRfOptions(firmware, FLEX);
registerOpenTxFirmware(firmware);
/* Jumper T16 board */
firmware = new OpenTxFirmware(FIRMWAREID("t16"), Firmware::tr("Jumper T16 / T16+ / T16 Pro"), BOARD_JUMPER_T16);
addOpenTxFrskyOptions(firmware);
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

+1
View File
@@ -35,6 +35,7 @@ set(${PROJECT_NAME}_SRCS
simulateduiwidgetEL18.cpp
simulateduiwidgetJumperT12.cpp
simulateduiwidgetJumperT14.cpp
simulateduiwidgetJumperT15.cpp
simulateduiwidgetJumperT16.cpp
simulateduiwidgetJumperT18.cpp
simulateduiwidgetJumperT20.cpp
@@ -145,6 +145,7 @@ namespace Ui {
class SimulatedUIWidgetJumperTLITE;
class SimulatedUIWidgetJumperTPRO;
class SimulatedUIWidgetJumperT14;
class SimulatedUIWidgetJumperT15;
class SimulatedUIWidgetJumperT16;
class SimulatedUIWidgetJumperT18;
class SimulatedUIWidgetJumperT20;
@@ -331,6 +332,18 @@ class SimulatedUIWidgetJumperTPRO: public SimulatedUIWidget
Ui::SimulatedUIWidgetJumperTPRO * ui;
};
class SimulatedUIWidgetJumperT15: public SimulatedUIWidget
{
Q_OBJECT
public:
explicit SimulatedUIWidgetJumperT15(SimulatorInterface * simulator, QWidget * parent = nullptr);
virtual ~SimulatedUIWidgetJumperT15();
private:
Ui::SimulatedUIWidgetJumperT15 * ui;
};
class SimulatedUIWidgetJumperT16: 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_simulateduiwidgetJumperT15.h"
SimulatedUIWidgetJumperT15::SimulatedUIWidgetJumperT15(SimulatorInterface *simulator, QWidget * parent):
SimulatedUIWidget(simulator, parent),
ui(new Ui::SimulatedUIWidgetJumperT15)
{
RadioUiAction * act;
ui->setupUi(this);
// add actions in order of appearance on the help menu
act = new RadioUiAction(KEY_MODEL, QList<int>() << Qt::Key_Up, SIMU_STR_HLP_KEY_UP, SIMU_STR_HLP_ACT_MDL);
addRadioWidget(ui->leftbuttons->addArea(QRect(80, 120, 100, 60), "JumperT15/model.png", act));
act = new RadioUiAction(KEY_SYS, QList<int>() << Qt::Key_Left, SIMU_STR_HLP_KEY_LFT, SIMU_STR_HLP_ACT_SYS);
addRadioWidget(ui->leftbuttons->addArea(QRect(40, 55, 140, 40), "JumperT15/left.png", act));
act = new RadioUiAction(KEY_TELE, QList<int>() << Qt::Key_Right, SIMU_STR_HLP_KEY_RGT, SIMU_STR_HLP_ACT_TELE);
addRadioWidget(ui->rightbuttons->addArea(QRect(75, 55, 140, 40), "JumperT15/right.png", act));
act = new RadioUiAction(KEY_EXIT, 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->leftbuttons->addArea(QRect(80, 310, 100, 60), "JumperT15/exit.png", act));
act = new RadioUiAction(KEY_PAGEDN, QList<int>() << Qt::Key_PageDown, SIMU_STR_HLP_KEY_PGDN, SIMU_STR_HLP_ACT_PGDN);
addRadioWidget(ui->leftbuttons->addArea(QRect(50, 210, 100, 60), "JumperT15/page.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(KEY_ENTER, QList<int>() << Qt::Key_Enter << Qt::Key_Return, SIMU_STR_HLP_KEYS_ACTIVATE, SIMU_STR_HLP_ACT_ROT_DN);
addRadioWidget(ui->rightbuttons->addArea(QRect(80, 160, 100, 170), "JumperT15/right.png", m_mouseMidClickAction));
//addRadioWidget(ui->leftbuttons->addArea(QRect(10, 252, 30, 30), "JumperT15/left_scrnsht.png", m_screenshotAction));
m_backlightColors << QColor(47, 123, 227);
setLcd(ui->lcd);
}
SimulatedUIWidgetJumperT15::~SimulatedUIWidgetJumperT15()
{
delete ui;
}
@@ -0,0 +1,206 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SimulatedUIWidgetJumperT15</class>
<widget class="QWidget" name="SimulatedUIWidgetJumperT15">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1000</width>
<height>520</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>1000</width>
<height>520</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>1000</width>
<height>520</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<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>260</width>
<height>520</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>260</width>
<height>520</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/JumperT15/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>320</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>480</width>
<height>320</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>260</width>
<height>520</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>260</width>
<height>520</height>
</size>
</property>
<property name="mouseTracking">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/JumperT15/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>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>480</width>
<height>100</height>
</size>
</property>
<property name="font">
<font>
<pointsize>5</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/JumperT15/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>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>480</width>
<height>100</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/JumperT15/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>
@@ -108,6 +108,9 @@ SimulatorWidget::SimulatorWidget(QWidget * parent, SimulatorInterface * simulato
case Board::BOARD_JUMPER_T14:
radioUiWidget = new SimulatedUIWidgetJumperT14(simulator, this);
break;
case Board::BOARD_JUMPER_T15:
radioUiWidget = new SimulatedUIWidgetJumperT15(simulator, this);
break;
case Board::BOARD_JUMPER_T16:
radioUiWidget = new SimulatedUIWidgetJumperT16(simulator, this);
break;