Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Jumper Bumblebee #5599

Merged
merged 16 commits into from
Oct 11, 2024
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
- t12;t12max
- t15;t16;t18
- t8;zorro;pocket;mt12;commando8
- tlite;tpro;tprov2;tpros;lr3pro
- tlite;tpro;tprov2;tpros;bumblebee;lr3pro
- t20;t20v2;t14
- tx12;tx12mk2;boxer
- tx16s
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- t12;t12max
- t15,t16;t18
- t8;zorro;pocket;mt12;commando8
- tlite;tpro;tprov2;tpros;lr3pro
- tlite;tpro;tprov2;tpros;bumblebee;lr3pro
- t20;t20v2;t14
- tx12;tx12mk2;boxer
- tx16s
Expand Down
2 changes: 2 additions & 0 deletions companion/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ elseif(PCB STREQUAL X7 AND PCBREV STREQUAL TPRO)
set(FLAVOUR tpro)
elseif(PCB STREQUAL X7 AND PCBREV STREQUAL TPROV2)
set(FLAVOUR tprov2)
elseif(PCB STREQUAL X7 AND PCBREV STREQUAL BUMBLEBEE)
set(FLAVOUR bumblebee)
elseif(PCB STREQUAL X7 AND PCBREV STREQUAL T20)
set(FLAVOUR t20)
elseif(PCB STREQUAL X7 AND PCBREV STREQUAL T20V2)
Expand Down
8 changes: 8 additions & 0 deletions companion/src/companion.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@
<file>images/simulator/JumperTPROS/exit.png</file>
<file>images/simulator/JumperTPROS/menu.png</file>
<file>images/simulator/JumperTPROS/page.png</file>
<file>images/simulator/JumperBumblebee/top.png</file>
<file>images/simulator/JumperBumblebee/bottom.png</file>
<file>images/simulator/JumperBumblebee/enter.png</file>
<file>images/simulator/JumperBumblebee/exit.png</file>
<file>images/simulator/JumperBumblebee/left.png</file>
<file>images/simulator/JumperBumblebee/menu.png</file>
<file>images/simulator/JumperBumblebee/page.png</file>
<file>images/simulator/JumperBumblebee/right.png</file>
<file>images/simulator/TX12/left.png</file>
<file>images/simulator/TX12/left-pageup.png</file>
<file>images/simulator/TX12/left-pagedn.png</file>
Expand Down
7 changes: 6 additions & 1 deletion companion/src/firmwares/boards.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ int Boards::getEEpromSize(Board::Type board)
case BOARD_JUMPER_TLITE_F4:
case BOARD_JUMPER_TPRO:
case BOARD_JUMPER_TPROV2:
case BOARD_JUMPER_BUMBLEBEE:
case BOARD_JUMPER_TPROS:
case BOARD_RADIOMASTER_TX12:
case BOARD_RADIOMASTER_TX12_MK2:
Expand Down Expand Up @@ -249,6 +250,7 @@ int Boards::getFlashSize(Type board)
case BOARD_JUMPER_TPRO:
case BOARD_JUMPER_TPROV2:
case BOARD_JUMPER_TPROS:
case BOARD_JUMPER_BUMBLEBEE:
case BOARD_RADIOMASTER_TX12:
case BOARD_RADIOMASTER_TX12_MK2:
case BOARD_RADIOMASTER_ZORRO:
Expand Down Expand Up @@ -292,7 +294,7 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
return 8;
else if (IS_JUMPER_TPROV2(board))
return 6;
else if (IS_JUMPER_TLITE(board) || IS_JUMPER_TPROV1(board) || IS_BETAFPV_LR3PRO(board) || IS_IFLIGHT_COMMANDO8(board))
else if (IS_JUMPER_TLITE(board) || IS_JUMPER_TPROV1(board) || IS_BETAFPV_LR3PRO(board) || IS_IFLIGHT_COMMANDO8(board) || IS_JUMPER_BUMBLEBEE(board))
return 4;
else if(IS_RADIOMASTER_ZORRO(board))
return 8;
Expand Down Expand Up @@ -543,6 +545,8 @@ QString Boards::getBoardName(Board::Type board)
return "Jumper T-Pro S";
case BOARD_JUMPER_T12MAX:
return "Jumper T12 MAX";
case BOARD_JUMPER_BUMBLEBEE:
return "Jumper Bumblebee";
case BOARD_JUMPER_T14:
return "Jumper T14";
case BOARD_JUMPER_T15:
Expand Down Expand Up @@ -693,6 +697,7 @@ int Boards::getDefaultInternalModules(Board::Type board)
case BOARD_JUMPER_T20V2:
case BOARD_JUMPER_TPROS:
case BOARD_JUMPER_T15:
case BOARD_JUMPER_BUMBLEBEE:
case BOARD_FATFISH_F16:
return (int)MODULE_TYPE_CROSSFIRE;

