Skip to content

Commit

Permalink
feat: Jumper T15 support (#5113)
Browse files Browse the repository at this point in the history
Co-authored-by: 3djc <3djc@gh.com>
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
  • Loading branch information
3 people committed Jun 7, 2024
1 parent f6f6d2a commit 26c96cc
Show file tree
Hide file tree
Showing 83 changed files with 3,354 additions and 136 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
- pl18
- pl18ev
- t12
- t15
- t16
- t18
- t8
Expand Down Expand Up @@ -97,7 +98,7 @@ jobs:
- nv14;el18
- pl18;pl18ev
- t12
- t16;t18
- t15;t16;t18
- t8;zorro;pocket;mt12;commando8
- tlite;tpro;tprov2;lr3pro
- t20;t20v2;t14
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- nv14;el18
- pl18;pl18ev
- t12
- t16;t18
- t15;t16;t18
- t8;zorro;pocket;mt12;commando8
- tlite;tpro;tprov2;lr3pro
- t20;t20v2;t14
Expand Down
2 changes: 2 additions & 0 deletions companion/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions companion/src/companion.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
5 changes: 5 additions & 0 deletions companion/src/firmwares/boards.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 7 additions & 1 deletion companion/src/firmwares/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 9 additions & 1 deletion companion/src/firmwares/opentx/opentxinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added companion/src/images/simulator/JumperT15/left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added companion/src/images/simulator/JumperT15/page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added companion/src/images/simulator/JumperT15/top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions companion/src/simulation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ set(${PROJECT_NAME}_SRCS
simulateduiwidgetEL18.cpp
simulateduiwidgetJumperT12.cpp
simulateduiwidgetJumperT14.cpp
simulateduiwidgetJumperT15.cpp
simulateduiwidgetJumperT16.cpp
simulateduiwidgetJumperT18.cpp
simulateduiwidgetJumperT20.cpp
Expand Down
13 changes: 13 additions & 0 deletions companion/src/simulation/simulateduiwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ namespace Ui {
class SimulatedUIWidgetJumperTLITE;
class SimulatedUIWidgetJumperTPRO;
class SimulatedUIWidgetJumperT14;
class SimulatedUIWidgetJumperT15;
class SimulatedUIWidgetJumperT16;
class SimulatedUIWidgetJumperT18;
class SimulatedUIWidgetJumperT20;
Expand Down Expand Up @@ -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
Expand Down
69 changes: 69 additions & 0 deletions companion/src/simulation/simulateduiwidgetJumperT15.cpp
Original file line number Diff line number Diff line change
@@ -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;
}
Loading

0 comments on commit 26c96cc

Please sign in to comment.