feat: support for Jumper Bumblebee (#5624)
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
@@ -308,6 +308,8 @@ elseif(PCB STREQUAL X7 AND PCBREV STREQUAL TPROV2)
|
||||
set(FLAVOUR tprov2)
|
||||
elseif(PCB STREQUAL X7 AND PCBREV STREQUAL TPROS)
|
||||
set(FLAVOUR tpros)
|
||||
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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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:
|
||||
@@ -251,6 +252,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:
|
||||
@@ -299,7 +301,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;
|
||||
@@ -587,6 +589,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:
|
||||
@@ -747,6 +751,7 @@ int Boards::getDefaultInternalModules(Board::Type board)
|
||||
case BOARD_JUMPER_T20:
|
||||
case BOARD_JUMPER_T20V2:
|
||||
case BOARD_JUMPER_TPROS:
|
||||
case BOARD_JUMPER_BUMBLEBEE:
|
||||
case BOARD_FATFISH_F16:
|
||||
case BOARD_HELLORADIOSKY_V16:
|
||||
return (int)MODULE_TYPE_CROSSFIRE;
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace Board {
|
||||
BOARD_JUMPER_TPROS,
|
||||
BOARD_RADIOMASTER_POCKET,
|
||||
BOARD_JUMPER_T20V2,
|
||||
BOARD_JUMPER_BUMBLEBEE,
|
||||
BOARD_FATFISH_F16,
|
||||
BOARD_HELLORADIOSKY_V16,
|
||||
BOARD_RADIOMASTER_MT12,
|
||||
@@ -514,6 +515,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;
|
||||
@@ -616,6 +622,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 ||
|
||||
|
||||
@@ -46,11 +46,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;
|
||||
|
||||
@@ -71,6 +71,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:
|
||||
@@ -1424,6 +1426,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);
|
||||
|
||||
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 16 KiB |
@@ -48,6 +48,7 @@ set(${PROJECT_NAME}_SRCS
|
||||
simulateduiwidgetJumperTLITE.cpp
|
||||
simulateduiwidgetJumperTPRO.cpp
|
||||
simulateduiwidgetJumperTPROS.cpp
|
||||
simulateduiwidgetJumperBumblebee.cpp
|
||||
simulateduiwidgetLR3PRO.cpp
|
||||
simulateduiwidgetMT12.cpp
|
||||
simulateduiwidgetNV14.cpp
|
||||
|
||||
@@ -173,6 +173,7 @@ namespace Ui {
|
||||
class SimulatedUIWidgetJumperTLITE;
|
||||
class SimulatedUIWidgetJumperTPRO;
|
||||
class SimulatedUIWidgetJumperTPROS;
|
||||
class SimulatedUIWidgetJumperBumblebee;
|
||||
class SimulatedUIWidgetJumperT12max;
|
||||
class SimulatedUIWidgetJumperT14;
|
||||
class SimulatedUIWidgetJumperT15;
|
||||
@@ -390,6 +391,18 @@ private:
|
||||
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
|
||||
|
||||
@@ -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(KEY_MENU, 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(KEY_PAGEDN, 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(KEY_EXIT, 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(KEY_ENTER, 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;
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SimulatedUIWidgetJumperBumblebee</class>
|
||||
<widget class="QWidget" name="SimulatedUIWidgetJumperBumblebee">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>726</width>
|
||||
<height>368</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>726</width>
|
||||
<height>368</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>726</width>
|
||||
<height>368</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">Jumper Bumblebee Simulator</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, 255, 255, 255), stop:0.757062 rgba(241, 238, 238, 255), stop:1 rgba(247, 245, 245, 255));</string>
|
||||
</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="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>234</width>
|
||||
<height>368</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>234</width>
|
||||
<height>368</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:url(:/images/simulator/JumperBumblebee/left.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>256</width>
|
||||
<height>128</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>256</width>
|
||||
<height>128</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(215, 243, 255);</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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>236</width>
|
||||
<height>368</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>236</width>
|
||||
<height>368</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:url(:/images/simulator/JumperBumblebee/right.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>256</width>
|
||||
<height>97</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>256</width>
|
||||
<height>97</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:url(:/images/simulator/JumperBumblebee/top.png)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="ButtonsWidget" name="bottombuttons" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>256</width>
|
||||
<height>143</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>256</width>
|
||||
<height>143</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:url(:/images/simulator/JumperBumblebee/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>
|
||||
@@ -109,6 +109,9 @@ SimulatorWidget::SimulatorWidget(QWidget * parent, SimulatorInterface * simulato
|
||||
case Board::BOARD_JUMPER_TPROS:
|
||||
radioUiWidget = new SimulatedUIWidgetJumperTPROS(simulator, this);
|
||||
break;
|
||||
case Board::BOARD_JUMPER_BUMBLEBEE:
|
||||
radioUiWidget = new SimulatedUIWidgetJumperBumblebee(simulator, this);
|
||||
break;
|
||||
case Board::BOARD_JUMPER_T12MAX:
|
||||
radioUiWidget = new SimulatedUIWidgetJumperT12max(simulator, this);
|
||||
break;
|
||||
|
||||