Skip to content

Commit

Permalink
feat: Jumper T15 support (#5024)
Browse files Browse the repository at this point in the history
Co-authored-by: philmoz <[email protected]>
Co-authored-by: Peter Feerick <[email protected]>
  • Loading branch information
3 people authored May 24, 2024
1 parent a0445f6 commit 064a510
Show file tree
Hide file tree
Showing 84 changed files with 3,537 additions and 169 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 @@ -203,6 +203,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 @@ -253,6 +254,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 @@ -533,6 +535,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 @@ -671,6 +675,7 @@ int Boards::getDefaultInternalModules(Board::Type board)
case BOARD_JUMPER_T14:
case BOARD_JUMPER_T20:
case BOARD_JUMPER_T20V2:
case BOARD_JUMPER_T15:
return (int)MODULE_TYPE_CROSSFIRE;

case BOARD_FLYSKY_NV14:
Expand Down
9 changes: 8 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 @@ -435,6 +436,12 @@ 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 @@ -493,7 +500,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
11 changes: 10 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 @@ -1433,6 +1435,13 @@ void registerOpenTxFirmwares()
registerOpenTxFirmware(firmware);
addOpenTxRfOptions(firmware, FLEX);

/* Jumper T15 board */
firmware = new OpenTxFirmware(FIRMWAREID("t15"), Firmware::tr("Jumper T15"), BOARD_JUMPER_T15);
addOpenTxFrskyOptions(firmware);
firmware->addOption("bluetooth", Firmware::tr("Support for bluetooth module"));
addOpenTxRfOptions(firmware, FLEX);
registerOpenTxFirmware(firmware);

/* Jumper T14 board */
firmware = new OpenTxFirmware(FIRMWAREID("t14"), Firmware::tr("Jumper T14"), BOARD_JUMPER_T14);
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 @@ -117,6 +117,7 @@ namespace Ui {
class SimulatedUIWidgetJumperTLITE;
class SimulatedUIWidgetJumperTPRO;
class SimulatedUIWidgetJumperT14;
class SimulatedUIWidgetJumperT15;
class SimulatedUIWidgetJumperT16;
class SimulatedUIWidgetJumperT18;
class SimulatedUIWidgetJumperT20;
Expand Down Expand Up @@ -303,6 +304,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(12, 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(14, 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(13, 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(1, 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(5, 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(2, 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 064a510

Please sign in to comment.