Expand Down
7 changes: 7 additions & 0 deletions companion/src/firmwares/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ namespace Board {
BOARD_JUMPER_TPROS,
BOARD_RADIOMASTER_POCKET,
BOARD_JUMPER_T20V2,
BOARD_JUMPER_BUMBLEBEE,
BOARD_FATFISH_F16,
BOARD_TYPE_COUNT,
BOARD_TYPE_MAX = BOARD_TYPE_COUNT - 1
Expand Down Expand Up @@ -439,6 +440,11 @@ inline bool IS_JUMPER_TPROV2(Board::Type board)
return board == Board::BOARD_JUMPER_TPROV2;
}

inline bool IS_JUMPER_BUMBLEBEE(Board::Type board)
{
return board == Board::BOARD_JUMPER_BUMBLEBEE;
}

inline bool IS_JUMPER_TPROS(Board::Type board)
{
return board == Board::BOARD_JUMPER_TPROS;
Expand Down Expand Up @@ -532,6 +538,7 @@ inline bool IS_FAMILY_T12(Board::Type board)
board == Board::BOARD_JUMPER_TPRO ||
board == Board::BOARD_JUMPER_TPROV2 ||
board == Board::BOARD_JUMPER_TPROS ||
board == Board::BOARD_JUMPER_BUMBLEBEE ||
board == Board::BOARD_RADIOMASTER_TX12 ||
board == Board::BOARD_RADIOMASTER_TX12_MK2 ||
board == Board::BOARD_RADIOMASTER_ZORRO ||
Expand Down
8 changes: 4 additions & 4 deletions companion/src/firmwares/opentx/opentxeeprom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ inline int MAX_SWITCHES(Board::Type board, int version)
if (IS_TARANIS_X9D(board))
return 9;

if (IS_JUMPER_TPROV2(board))
return 12;

if (IS_JUMPER_TPROV1(board))
return 10;
return 10;

if (IS_JUMPER_TPROV2(board) || IS_JUMPER_BUMBLEBEE(board))
return 14;

if (IS_FAMILY_T12(board))
return 8;
Expand Down
12 changes: 12 additions & 0 deletions 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_TPROS:
return "EdgeTX for Jumper T-Pro S";
case BOARD_JUMPER_BUMBLEBEE:
return "EdgeTX for Jumper Bumblebee";
case BOARD_JUMPER_T12MAX:
return "EdgeTX for Jumper T12 MAX";
case BOARD_JUMPER_T14:
Expand Down Expand Up @@ -1451,6 +1453,16 @@ void registerOpenTxFirmwares()
registerOpenTxFirmware(firmware);
addOpenTxRfOptions(firmware, FLEX);

/* Jumper Bumblebee board */
firmware = new OpenTxFirmware(FIRMWAREID("bumblebee"), QCoreApplication::translate("Firmware", "Jumper Bumblebee"), BOARD_JUMPER_BUMBLEBEE);
addOpenTxCommonOptions(firmware);
firmware->addOption("noheli", Firmware::tr("Disable HELI menu and cyclic mix support"));
firmware->addOption("nogvars", Firmware::tr("Disable Global variables"));
firmware->addOption("lua", Firmware::tr("Enable Lua custom scripts screen"));
addOpenTxFontOptions(firmware);
registerOpenTxFirmware(firmware);
addOpenTxRfOptions(firmware, FLEX);

/* Jumper T12 board */
firmware = new OpenTxFirmware(FIRMWAREID("t12"), QCoreApplication::translate("Firmware", "Jumper T12 / T12 Pro"), BOARD_JUMPER_T12);
addOpenTxCommonOptions(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.
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.
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.
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.
1 change: 1 addition & 0 deletions companion/src/simulation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ set(${PROJECT_NAME}_SRCS
simulateduiwidgetJumperTLITE.cpp
simulateduiwidgetJumperTPRO.cpp
simulateduiwidgetJumperTPROS.cpp
simulateduiwidgetJumperBumblebee.cpp
simulateduiwidgetLR3PRO.cpp
simulateduiwidgetNV14.cpp
simulateduiwidgetPL18.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 SimulatedUIWidgetJumperTPROS;
class SimulatedUIWidgetJumperBumblebee;
class SimulatedUIWidgetJumperT12max;
class SimulatedUIWidgetJumperT14;
class SimulatedUIWidgetJumperT15;
Expand Down Expand Up @@ -319,6 +320,18 @@ class SimulatedUIWidgetJumperTPROS: public SimulatedUIWidget
Ui::SimulatedUIWidgetJumperTPROS * ui;
};

class SimulatedUIWidgetJumperBumblebee: public SimulatedUIWidget
{
Q_OBJECT

public:
explicit SimulatedUIWidgetJumperBumblebee(SimulatorInterface * simulator, QWidget * parent = NULL);
virtual ~SimulatedUIWidgetJumperBumblebee();

private:
Ui::SimulatedUIWidgetJumperBumblebee * ui;
};

class SimulatedUIWidgetJumperT15: public SimulatedUIWidget
{
Q_OBJECT
Expand Down
57 changes: 57 additions & 0 deletions companion/src/simulation/simulateduiwidgetJumperBumblebee.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#include "simulateduiwidget.h"
#include "ui_simulateduiwidgetJumperBumblebee.h"
#include "eeprominterface.h"

// NOTE: RadioUiAction(NUMBER,...): NUMBER relates to enum EnumKeys in the specific board.h

SimulatedUIWidgetJumperBumblebee::SimulatedUIWidgetJumperBumblebee(SimulatorInterface *simulator, QWidget * parent):
SimulatedUIWidget(simulator, parent),
ui(new Ui::SimulatedUIWidgetJumperBumblebee)
{
RadioUiAction * act;

ui->setupUi(this);

act = new RadioUiAction(0, QList<int>() << Qt::Key_PageUp << Qt::Key_Up, SIMU_STR_HLP_KEYS_GO_UP, SIMU_STR_HLP_ACT_MENU_ICN);
addRadioWidget(ui->bottombuttons->addArea(QRect(55, 15, 50, 50), "JumperBumblebee/menu.png", act));

act = new RadioUiAction(3, QList<int>() << Qt::Key_PageDown << Qt::Key_Down, SIMU_STR_HLP_KEYS_GO_DN, SIMU_STR_HLP_ACT_PAGE);
addRadioWidget(ui->bottombuttons->addArea(QRect(10, 25, 50, 50), "JumperBumblebee/page.png", act));

act = new RadioUiAction(1, QList<int>() << Qt::Key_Delete << Qt::Key_Escape << Qt::Key_Backspace, SIMU_STR_HLP_KEYS_EXIT, SIMU_STR_HLP_ACT_EXIT);
addRadioWidget(ui->bottombuttons->addArea(QRect(25, 80, 50, 50), "JumperBumblebee/exit.png", act));

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->bottombuttons->addArea(QRect(145, 20, 100, 100), "JumperBumblebee/enter.png", m_mouseMidClickAction));

//addRadioWidget(ui->leftbuttons->addArea(QRect(10, 65, 70, 50), "JumperBumblebee/left_scrnshot.png", m_screenshotAction));

m_backlightColors << QColor(215, 243, 255); // X7 Blue
m_backlightColors << QColor(166,247,159);
m_backlightColors << QColor(247,159,166);
m_backlightColors << QColor(255,195,151);
m_backlightColors << QColor(247,242,159);

if (getCurrentBoard() == Board::BOARD_JUMPER_BUMBLEBEE) {
ui->lcd->setBgDefaultColor(QColor(0, 0, 0));
ui->lcd->setFgDefaultColor(QColor(255, 255, 255));
}

setLcd(ui->lcd);

QString css = "#radioUiWidget {"
"background-color: rgb(167, 167, 167);"
"}";

QTimer * tim = new QTimer(this);
tim->setSingleShot(true);
connect(tim, &QTimer::timeout, [this, css]() {
emit customStyleRequest(css);
});
tim->start(100);
}

SimulatedUIWidgetJumperBumblebee::~SimulatedUIWidgetJumperBumblebee()
{
delete ui;
}
Loading
Loading