feat: support for HelloRadioSky V16 (#5317)

Co-authored-by: Peter Feerick <pfeerick@users.noreply.github.com>
This commit is contained in:
richardclli
2024-09-02 09:45:59 +10:00
committed by GitHub
co-authored by Peter Feerick
parent 4426f56cb9
commit 17bf9dc813
45 changed files with 1062 additions and 46 deletions
+2
View File
@@ -338,6 +338,8 @@ elseif(PCB STREQUAL X10 AND PCBREV STREQUAL TX16S)
set(FLAVOUR tx16s)
elseif(PCB STREQUAL X10 AND PCBREV STREQUAL F16)
set(FLAVOUR f16)
elseif(PCB STREQUAL X10 AND PCBREV STREQUAL V16)
set(FLAVOUR v16)
elseif(PCB STREQUAL X7 AND PCBREV STREQUAL T14)
set(FLAVOUR t14)
elseif(PCB STREQUAL X10 AND PCBREV STREQUAL T15)
+9
View File
@@ -336,6 +336,15 @@
<file>images/simulator/Pocket/right.png</file>
<file>images/simulator/Pocket/top.png</file>
<file>images/simulator/Pocket/bottom.png</file>
<file>images/simulator/V16/left.png</file>
<file>images/simulator/V16/left_pagedn.png</file>
<file>images/simulator/V16/left_pageup.png</file>
<file>images/simulator/V16/left_rtn.png</file>
<file>images/simulator/V16/left_sys.png</file>
<file>images/simulator/V16/left_tele.png</file>
<file>images/simulator/V16/right.png</file>
<file>images/simulator/V16/right_ent.png</file>
<file>images/simulator/V16/right_mdl.png</file>
<file>images/wizard/ailerons.png</file>
<file>images/wizard/airbrakes.png</file>
<file>images/wizard/elevons.png</file>
+5
View File
@@ -213,6 +213,7 @@ int Boards::getEEpromSize(Board::Type board)
case BOARD_FLYSKY_EL18:
case BOARD_FLYSKY_PL18:
case BOARD_FATFISH_F16:
case BOARD_HELLORADIOSKY_V16:
return 0;
default:
return 0;
@@ -267,6 +268,7 @@ int Boards::getFlashSize(Type board)
case BOARD_FLYSKY_EL18:
case BOARD_FLYSKY_PL18:
case BOARD_FATFISH_F16:
case BOARD_HELLORADIOSKY_V16:
return FSIZE_HORUS;
case BOARD_UNKNOWN:
return FSIZE_MAX;
@@ -581,6 +583,8 @@ QString Boards::getBoardName(Board::Type board)
return "iFlight Commando 8";
case BOARD_FATFISH_F16:
return "Fatfish F16";
case BOARD_HELLORADIOSKY_V16:
return "HelloRadioSky V16";
default:
return CPN_STR_UNKNOWN_ITEM;
}
@@ -694,6 +698,7 @@ int Boards::getDefaultInternalModules(Board::Type board)
case BOARD_JUMPER_T20V2:
case BOARD_JUMPER_TPROS:
case BOARD_FATFISH_F16:
case BOARD_HELLORADIOSKY_V16:
return (int)MODULE_TYPE_CROSSFIRE;
case BOARD_FLYSKY_NV14:
+7 -1
View File
@@ -87,6 +87,7 @@ namespace Board {
BOARD_RADIOMASTER_POCKET,
BOARD_JUMPER_T20V2,
BOARD_FATFISH_F16,
BOARD_HELLORADIOSKY_V16,
BOARD_TYPE_COUNT,
BOARD_TYPE_MAX = BOARD_TYPE_COUNT - 1
};
@@ -514,9 +515,14 @@ inline bool IS_FATFISH_F16(Board::Type board)
return board == Board::BOARD_FATFISH_F16;
}
inline bool IS_HELLORADIOSKY_V16(Board::Type board)
{
return board == Board::BOARD_HELLORADIOSKY_V16;
}
inline bool IS_FAMILY_T16(Board::Type board)
{
return board == Board::BOARD_JUMPER_T15 || board == Board::BOARD_JUMPER_T16 || board == Board::BOARD_RADIOMASTER_TX16S || board == Board::BOARD_JUMPER_T18 || board == Board::BOARD_FATFISH_F16;
return board == Board::BOARD_JUMPER_T15 || board == Board::BOARD_JUMPER_T16 || board == Board::BOARD_RADIOMASTER_TX16S || board == Board::BOARD_JUMPER_T18 || board == Board::BOARD_FATFISH_F16 || board == Board::BOARD_HELLORADIOSKY_V16;
}
inline bool IS_FAMILY_T12(Board::Type board)
@@ -143,6 +143,8 @@ const char * OpenTxEepromInterface::getName()
return "EdgeTX for iFlight Commando 8";
case BOARD_FATFISH_F16:
return "EdgeTX for Fatfish F16";
case BOARD_HELLORADIOSKY_V16:
return "EdgeTX for HelloRadioSky V16";
default:
return "Board is unknown to EdgeTX";
}
@@ -1390,6 +1392,13 @@ void registerOpenTxFirmwares()
registerOpenTxFirmware(firmware);
addOpenTxRfOptions(firmware, EU + FLEX);
/* HelloRadioSky V16 board */
firmware = new OpenTxFirmware(FIRMWAREID("v16"), Firmware::tr("HelloRadioSky V16"), BOARD_HELLORADIOSKY_V16);
addOpenTxFrskyOptions(firmware);
addOpenTxRfOptions(firmware, FLEX);
firmware->addOptionsGroup({opt_bt, opt_internal_gps});
registerOpenTxFirmware(firmware);
/* iFlight Commando8 board */
firmware = new OpenTxFirmware(FIRMWAREID("commando8"), QCoreApplication::translate("Firmware", "iFlight Commando8"), BOARD_IFLIGHT_COMMANDO8);
addOpenTxCommonOptions(firmware);
Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

+1
View File
@@ -55,6 +55,7 @@ set(${PROJECT_NAME}_SRCS
simulateduiwidgetT8.cpp
simulateduiwidgetTX12.cpp
simulateduiwidgetTX16S.cpp
simulateduiwidgetV16.cpp
simulateduiwidgetX10.cpp
simulateduiwidgetX12.cpp
simulateduiwidgetX7.cpp
@@ -162,6 +162,7 @@ namespace Ui {
class SimulatedUIWidgetNV14;
class SimulatedUIWidgetEL18;
class SimulatedUIWidgetPL18;
class SimulatedUIWidgetV16;
}
class SimulatedUIWidget9X: public SimulatedUIWidget
@@ -540,4 +541,16 @@ class SimulatedUIWidgetPL18: public SimulatedUIWidget
Ui::SimulatedUIWidgetPL18 * ui;
};
class SimulatedUIWidgetV16: public SimulatedUIWidget
{
Q_OBJECT
public:
explicit SimulatedUIWidgetV16(SimulatorInterface * simulator, QWidget * parent = nullptr);
virtual ~SimulatedUIWidgetV16();
private:
Ui::SimulatedUIWidgetV16 * ui;
};
#endif // SIMULATEDUIWIDGET_H
@@ -0,0 +1,69 @@
/*
* Copyright (C) EdgeTX
*
* Based on code named
* opentx - https://github.com/opentx/opentx
* 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.
*/
#include "simulateduiwidget.h"
#include "ui_simulateduiwidgetV16.h"
SimulatedUIWidgetV16::SimulatedUIWidgetV16(SimulatorInterface *simulator, QWidget * parent):
SimulatedUIWidget(simulator, parent),
ui(new Ui::SimulatedUIWidgetV16)
{
RadioUiAction * act;
ui->setupUi(this);
// add actions in order of appearance on the help menu
act = new RadioUiAction(KEY_SYS, QList<int>() << Qt::Key_Left, SIMU_STR_HLP_KEY_LFT, SIMU_STR_HLP_ACT_SYS);
addRadioWidget(ui->left->addArea(QRect(60, 10, 81, 51), "V16/left_sys.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->left->addArea(QRect(75, 105, 60, 30), "V16/left_rtn.png", act));
act = new RadioUiAction(KEY_PAGEDN, QList<int>() << Qt::Key_PageDown, SIMU_STR_HLP_KEY_PGDN, SIMU_STR_HLP_ACT_PGDN);
addRadioWidget(ui->left->addArea(QRect(75, 160, 60, 30), "V16/left_pagedn.png", act));
act = new RadioUiAction(KEY_PAGEUP, QList<int>() << Qt::Key_PageUp, SIMU_STR_HLP_KEY_PGUP, SIMU_STR_HLP_ACT_PGUP);
addRadioWidget(ui->left->addArea(QRect(75, 220, 60, 30), "V16/left_pageup.png", act));
act = new RadioUiAction(KEY_TELE, QList<int>() << Qt::Key_Right, SIMU_STR_HLP_KEY_RGT, SIMU_STR_HLP_ACT_TELE);
addRadioWidget(ui->left->addArea(QRect(75, 280, 80, 35), "V16/left_tele.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->right->addArea(QRect(40, 130, 51, 131), "V16/right_ent.png", m_mouseMidClickAction));
act = new RadioUiAction(KEY_MODEL, QList<int>() << Qt::Key_Up, SIMU_STR_HLP_KEY_UP, SIMU_STR_HLP_ACT_MDL);
addRadioWidget(ui->right->addArea(QRect(30, 10, 81, 51), "V16/right_mdl.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_backlightColors << QColor(47, 123, 227);
setLcd(ui->lcd);
}
SimulatedUIWidgetV16::~SimulatedUIWidgetV16()
{
delete ui;
}
@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SimulatedUIWidgetV16</class>
<widget class="QWidget" name="SimulatedUIWidgetV16">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>829</width>
<height>320</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>829</width>
<height>320</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>829</width>
<height>355</height>
</size>
</property>
<widget class="ButtonsWidget" name="right" native="true">
<property name="geometry">
<rect>
<x>658</x>
<y>0</y>
<width>167</width>
<height>320</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>167</width>
<height>320</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>167</width>
<height>320</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/V16/right.png)</string>
</property>
</widget>
<widget class="ButtonsWidget" name="left" native="true">
<property name="geometry">
<rect>
<x>1</x>
<y>0</y>
<width>175</width>
<height>320</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>175</width>
<height>320</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>175</width>
<height>320</height>
</size>
</property>
<property name="mouseTracking">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">background:url(:/images/simulator/V16/left.png);</string>
</property>
</widget>
<widget class="LcdWidget" name="lcd" native="true">
<property name="geometry">
<rect>
<x>177</x>
<y>24</y>
<width>480</width>
<height>272</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>480</width>
<height>272</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>480</width>
<height>272</height>
</size>
</property>
<property name="font">
<font>
<pointsize>5</pointsize>
</font>
</property>
</widget>
</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>
<include location="../companion.qrc"/>
</resources>
<connections/>
</ui>
@@ -159,6 +159,9 @@ SimulatorWidget::SimulatorWidget(QWidget * parent, SimulatorInterface * simulato
case Board::BOARD_FLYSKY_PL18:
radioUiWidget = new SimulatedUIWidgetPL18(simulator, this);
break;
case Board::BOARD_HELLORADIOSKY_V16:
radioUiWidget = new SimulatedUIWidgetV16(simulator, this);
break;
default:
radioUiWidget = new SimulatedUIWidget9X(simulator, this);
break;