Initial TX16S (#7344)
* TX16S initial push - Radio booting, navigation keys ok * TX16S libsimu * Please Travis * Do not start radio on charger power * USB charger led handling * Revert "USB charger led handling" until we have proper details * Pseudo sport power pin * Please Travis * tx16s serial debug * Add tx16s calibration picture * Review anadir for tx16s, needs to be checked on more radios * Dump raw multi telem on AUX port * More work on TX16S * Fixes * Compilation fix * Compilation fix * Fix Aux Serial power * Various improvement * USB charger led handling * Cosmetics * Cosmetics * USB charger led handling * Add charge indicator on GUI
|
@ -351,6 +351,8 @@ elseif(PCB STREQUAL X10 AND PCBREV STREQUAL EXPRESS)
|
|||
set(FLAVOUR x10express)
|
||||
elseif(PCB STREQUAL X10 AND PCBREV STREQUAL T16)
|
||||
set(FLAVOUR t16)
|
||||
elseif(PCB STREQUAL X10 AND PCBREV STREQUAL TX16S)
|
||||
set(FLAVOUR tx16s)
|
||||
else()
|
||||
string(TOLOWER ${PCB} FLAVOUR)
|
||||
endif()
|
||||
|
|
|
@ -541,7 +541,7 @@ void AppPreferencesDialog::populateFirmwareOptions(const Firmware * firmware)
|
|||
|
||||
// TODO: Remove once splash replacement supported on Horus
|
||||
// NOTE: 480x272 image causes issues on screens <800px high, needs a solution like scrolling once reinstated
|
||||
if (IS_HORUS(baseFw->getBoard())) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(baseFw->getBoard())) {
|
||||
ui->widget_splashImage->hide();
|
||||
ui->SplashFileName->setText("");
|
||||
}
|
||||
|
|
|
@ -190,6 +190,17 @@
|
|||
<file>images/simulator/JumperT16/left_tele.png</file>
|
||||
<file>images/simulator/JumperT16/right_ent.png</file>
|
||||
<file>images/simulator/JumperT16/right_rtn.png</file>
|
||||
<file>images/simulator/TX16S/left.png</file>
|
||||
<file>images/simulator/TX16S/right.png</file>
|
||||
<file>images/simulator/TX16S/top.png</file>
|
||||
<file>images/simulator/TX16S/bottom.png</file>
|
||||
<file>images/simulator/TX16S/left_page.png</file>
|
||||
<file>images/simulator/TX16S/left_page2.png</file>
|
||||
<file>images/simulator/TX16S/left_rtn.png</file>
|
||||
<file>images/simulator/TX16S/left_sys.png</file>
|
||||
<file>images/simulator/TX16S/left_tele.png</file>
|
||||
<file>images/simulator/TX16S/right_ent.png</file>
|
||||
<file>images/simulator/TX16S/right_mdl.png</file>
|
||||
<file>images/wizard/ailerons.png</file>
|
||||
<file>images/wizard/airbrakes.png</file>
|
||||
<file>images/wizard/elevons.png</file>
|
||||
|
|
|
@ -92,6 +92,8 @@ uint32_t Boards::getFourCC(Type board)
|
|||
return 0x3D78746F;
|
||||
case BOARD_JUMPER_T16:
|
||||
return 0x3F78746F;
|
||||
case BOARD_RADIOMASTER_TX16S:
|
||||
return 0x3878746F;
|
||||
case BOARD_UNKNOWN:
|
||||
break;
|
||||
}
|
||||
|
@ -132,6 +134,7 @@ int Boards::getEEpromSize(Board::Type board)
|
|||
case BOARD_X10:
|
||||
case BOARD_X10_EXPRESS:
|
||||
case BOARD_JUMPER_T16:
|
||||
case BOARD_RADIOMASTER_TX16S:
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -169,6 +172,7 @@ int Boards::getFlashSize(Type board)
|
|||
case BOARD_X10:
|
||||
case BOARD_X10_EXPRESS:
|
||||
case BOARD_JUMPER_T16:
|
||||
case BOARD_RADIOMASTER_TX16S:
|
||||
return FSIZE_HORUS;
|
||||
case BOARD_UNKNOWN:
|
||||
return FSIZE_MAX;
|
||||
|
@ -284,7 +288,7 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
|
|||
return 2;
|
||||
else if (IS_TARANIS_X9E(board))
|
||||
return 4;
|
||||
else if (IS_HORUS_X10(board) || IS_JUMPER_T16(board))
|
||||
else if (IS_HORUS_X10(board) || IS_FAMILY_T16(board))
|
||||
return 5;
|
||||
else if (IS_HORUS_X12S(board))
|
||||
return 3;
|
||||
|
@ -300,13 +304,13 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
|
|||
case Sliders:
|
||||
if (IS_HORUS_X12S(board) || IS_TARANIS_X9E(board))
|
||||
return 4;
|
||||
else if (IS_TARANIS_X9D(board) || IS_HORUS_X10(board) || IS_JUMPER_T16(board))
|
||||
else if (IS_TARANIS_X9D(board) || IS_HORUS_X10(board) || IS_FAMILY_T16(board))
|
||||
return 2;
|
||||
else
|
||||
return 0;
|
||||
|
||||
case MouseAnalogs:
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 2;
|
||||
else
|
||||
return 0;
|
||||
|
@ -343,7 +347,7 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
|
|||
return 9;
|
||||
else if (IS_TARANIS(board))
|
||||
return 8;
|
||||
else if (IS_HORUS(board))
|
||||
else if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 10;
|
||||
else
|
||||
return 7;
|
||||
|
@ -363,7 +367,7 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
|
|||
return 9;
|
||||
|
||||
case NumTrims:
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 6;
|
||||
else
|
||||
return 4;
|
||||
|
@ -467,7 +471,7 @@ QString Boards::getAnalogInputName(Board::Type board, int index)
|
|||
if (index < DIM(pots))
|
||||
return pots[index];
|
||||
}
|
||||
else if (IS_HORUS_X10(board) || IS_JUMPER_T16(board)) {
|
||||
else if (IS_HORUS_X10(board) || IS_FAMILY_T16(board)) {
|
||||
const QString pots[] = {
|
||||
"S1",
|
||||
"6P",
|
||||
|
@ -536,6 +540,8 @@ QString Boards::getBoardName(Board::Type board)
|
|||
return "Horus X10/X10S Express";
|
||||
case BOARD_JUMPER_T16:
|
||||
return "Jumper T16";
|
||||
case BOARD_RADIOMASTER_TX16S:
|
||||
return "Radiomaster TX16S";
|
||||
default:
|
||||
return tr("Unknown");
|
||||
}
|
||||
|
|
|
@ -54,9 +54,10 @@ namespace Board {
|
|||
BOARD_TARANIS_X9LITES,
|
||||
BOARD_JUMPER_T12,
|
||||
BOARD_JUMPER_T16,
|
||||
BOARD_RADIOMASTER_TX16S,
|
||||
};
|
||||
|
||||
constexpr int BOARD_TYPE_MAX = BOARD_JUMPER_T16 ;
|
||||
constexpr int BOARD_TYPE_MAX = BOARD_RADIOMASTER_TX16S ;
|
||||
|
||||
enum PotType
|
||||
{
|
||||
|
@ -230,6 +231,16 @@ inline bool IS_JUMPER_T16(Board::Type board)
|
|||
return board == Board::BOARD_JUMPER_T16;
|
||||
}
|
||||
|
||||
inline bool IS_RADIOMASTER_TX16S(Board::Type board)
|
||||
{
|
||||
return board == Board::BOARD_RADIOMASTER_TX16S;
|
||||
}
|
||||
|
||||
inline bool IS_FAMILY_T16(Board::Type board)
|
||||
{
|
||||
return board == Board::BOARD_JUMPER_T16 || board == Board::BOARD_RADIOMASTER_TX16S;
|
||||
}
|
||||
|
||||
inline bool IS_TARANIS_XLITE(Board::Type board)
|
||||
{
|
||||
return board == Board::BOARD_TARANIS_XLITE || board == Board::BOARD_TARANIS_XLITES;
|
||||
|
@ -300,19 +311,24 @@ inline bool IS_HORUS_X12S(Board::Type board)
|
|||
return board == Board::BOARD_HORUS_X12S;
|
||||
}
|
||||
|
||||
inline bool IS_HORUS(Board::Type board)
|
||||
inline bool IS_FAMILY_HORUS(Board::Type board)
|
||||
{
|
||||
return IS_HORUS_X12S(board) || IS_HORUS_X10(board) || IS_JUMPER_T16(board);
|
||||
return IS_HORUS_X12S(board) || IS_HORUS_X10(board);
|
||||
}
|
||||
|
||||
inline bool IS_FAMILY_HORUS_OR_T16(Board::Type board)
|
||||
{
|
||||
return IS_FAMILY_HORUS(board) || IS_FAMILY_T16(board);
|
||||
}
|
||||
|
||||
inline bool IS_HORUS_OR_TARANIS(Board::Type board)
|
||||
{
|
||||
return IS_HORUS(board) || IS_TARANIS(board);
|
||||
return IS_FAMILY_HORUS_OR_T16(board) || IS_TARANIS(board);
|
||||
}
|
||||
|
||||
inline bool IS_STM32(Board::Type board)
|
||||
{
|
||||
return IS_TARANIS(board) || IS_HORUS(board);
|
||||
return IS_TARANIS(board) || IS_FAMILY_HORUS_OR_T16(board);
|
||||
}
|
||||
|
||||
inline bool IS_ARM(Board::Type board)
|
||||
|
@ -322,7 +338,7 @@ inline bool IS_ARM(Board::Type board)
|
|||
|
||||
inline bool HAS_LARGE_LCD(Board::Type board)
|
||||
{
|
||||
return IS_HORUS(board) || IS_TARANIS_X9(board);
|
||||
return IS_FAMILY_HORUS_OR_T16(board) || IS_TARANIS_X9(board);
|
||||
}
|
||||
|
||||
inline bool HAS_EXTERNAL_ANTENNA(Board::Type board)
|
||||
|
@ -333,7 +349,7 @@ inline bool HAS_EXTERNAL_ANTENNA(Board::Type board)
|
|||
inline bool IS_ACCESS_RADIO(Board::Type board, QString &id)
|
||||
{
|
||||
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X9LITE(board) || board == Board::BOARD_TARANIS_X9DP_2019 || board == Board::BOARD_X10_EXPRESS || IS_TARANIS_X7_ACCESS(board) ||
|
||||
(IS_HORUS(board) && id.contains("internalaccess")));
|
||||
(IS_FAMILY_HORUS_OR_T16(board) && id.contains("internalaccess")));
|
||||
}
|
||||
|
||||
#endif // _BOARDS_H_
|
||||
|
|
|
@ -88,7 +88,7 @@ GeneralSettings::GeneralSettings()
|
|||
vBatMin = -5; //8,5V
|
||||
vBatMax = -5; //11,5V
|
||||
}
|
||||
else if (IS_TARANIS_XLITE(board) || IS_HORUS_X10(board) || IS_JUMPER_T16(board)) {
|
||||
else if (IS_TARANIS_XLITE(board) || IS_HORUS_X10(board) || IS_FAMILY_T16(board)) {
|
||||
// Lipo 2S
|
||||
vBatWarn = 66;
|
||||
vBatMin = -23; // 6.7V
|
||||
|
@ -106,7 +106,7 @@ GeneralSettings::GeneralSettings()
|
|||
backlightMode = 3; // keys and sticks
|
||||
// backlightBright = 0; // 0 = 100%
|
||||
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
backlightOffBright = 20;
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ GeneralSettings::GeneralSettings()
|
|||
|
||||
if (IS_JUMPER_T16(board))
|
||||
strcpy(bluetoothName, "t16");
|
||||
else if (IS_HORUS(board)) {
|
||||
else if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
strcpy(bluetoothName, "horus");
|
||||
}
|
||||
else if (IS_TARANIS_X9E(board) || IS_TARANIS_SMALL(board)) {
|
||||
|
@ -236,7 +236,7 @@ void GeneralSettings::setDefaultControlTypes(Board::Type board)
|
|||
}
|
||||
|
||||
// TODO: move to Boards, like with switches
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
potConfig[0] = Board::POT_WITH_DETENT;
|
||||
potConfig[1] = Board::POT_MULTIPOS_SWITCH;
|
||||
potConfig[2] = Board::POT_WITH_DETENT;
|
||||
|
@ -269,7 +269,7 @@ void GeneralSettings::setDefaultControlTypes(Board::Type board)
|
|||
sliderConfig[2] = Board::SLIDER_WITH_DETENT;
|
||||
sliderConfig[3] = Board::SLIDER_WITH_DETENT;
|
||||
}
|
||||
else if (IS_TARANIS_X9(board) || IS_HORUS_X10(board) || IS_JUMPER_T16(board)) {
|
||||
else if (IS_TARANIS_X9(board) || IS_HORUS_X10(board) || IS_FAMILY_T16(board)) {
|
||||
sliderConfig[0] = Board::SLIDER_WITH_DETENT;
|
||||
sliderConfig[1] = Board::SLIDER_WITH_DETENT;
|
||||
}
|
||||
|
@ -313,27 +313,27 @@ void GeneralSettings::convert(RadioDataConversionState & cstate)
|
|||
|
||||
// SE and SG are skipped on X7 board
|
||||
if (IS_TARANIS_X7(cstate.toType)) {
|
||||
if (IS_TARANIS_X9(cstate.fromType) || IS_HORUS(cstate.fromType)) {
|
||||
if (IS_TARANIS_X9(cstate.fromType) || IS_FAMILY_HORUS_OR_T16(cstate.fromType)) {
|
||||
strncpy(switchName[4], switchName[5], sizeof(switchName[4]));
|
||||
strncpy(switchName[5], switchName[7], sizeof(switchName[5]));
|
||||
}
|
||||
}
|
||||
else if (IS_TARANIS_X7(cstate.fromType)) {
|
||||
if (IS_TARANIS_X9(cstate.toType) || IS_HORUS(cstate.toType)) {
|
||||
if (IS_TARANIS_X9(cstate.toType) || IS_FAMILY_HORUS_OR_T16(cstate.toType)) {
|
||||
strncpy(switchName[5], switchName[4], sizeof(switchName[5]));
|
||||
strncpy(switchName[7], switchName[5], sizeof(switchName[7]));
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_JUMPER_T12(cstate.toType)) {
|
||||
if (IS_TARANIS_X9(cstate.fromType) || IS_HORUS(cstate.fromType)) {
|
||||
if (IS_TARANIS_X9(cstate.fromType) || IS_FAMILY_HORUS_OR_T16(cstate.fromType)) {
|
||||
strncpy(switchName[4], switchName[5], sizeof(switchName[0]));
|
||||
strncpy(switchName[5], switchName[7], sizeof(switchName[0]));
|
||||
}
|
||||
}
|
||||
|
||||
else if (IS_JUMPER_T12(cstate.fromType)) {
|
||||
if (IS_TARANIS_X9(cstate.toType) || IS_HORUS(cstate.toType)) {
|
||||
if (IS_TARANIS_X9(cstate.toType) || IS_FAMILY_HORUS_OR_T16(cstate.toType)) {
|
||||
strncpy(switchName[5], switchName[4], sizeof(switchName[0]));
|
||||
strncpy(switchName[7], switchName[5], sizeof(switchName[0]));
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ void GeneralSettings::convert(RadioDataConversionState & cstate)
|
|||
strncpy(sliderName[3], sliderName[1], sizeof(sliderName[3]));
|
||||
}
|
||||
|
||||
if (IS_HORUS(cstate.toType)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(cstate.toType)) {
|
||||
// 6P switch is only on Horus (by default)
|
||||
if (cstate.fromBoard.getCapability(Board::FactoryInstalledPots) == 2) {
|
||||
strncpy(potName[2], potName[1], sizeof(potName[2]));
|
||||
|
|
|
@ -36,7 +36,7 @@ inline int MAX_SWITCHES(Board::Type board, int version)
|
|||
if (version <= 218) {
|
||||
if (IS_TARANIS_X7(board))
|
||||
return 6;
|
||||
if (IS_TARANIS_X9D(board) || IS_HORUS(board))
|
||||
if (IS_TARANIS_X9D(board) || IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 8;
|
||||
if (IS_TARANIS_XLITE(board))
|
||||
return 4;
|
||||
|
@ -63,7 +63,7 @@ inline int MAX_SWITCHES_POSITION(Board::Type board, int version)
|
|||
|
||||
inline int POTS_CONFIG_SIZE(Board::Type board, int version)
|
||||
{
|
||||
if (version >= 219 && IS_HORUS(board))
|
||||
if (version >= 219 && IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 16;
|
||||
|
||||
return 8;
|
||||
|
@ -71,44 +71,44 @@ inline int POTS_CONFIG_SIZE(Board::Type board, int version)
|
|||
|
||||
inline int MAX_POTS(Board::Type board, int version)
|
||||
{
|
||||
if (version <= 218 && IS_HORUS(board))
|
||||
if (version <= 218 && IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 3;
|
||||
return Boards::getCapability(board, Board::Pots);
|
||||
}
|
||||
|
||||
inline int MAX_POTS_STORAGE(Board::Type board, int version)
|
||||
{
|
||||
if (version <= 218 && IS_HORUS(board))
|
||||
if (version <= 218 && IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 3;
|
||||
if (version >= 219 && IS_HORUS(board))
|
||||
if (version >= 219 && IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 5;
|
||||
return Boards::getCapability(board, Board::Pots);
|
||||
}
|
||||
|
||||
inline int MAX_POTS_SOURCES(Board::Type board, int version)
|
||||
{
|
||||
if (version <= 218 && IS_HORUS(board))
|
||||
if (version <= 218 && IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 5;
|
||||
return Boards::getCapability(board, Board::Pots);
|
||||
}
|
||||
|
||||
inline int MAX_SLIDERS_STORAGE(Board::Type board, int version)
|
||||
{
|
||||
if (version >= 219 && IS_HORUS(board))
|
||||
if (version >= 219 && IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 4;
|
||||
return Boards::getCapability(board, Board::Sliders);
|
||||
}
|
||||
|
||||
inline int MAX_SLIDERS_SOURCES(Board::Type board, int version)
|
||||
{
|
||||
if (version <= 218 && IS_HORUS(board))
|
||||
if (version <= 218 && IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 2;
|
||||
return Boards::getCapability(board, Board::Sliders);
|
||||
}
|
||||
|
||||
inline int SLIDERS_CONFIG_SIZE(Board::Type board, int version)
|
||||
{
|
||||
if (version >= 219 && IS_HORUS(board))
|
||||
if (version >= 219 && IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 8;
|
||||
|
||||
return 4;
|
||||
|
@ -119,7 +119,7 @@ inline int SWITCHES_CONFIG_SIZE(Board::Type board, int version)
|
|||
if (IS_TARANIS_X9E(board))
|
||||
return 64;
|
||||
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 32;
|
||||
|
||||
if (version >= 219 && IS_TARANIS_X9D(board))
|
||||
|
@ -139,11 +139,11 @@ inline int SWITCHES_CONFIG_SIZE(Board::Type board, int version)
|
|||
#define MAX_CUSTOM_FUNCTIONS(board, version) 64
|
||||
#define MAX_CURVES(board, version) ((version >= 219 || HAS_LARGE_LCD(board)) ? 32 : 16)
|
||||
#define MAX_GVARS(board, version) 9
|
||||
#define MAX_SCRIPTS(board) (IS_HORUS(board) ? 9 : 7)
|
||||
#define MAX_TELEMETRY_SENSORS(board, version) (version <= 218 ? 32 : ((IS_HORUS(board) || IS_TARANIS_X9(board)) ? 60 : 40))
|
||||
#define MAX_SCRIPTS(board) (IS_FAMILY_HORUS_OR_T16(board) ? 9 : 7)
|
||||
#define MAX_TELEMETRY_SENSORS(board, version) (version <= 218 ? 32 : ((IS_FAMILY_HORUS_OR_T16(board) || IS_TARANIS_X9(board)) ? 60 : 40))
|
||||
#define NUM_PPM_INPUTS(board, version) 16
|
||||
#define ROTENC_COUNT(board, version) ((IS_STM32(board) && version >= 218) ? 0 : 1)
|
||||
#define MAX_AUX_TRIMS(board) (IS_HORUS(board) ? 2 : 0)
|
||||
#define MAX_AUX_TRIMS(board) (IS_FAMILY_HORUS_OR_T16(board) ? 2 : 0)
|
||||
|
||||
inline int switchIndex(int i, Board::Type board, unsigned int version)
|
||||
{
|
||||
|
@ -810,7 +810,7 @@ class MixField: public TransformedField {
|
|||
internalField.Append(new UnsignedField<8>(this, mix.delayDown));
|
||||
internalField.Append(new UnsignedField<8>(this, mix.speedUp));
|
||||
internalField.Append(new UnsignedField<8>(this, mix.speedDown));
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
internalField.Append(new ZCharField<6>(this, mix.name));
|
||||
else if (HAS_LARGE_LCD(board) && version <= 218)
|
||||
internalField.Append(new ZCharField<8>(this, mix.name));
|
||||
|
@ -946,7 +946,7 @@ class InputField: public TransformedField {
|
|||
internalField.Append(new UnsignedField<9>(this, expo.flightModes));
|
||||
internalField.Append(new SignedField<8>(this, _weight, "Weight"));
|
||||
internalField.Append(new SpareBitsField<1>(this));
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
internalField.Append(new ZCharField<6>(this, expo.name));
|
||||
else if (HAS_LARGE_LCD(board) && version <= 218)
|
||||
internalField.Append(new ZCharField<8>(this, expo.name));
|
||||
|
@ -1809,7 +1809,7 @@ class Frsky218Field: public StructField {
|
|||
rssiConversionTable[0] = RSSIConversionTable(0);
|
||||
rssiConversionTable[1] = RSSIConversionTable(1);
|
||||
|
||||
if (!IS_HORUS(board)) {
|
||||
if (!IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
Append(new UnsignedField<8>(this, frsky.voltsSource, "Volts Source"));
|
||||
Append(new UnsignedField<8>(this, frsky.altitudeSource, "Altitude Source"));
|
||||
|
||||
|
@ -2251,7 +2251,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, Board::Type board, unsig
|
|||
|
||||
qDebug() << QString("OpenTxModelData::OpenTxModelData(name: %1, board: %2, ver: %3, var: %4)").arg(name).arg(board).arg(version).arg(variant);
|
||||
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
internalField.Append(new ZCharField<15>(this, modelData.name, "Model name"));
|
||||
else if (HAS_LARGE_LCD(board))
|
||||
internalField.Append(new ZCharField<12>(this, modelData.name, "Model name"));
|
||||
|
@ -2262,7 +2262,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, Board::Type board, unsig
|
|||
internalField.Append(new UnsignedField<8>(this, modelData.moduleData[1].modelId));
|
||||
|
||||
if (HAS_LARGE_LCD(board)) {
|
||||
if (version >= 219 && IS_HORUS(board))
|
||||
if (version >= 219 && IS_FAMILY_HORUS_OR_T16(board))
|
||||
internalField.Append(new CharField<14>(this, modelData.bitmap, true, "Model bitmap"));
|
||||
else
|
||||
internalField.Append(new CharField<10>(this, modelData.bitmap, true, "Model bitmap"));
|
||||
|
@ -2330,7 +2330,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, Board::Type board, unsig
|
|||
|
||||
internalField.Append(new UnsignedField<8>(this, modelData.thrTraceSrc, "Throttle Source"));
|
||||
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
internalField.Append(new SwitchesWarningField<32>(this, modelData.switchWarningStates, board, version));
|
||||
else if (IS_TARANIS_X9E(board))
|
||||
internalField.Append(new SwitchesWarningField<64>(this, modelData.switchWarningStates, board, version));
|
||||
|
@ -2345,7 +2345,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, Board::Type board, unsig
|
|||
internalField.Append(new UnsignedField<32>(this, modelData.switchWarningEnable));
|
||||
else if (version >= 219 && IS_TARANIS_X9D(board))
|
||||
internalField.Append(new UnsignedField<16>(this, modelData.switchWarningEnable));
|
||||
else if (!IS_HORUS(board))
|
||||
else if (!IS_FAMILY_HORUS_OR_T16(board))
|
||||
internalField.Append(new UnsignedField<8>(this, modelData.switchWarningEnable));
|
||||
|
||||
for (int i=0; i<MAX_GVARS(board, version); i++) {
|
||||
|
@ -2482,7 +2482,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, Board::Type board, unsig
|
|||
internalField.Append(new UnsignedField<8>(this, modelData.toplcdTimer));
|
||||
}
|
||||
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
internalField.Append(new CharField<610>(this, modelData.customScreenData[i], false, "Custom screen blob"));
|
||||
}
|
||||
|
@ -2508,7 +2508,7 @@ void OpenTxModelData::beforeExport()
|
|||
{
|
||||
// qDebug() << QString("before export model") << modelData.name;
|
||||
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
uint32_t newSwitchWarningStates = 0;
|
||||
for (int i = 0; i < MAX_SWITCHES(board, version); i++) {
|
||||
uint8_t value = (modelData.switchWarningStates >> (2*i)) & 0x03;
|
||||
|
@ -2524,7 +2524,7 @@ void OpenTxModelData::afterImport()
|
|||
{
|
||||
qCDebug(eepromImport) << QString("OpenTxModelData::afterImport()") << modelData.name;
|
||||
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
uint32_t newSwitchWarningStates = 0;
|
||||
for (int i = 0; i < MAX_SWITCHES(board, version); i++) {
|
||||
uint8_t value = (modelData.switchWarningStates >> (3*i)) & 0x07;
|
||||
|
@ -2572,7 +2572,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
|||
|
||||
internalField.Append(new UnsignedField<16>(this, chkSum));
|
||||
|
||||
if (!IS_HORUS(board)) {
|
||||
if (!IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
internalField.Append(new UnsignedField<8>(this, generalData.currModelIndex));
|
||||
internalField.Append(new UnsignedField<8>(this, generalData.contrast));
|
||||
}
|
||||
|
@ -2617,7 +2617,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
|||
|
||||
internalField.Append(new UnsignedField<8>(this, generalData.inactivityTimer));
|
||||
internalField.Append(new UnsignedField<3>(this, generalData.telemetryBaudrate));
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
internalField.Append(new SpareBitsField<3>(this));
|
||||
else if (IS_TARANIS(board))
|
||||
internalField.Append(new SignedField<3>(this, generalData.splashDuration));
|
||||
|
@ -2632,11 +2632,11 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
|||
internalField.Append(new SignedField<8>(this, generalData.PPM_Multiplier));
|
||||
internalField.Append(new SignedField<8>(this, generalData.hapticLength));
|
||||
|
||||
if (version < 218 || (!IS_TARANIS(board) && !IS_HORUS(board))) {
|
||||
if (version < 218 || (!IS_TARANIS(board) && !IS_FAMILY_HORUS_OR_T16(board))) {
|
||||
internalField.Append(new UnsignedField<8>(this, generalData.reNavigation));
|
||||
}
|
||||
|
||||
if (!IS_TARANIS(board) && !IS_HORUS(board)) {
|
||||
if (!IS_TARANIS(board) && !IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
internalField.Append(new UnsignedField<8>(this, generalData.stickReverse));
|
||||
}
|
||||
|
||||
|
@ -2715,7 +2715,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
|||
if (IS_STM32(board)) {
|
||||
if (version >= 218) {
|
||||
internalField.Append(new UnsignedField<4>(this, generalData.auxSerialMode));
|
||||
if (IS_HORUS(board) && version >= 219) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board) && version >= 219) {
|
||||
internalField.Append(new SpareBitsField<4>(this));
|
||||
}
|
||||
else {
|
||||
|
@ -2735,7 +2735,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
|||
}
|
||||
}
|
||||
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
for (int i=0; i<SWITCHES_CONFIG_SIZE(board, version) / 2; i++) {
|
||||
if (i < MAX_SWITCHES(board, version))
|
||||
internalField.Append(new UnsignedField<2>(this, generalData.switchConfig[i]));
|
||||
|
@ -2747,7 +2747,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
|||
for (int i=0; i<POTS_CONFIG_SIZE(board, version) / 2; i++) {
|
||||
int offset = 0;
|
||||
// 2 new pots for Horus from 219 on
|
||||
if (version <= 218 && IS_HORUS(board) && (i >= 3))
|
||||
if (version <= 218 && IS_FAMILY_HORUS_OR_T16(board) && (i >= 3))
|
||||
offset += 2;
|
||||
|
||||
if (i < MAX_POTS_STORAGE(board, version))
|
||||
|
@ -2756,7 +2756,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
|||
internalField.Append(new SpareBitsField<2>(this));
|
||||
}
|
||||
|
||||
if (IS_HORUS(board) && version >= 219) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board) && version >= 219) {
|
||||
for (int i=0; i<SLIDERS_CONFIG_SIZE(board,version); i++) {
|
||||
if (i < MAX_SLIDERS_STORAGE(board, version))
|
||||
internalField.Append(new UnsignedField<1>(this, generalData.sliderConfig[i]));
|
||||
|
@ -2765,7 +2765,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
|||
}
|
||||
}
|
||||
|
||||
if (!IS_HORUS(board)) {
|
||||
if (!IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
internalField.Append(new UnsignedField<8>(this, generalData.backlightColor));
|
||||
}
|
||||
}
|
||||
|
@ -2793,7 +2793,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
|||
}
|
||||
}
|
||||
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
for (int i=0; i<MAX_SWITCHES(board, version); ++i) {
|
||||
internalField.Append(new ZCharField<3>(this, generalData.switchName[i], "Switch name"));
|
||||
}
|
||||
|
@ -2832,7 +2832,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
|||
}
|
||||
}
|
||||
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
internalField.Append(new SpareBitsField<1>(this));
|
||||
internalField.Append(new UnsignedField<7>(this, generalData.backlightOffBright));
|
||||
internalField.Append(new ZCharField<10>(this, generalData.bluetoothName, "Bluetooth name"));
|
||||
|
@ -2842,7 +2842,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
|||
internalField.Append(new ZCharField<10>(this, generalData.bluetoothName, "Bluetooth name"));
|
||||
}
|
||||
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
internalField.Append(new CharField<8>(this, generalData.themeName, true, "Theme name"));
|
||||
for (int i=0; i<5; i++) {
|
||||
internalField.Append(new CharField<8>(this, (char *)generalData.themeOptionValue[i], true, "Theme blob"));
|
||||
|
|
|
@ -70,6 +70,8 @@ const char * OpenTxEepromInterface::getName()
|
|||
return "OpenTX for Jumper T12";
|
||||
case BOARD_JUMPER_T16:
|
||||
return "OpenTX for Jumper T16";
|
||||
case BOARD_RADIOMASTER_TX16S:
|
||||
return "OpenTX for Radiomaster TX16S";
|
||||
case BOARD_TARANIS_X9D:
|
||||
return "OpenTX for FrSky Taranis X9D";
|
||||
case BOARD_TARANIS_X9DP:
|
||||
|
@ -175,7 +177,7 @@ bool OpenTxEepromInterface::loadFromByteArray(T & dest, const QByteArray & data)
|
|||
{
|
||||
uint32_t fourcc = *((uint32_t*)&data.data()[0]);
|
||||
if (Boards::getFourCC(board) != fourcc) {
|
||||
if (IS_HORUS(board) && fourcc == 0x3178396F) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board) && fourcc == 0x3178396F) {
|
||||
qDebug() << QString().sprintf("%s: Deprecated fourcc used %x vs %x", getName(), fourcc, Boards::getFourCC(board));
|
||||
}
|
||||
else {
|
||||
|
@ -441,7 +443,7 @@ int OpenTxFirmware::getCapability(::Capability capability)
|
|||
{
|
||||
switch (capability) {
|
||||
case Models:
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
else if (IS_ARM(board))
|
||||
return 60;
|
||||
|
@ -457,7 +459,7 @@ int OpenTxFirmware::getCapability(::Capability capability)
|
|||
else
|
||||
return id.contains("imperial") ? 1 : 0;
|
||||
case ModelImage:
|
||||
return (board == BOARD_TARANIS_X9D || IS_TARANIS_PLUS(board) || board == BOARD_TARANIS_X9DP_2019 || IS_HORUS(board));
|
||||
return (board == BOARD_TARANIS_X9D || IS_TARANIS_PLUS(board) || board == BOARD_TARANIS_X9DP_2019 || IS_FAMILY_HORUS_OR_T16(board));
|
||||
case HasBeeper:
|
||||
return (!IS_ARM(board));
|
||||
case HasPxxCountry:
|
||||
|
@ -495,7 +497,7 @@ int OpenTxFirmware::getCapability(::Capability capability)
|
|||
else
|
||||
return 0;
|
||||
case ModelName:
|
||||
return (IS_HORUS(board) ? 15 : (HAS_LARGE_LCD(board) ? 12 : 10));
|
||||
return (IS_FAMILY_HORUS_OR_T16(board) ? 15 : (HAS_LARGE_LCD(board) ? 12 : 10));
|
||||
case FlightModesName:
|
||||
return (IS_HORUS_OR_TARANIS(board) ? 10 : 6);
|
||||
case GvarsName:
|
||||
|
@ -562,7 +564,7 @@ int OpenTxFirmware::getCapability(::Capability capability)
|
|||
case SoundPitch:
|
||||
return 1;
|
||||
case Haptic:
|
||||
return (IS_2560(board) || IS_SKY9X(board) || IS_TARANIS_PLUS(board) || IS_TARANIS_SMALL(board) || IS_TARANIS_X9E(board) || IS_HORUS(board) || IS_JUMPER_T12(board) || id.contains("haptic"));
|
||||
return (IS_2560(board) || IS_SKY9X(board) || IS_TARANIS_PLUS(board) || IS_TARANIS_SMALL(board) || IS_TARANIS_X9E(board) || IS_FAMILY_HORUS_OR_T16(board) || IS_JUMPER_T12(board) || id.contains("haptic"));
|
||||
case ModelTrainerEnable:
|
||||
if (IS_HORUS_OR_TARANIS(board) && board!=Board::BOARD_TARANIS_XLITE)
|
||||
return 1;
|
||||
|
@ -610,7 +612,7 @@ int OpenTxFirmware::getCapability(::Capability capability)
|
|||
case TelemetryBars:
|
||||
return 1;
|
||||
case TelemetryCustomScreens:
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
else
|
||||
return IS_ARM(board) ? 4 : 2;
|
||||
|
@ -663,7 +665,7 @@ int OpenTxFirmware::getCapability(::Capability capability)
|
|||
case HasSDLogs:
|
||||
return ((IS_2560(board) || IS_ARM(board)) ? true : false);
|
||||
case LcdWidth:
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 480;
|
||||
else if (IS_TARANIS_SMALL(board) || IS_JUMPER_T12(board))
|
||||
return 128;
|
||||
|
@ -672,12 +674,12 @@ int OpenTxFirmware::getCapability(::Capability capability)
|
|||
else
|
||||
return 128;
|
||||
case LcdHeight:
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 272;
|
||||
else
|
||||
return 64;
|
||||
case LcdDepth:
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 16;
|
||||
else if (IS_TARANIS_SMALL(board) || IS_JUMPER_T12(board))
|
||||
return 1;
|
||||
|
@ -747,7 +749,7 @@ int OpenTxFirmware::getCapability(::Capability capability)
|
|||
case DangerousFunctions:
|
||||
return id.contains("danger") ? 1 : 0;
|
||||
case HasModelCategories:
|
||||
return IS_HORUS(board);
|
||||
return IS_FAMILY_HORUS_OR_T16(board);
|
||||
case HasSwitchableJack:
|
||||
return IS_TARANIS_XLITES(board);
|
||||
case PwrButtonPress:
|
||||
|
@ -782,9 +784,9 @@ bool OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
|
|||
return true;
|
||||
case PULSES_PXX_XJT_X16:
|
||||
case PULSES_PXX_XJT_LR12:
|
||||
return !IS_ACCESS_RADIO(board, id) && board != BOARD_JUMPER_T16;
|
||||
return !IS_ACCESS_RADIO(board, id) && !IS_FAMILY_T16(board);
|
||||
case PULSES_PXX_XJT_D8:
|
||||
return !(IS_ACCESS_RADIO(board, id) || id.contains("eu")) && board != BOARD_JUMPER_T16;
|
||||
return !(IS_ACCESS_RADIO(board, id) || id.contains("eu")) && !IS_FAMILY_T16(board);
|
||||
case PULSES_PPM:
|
||||
return id.contains("internalppm");
|
||||
case PULSES_ACCESS_ISRM:
|
||||
|
@ -814,7 +816,7 @@ bool OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
|
|||
case PULSES_CROSSFIRE:
|
||||
return true;
|
||||
case PULSES_ACCESS_R9M:
|
||||
return IS_TARANIS_XLITE(board) || IS_TARANIS_X9LITE(board) || board == BOARD_TARANIS_X9DP_2019 || board == BOARD_X10_EXPRESS || (IS_HORUS(board) && id.contains("internalaccess"));
|
||||
return IS_TARANIS_XLITE(board) || IS_TARANIS_X9LITE(board) || board == BOARD_TARANIS_X9DP_2019 || board == BOARD_X10_EXPRESS || (IS_FAMILY_HORUS_OR_T16(board) && id.contains("internalaccess"));
|
||||
case PULSES_PXX_R9M_LITE:
|
||||
case PULSES_ACCESS_R9M_LITE:
|
||||
case PULSES_ACCESS_R9M_LITE_PRO:
|
||||
|
@ -1343,6 +1345,12 @@ void registerOpenTxFirmwares()
|
|||
registerOpenTxFirmware(firmware);
|
||||
addOpenTxRfOptions(firmware, FLEX);
|
||||
|
||||
/* Radiomaster TX16S board */
|
||||
firmware = new OpenTxFirmware("opentx-tx16s", Firmware::tr("Radiomaster TX16S"), BOARD_RADIOMASTER_TX16S);
|
||||
addOpenTxFrskyOptions(firmware);
|
||||
firmware->addOption("bluetooth", Firmware::tr("Support for bluetooth module"));
|
||||
registerOpenTxFirmware(firmware);
|
||||
|
||||
/* 9XR-Pro */
|
||||
firmware = new OpenTxFirmware("opentx-9xrpro", Firmware::tr("Turnigy 9XR-PRO"), BOARD_9XRPRO);
|
||||
addOpenTxArm9xOptions(firmware, false);
|
||||
|
|
|
@ -116,7 +116,7 @@ void RadioData::convert(RadioDataConversionState & cstate)
|
|||
}
|
||||
}
|
||||
|
||||
if (IS_HORUS(cstate.toType)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(cstate.toType)) {
|
||||
fixModelFilenames();
|
||||
}
|
||||
|
||||
|
|
|
@ -580,13 +580,13 @@ RawSource RawSource::convert(RadioDataConversionState & cstate)
|
|||
}
|
||||
}
|
||||
|
||||
if (IS_TARANIS(cstate.toType) && IS_HORUS(cstate.fromType)) {
|
||||
if (IS_TARANIS(cstate.toType) && IS_FAMILY_HORUS_OR_T16(cstate.fromType)) {
|
||||
if (index == 6)
|
||||
index = 5; // pot S2 to S2
|
||||
else if (index == 5)
|
||||
index = -1; // 6P on Horus doesn't exist on Taranis
|
||||
}
|
||||
else if (IS_HORUS(cstate.toType) && IS_TARANIS(cstate.fromType) && index == 5)
|
||||
else if (IS_FAMILY_HORUS_OR_T16(cstate.toType) && IS_TARANIS(cstate.fromType) && index == 5)
|
||||
{
|
||||
index = 6; // pot S2 to S2
|
||||
}
|
||||
|
@ -602,7 +602,7 @@ RawSource RawSource::convert(RadioDataConversionState & cstate)
|
|||
}
|
||||
}
|
||||
|
||||
if (IS_TARANIS_X7(cstate.toType) && (IS_TARANIS_X9(cstate.fromType) || IS_HORUS(cstate.fromType))) {
|
||||
if (IS_TARANIS_X7(cstate.toType) && (IS_TARANIS_X9(cstate.fromType) || IS_FAMILY_HORUS_OR_T16(cstate.fromType))) {
|
||||
// No SE and SG on X7 board
|
||||
if (index == 4 || index == 6) {
|
||||
index = 3; // SG and SE to SD
|
||||
|
@ -615,7 +615,7 @@ RawSource RawSource::convert(RadioDataConversionState & cstate)
|
|||
index = 5; // SH to SH
|
||||
}
|
||||
}
|
||||
else if (IS_JUMPER_T12(cstate.toType) && (IS_TARANIS_X9(cstate.fromType) || IS_HORUS(cstate.fromType))) {
|
||||
else if (IS_JUMPER_T12(cstate.toType) && (IS_TARANIS_X9(cstate.fromType) || IS_FAMILY_HORUS_OR_T16(cstate.fromType))) {
|
||||
// No SE and SG on T12 board
|
||||
if (index == 4 || index == 6) {
|
||||
index = 3; // SG and SE to SD
|
||||
|
@ -629,7 +629,7 @@ RawSource RawSource::convert(RadioDataConversionState & cstate)
|
|||
}
|
||||
}
|
||||
// Compensate for SE and SG on X9/Horus board if converting from X7
|
||||
else if ((IS_TARANIS_X9(cstate.toType) || IS_HORUS(cstate.toType)) && IS_TARANIS_X7(cstate.fromType)) {
|
||||
else if ((IS_TARANIS_X9(cstate.toType) || IS_FAMILY_HORUS_OR_T16(cstate.toType)) && IS_TARANIS_X7(cstate.fromType)) {
|
||||
if (index == 4) {
|
||||
index = 5; // SF to SF
|
||||
}
|
||||
|
@ -637,7 +637,7 @@ RawSource RawSource::convert(RadioDataConversionState & cstate)
|
|||
index = 7; // SH to SH
|
||||
}
|
||||
}
|
||||
else if ((IS_TARANIS_X9(cstate.toType) || IS_HORUS(cstate.toType)) && IS_JUMPER_T12(cstate.fromType)) {
|
||||
else if ((IS_TARANIS_X9(cstate.toType) || IS_FAMILY_HORUS_OR_T16(cstate.toType)) && IS_JUMPER_T12(cstate.fromType)) {
|
||||
if (index == 4) {
|
||||
index = 5; // SF to SF
|
||||
}
|
||||
|
@ -645,7 +645,7 @@ RawSource RawSource::convert(RadioDataConversionState & cstate)
|
|||
index = 7; // SH to SH
|
||||
}
|
||||
}
|
||||
else if ((IS_TARANIS_X9(cstate.toType) || IS_HORUS(cstate.toType)) && IS_JUMPER_T12(cstate.fromType)) {
|
||||
else if ((IS_TARANIS_X9(cstate.toType) || IS_FAMILY_HORUS_OR_T16(cstate.toType)) && IS_JUMPER_T12(cstate.fromType)) {
|
||||
if (index == 4) {
|
||||
index = 5; // SF to SF
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ RawSwitch RawSwitch::convert(RadioDataConversionState & cstate)
|
|||
}
|
||||
|
||||
// No SE and SG on X7 board
|
||||
if (IS_TARANIS_X7(cstate.toType) && (IS_TARANIS_X9(cstate.fromType) || IS_HORUS(cstate.fromType))) {
|
||||
if (IS_TARANIS_X7(cstate.toType) && (IS_TARANIS_X9(cstate.fromType) || IS_FAMILY_HORUS_OR_T16(cstate.fromType))) {
|
||||
if (srcIdx == 4 || srcIdx == 5) {
|
||||
delta = 3; // SE to SD & SF to SF
|
||||
if (srcIdx == 4)
|
||||
|
@ -211,7 +211,7 @@ RawSwitch RawSwitch::convert(RadioDataConversionState & cstate)
|
|||
delta = 6; // SH to SH
|
||||
}
|
||||
}
|
||||
else if (IS_JUMPER_T12(cstate.toType) && (IS_TARANIS_X9(cstate.fromType) || IS_HORUS(cstate.fromType))) {
|
||||
else if (IS_JUMPER_T12(cstate.toType) && (IS_TARANIS_X9(cstate.fromType) || IS_FAMILY_HORUS_OR_T16(cstate.fromType))) {
|
||||
if (srcIdx == 4 || srcIdx == 5) {
|
||||
delta = 3; // SE to SD & SF to SF
|
||||
if (srcIdx == 4)
|
||||
|
@ -226,7 +226,7 @@ RawSwitch RawSwitch::convert(RadioDataConversionState & cstate)
|
|||
}
|
||||
}
|
||||
// Compensate for SE and SG on X9/Horus board if converting from X7
|
||||
else if ((IS_TARANIS_X9(cstate.toType) || IS_HORUS(cstate.toType)) && IS_TARANIS_X7(cstate.fromType)) {
|
||||
else if ((IS_TARANIS_X9(cstate.toType) || IS_FAMILY_HORUS_OR_T16(cstate.toType)) && IS_TARANIS_X7(cstate.fromType)) {
|
||||
if (srcIdx == 4) {
|
||||
delta = -3; // SF to SF
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ RawSwitch RawSwitch::convert(RadioDataConversionState & cstate)
|
|||
delta = -6; // SH to SH
|
||||
}
|
||||
}
|
||||
else if ((IS_TARANIS_X9(cstate.toType) || IS_HORUS(cstate.toType)) && IS_JUMPER_T12(cstate.fromType)) {
|
||||
else if ((IS_TARANIS_X9(cstate.toType) || IS_FAMILY_HORUS_OR_T16(cstate.toType)) && IS_JUMPER_T12(cstate.fromType)) {
|
||||
if (srcIdx == 4) {
|
||||
delta = -3; // SF to SF
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ ui(new Ui::GeneralSetup)
|
|||
ui->label_BLBright->hide();
|
||||
}
|
||||
|
||||
if (!IS_HORUS(firmware->getBoard())) {
|
||||
if (!IS_FAMILY_HORUS_OR_T16(firmware->getBoard())) {
|
||||
ui->OFFBright_SB->hide();
|
||||
ui->OFFBright_SB->setDisabled(true);
|
||||
ui->label_OFFBright->hide();
|
||||
|
@ -241,7 +241,7 @@ ui(new Ui::GeneralSetup)
|
|||
ui->rssiPowerOffWarnChkB->hide();
|
||||
}
|
||||
|
||||
if (IS_HORUS(firmware->getBoard())) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(firmware->getBoard())) {
|
||||
ui->splashScreenChkB->hide();
|
||||
ui->splashScreenDuration->hide();
|
||||
ui->splashScreenLabel->hide();
|
||||
|
|
|
@ -172,7 +172,7 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
|
|||
ui->txCurrentCalibrationLabel->hide();
|
||||
}
|
||||
|
||||
if (IS_TARANIS_X7(board) || IS_TARANIS_XLITE(board)|| IS_TARANIS_X9E(board) || IS_HORUS(board)) {
|
||||
if (IS_TARANIS_X7(board) || IS_TARANIS_XLITE(board)|| IS_TARANIS_X9E(board) || IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
ui->bluetoothMode->addItem(tr("OFF"), 0);
|
||||
if (IS_TARANIS_X9E(board)) {
|
||||
ui->bluetoothMode->addItem(tr("Enabled"), 1);
|
||||
|
@ -189,7 +189,7 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
|
|||
ui->bluetoothWidget->hide();
|
||||
}
|
||||
|
||||
if ((IS_HORUS(board) && board != Board::BOARD_X10_EXPRESS) || (IS_TARANIS_XLITE(board) && !IS_TARANIS_XLITES(board))) {
|
||||
if ((IS_FAMILY_HORUS_OR_T16(board) && board != Board::BOARD_X10_EXPRESS) || (IS_TARANIS_XLITE(board) && !IS_TARANIS_XLITES(board))) {
|
||||
ui->antennaMode->addItem(tr("Internal"), -2);
|
||||
ui->antennaMode->addItem(tr("Ask"), -1);
|
||||
ui->antennaMode->addItem(tr("Per model"), 0);
|
||||
|
|
BIN
companion/src/images/simulator/TX16S/bottom.png
Executable file
After Width: | Height: | Size: 250 B |
BIN
companion/src/images/simulator/TX16S/left.png
Executable file
After Width: | Height: | Size: 47 KiB |
BIN
companion/src/images/simulator/TX16S/left_page.png
Executable file
After Width: | Height: | Size: 47 KiB |
BIN
companion/src/images/simulator/TX16S/left_page2.png
Executable file
After Width: | Height: | Size: 47 KiB |
BIN
companion/src/images/simulator/TX16S/left_rtn.png
Executable file
After Width: | Height: | Size: 47 KiB |
BIN
companion/src/images/simulator/TX16S/left_sys.png
Executable file
After Width: | Height: | Size: 47 KiB |
BIN
companion/src/images/simulator/TX16S/left_tele.png
Executable file
After Width: | Height: | Size: 47 KiB |
BIN
companion/src/images/simulator/TX16S/right.png
Executable file
After Width: | Height: | Size: 39 KiB |
BIN
companion/src/images/simulator/TX16S/right_ent.png
Executable file
After Width: | Height: | Size: 39 KiB |
BIN
companion/src/images/simulator/TX16S/right_mdl.png
Executable file
After Width: | Height: | Size: 39 KiB |
BIN
companion/src/images/simulator/TX16S/top.png
Executable file
After Width: | Height: | Size: 439 B |
|
@ -930,7 +930,7 @@ void MainWindow::readEeprom()
|
|||
{
|
||||
Board::Type board = getCurrentBoard();
|
||||
QString tempFile;
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
tempFile = generateProcessUniqueTempFileName("temp.otx");
|
||||
else if (IS_ARM(board))
|
||||
tempFile = generateProcessUniqueTempFileName("temp.bin");
|
||||
|
@ -975,7 +975,7 @@ bool MainWindow::readEepromFromRadio(const QString & filename)
|
|||
|
||||
void MainWindow::writeBackup()
|
||||
{
|
||||
if (IS_HORUS(getCurrentBoard())) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(getCurrentBoard())) {
|
||||
QMessageBox::information(this, CPN_STR_APP_NAME, tr("This function is not yet implemented"));
|
||||
return;
|
||||
// TODO implementation
|
||||
|
@ -992,7 +992,7 @@ void MainWindow::writeFlash(QString fileToFlash)
|
|||
|
||||
void MainWindow::readBackup()
|
||||
{
|
||||
if (IS_HORUS(getCurrentBoard())) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(getCurrentBoard())) {
|
||||
QMessageBox::information(this, CPN_STR_APP_NAME, tr("This function is not yet implemented"));
|
||||
return;
|
||||
// TODO implementation
|
||||
|
@ -1078,7 +1078,7 @@ void MainWindow::updateMenus()
|
|||
compareAct->setEnabled(activeChild);
|
||||
writeEepromAct->setEnabled(activeChild);
|
||||
readEepromAct->setEnabled(true);
|
||||
if (IS_HORUS(getCurrentBoard())) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(getCurrentBoard())) {
|
||||
writeBUToRadioAct->setEnabled(false);
|
||||
readBUToFileAct->setEnabled(false);
|
||||
}
|
||||
|
@ -1086,7 +1086,7 @@ void MainWindow::updateMenus()
|
|||
writeBUToRadioAct->setEnabled(true);
|
||||
readBUToFileAct->setEnabled(true);
|
||||
}
|
||||
editSplashAct->setDisabled(IS_HORUS(getCurrentBoard()));
|
||||
editSplashAct->setDisabled(IS_FAMILY_HORUS_OR_T16(getCurrentBoard()));
|
||||
|
||||
foreach (QAction * act, fileWindowActions) {
|
||||
if (!act)
|
||||
|
|
|
@ -534,7 +534,7 @@ void MdiChild::initModelsList()
|
|||
connect(modelsListModel, &QAbstractItemModel::dataChanged, this, &MdiChild::onDataChanged);
|
||||
|
||||
ui->modelsList->setModel(modelsListModel);
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
ui->modelsList->setIndentation(20);
|
||||
// ui->modelsList->resetIndentation(); // introduced in next Qt versions ...
|
||||
}
|
||||
|
@ -1531,7 +1531,7 @@ int MdiChild::askQuestion(const QString & msg, QMessageBox::StandardButtons butt
|
|||
void MdiChild::writeEeprom() // write to Tx
|
||||
{
|
||||
Board::Type board = getCurrentBoard();
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
QString radioPath = findMassstoragePath("RADIO", true);
|
||||
qDebug() << "Searching for SD card, found" << radioPath;
|
||||
if (radioPath.isEmpty()) {
|
||||
|
|
|
@ -209,7 +209,7 @@ ModulePanel::ModulePanel(QWidget * parent, ModelData & model, ModuleData & modul
|
|||
ui->trainerMode->setItemData(TRAINER_MODE_SLAVE_BLUETOOTH, 0, Qt::UserRole - 1);
|
||||
}
|
||||
|
||||
if (!IS_JUMPER_T16(firmware->getBoard())) {
|
||||
if (!IS_FAMILY_T16(firmware->getBoard())) {
|
||||
ui->trainerMode->setItemData(TRAINER_MODE_MULTI, 0, Qt::UserRole - 1);
|
||||
}
|
||||
|
||||
|
@ -1001,7 +1001,7 @@ SetupPanel::SetupPanel(QWidget * parent, ModelData & model, GeneralSettings & ge
|
|||
QDir qd(path);
|
||||
if (qd.exists()) {
|
||||
QStringList filters;
|
||||
if(IS_HORUS(board)) {
|
||||
if(IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
filters << "*.bmp" << "*.jpg" << "*.png";
|
||||
foreach ( QString file, qd.entryList(filters, QDir::Files) ) {
|
||||
QFileInfo fi(file);
|
||||
|
@ -1032,17 +1032,17 @@ SetupPanel::SetupPanel(QWidget * parent, ModelData & model, GeneralSettings & ge
|
|||
ui->image->setCurrentIndex(ui->image->count()-1);
|
||||
QString fileName = path;
|
||||
fileName.append(model.bitmap);
|
||||
if (!IS_HORUS(board))
|
||||
if (!IS_FAMILY_HORUS_OR_T16(board))
|
||||
fileName.append(".bmp");
|
||||
QImage image(fileName);
|
||||
if (image.isNull() && !IS_HORUS(board)) {
|
||||
if (image.isNull() && !IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
fileName = path;
|
||||
fileName.append(model.bitmap);
|
||||
fileName.append(".BMP");
|
||||
image.load(fileName);
|
||||
}
|
||||
if (!image.isNull()) {
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
ui->imagePreview->setFixedSize(QSize(192, 114));
|
||||
ui->imagePreview->setPixmap(QPixmap::fromImage(image.scaled(192, 114)));
|
||||
}
|
||||
|
@ -1281,17 +1281,17 @@ void SetupPanel::on_image_currentIndexChanged(int index)
|
|||
if (qd.exists()) {
|
||||
QString fileName=path;
|
||||
fileName.append(model->bitmap);
|
||||
if (!IS_HORUS(board))
|
||||
if (!IS_FAMILY_HORUS_OR_T16(board))
|
||||
fileName.append(".bmp");
|
||||
QImage image(fileName);
|
||||
if (image.isNull() && !IS_HORUS(board)) {
|
||||
if (image.isNull() && !IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
fileName=path;
|
||||
fileName.append(model->bitmap);
|
||||
fileName.append(".BMP");
|
||||
image.load(fileName);
|
||||
}
|
||||
if (!image.isNull()) {
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
ui->imagePreview->setFixedSize(QSize(192, 114));
|
||||
ui->imagePreview->setPixmap(QPixmap::fromImage(image.scaled(192, 114)));
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ TreeModel::TreeModel(RadioData * radioData, QObject * parent):
|
|||
if (!hasCategories)
|
||||
labels << tr("Index");
|
||||
labels << tr("Name");
|
||||
if (!(IS_HORUS(board) || IS_SKY9X(board))) {
|
||||
if (!(IS_FAMILY_HORUS_OR_T16(board) || IS_SKY9X(board))) {
|
||||
labels << tr("Size");
|
||||
}
|
||||
labels << tr("RX #");
|
||||
|
@ -651,7 +651,7 @@ void TreeModel::refresh()
|
|||
EEPROMInterface * eepromInterface = getCurrentEEpromInterface();
|
||||
Board::Type board = eepromInterface->getBoard();
|
||||
TreeItem * defaultCategoryItem = NULL;
|
||||
bool hasEepromSizeData = (IS_HORUS(board) ? false : true);
|
||||
bool hasEepromSizeData = (IS_FAMILY_HORUS_OR_T16(board) ? false : true);
|
||||
|
||||
if (hasEepromSizeData) {
|
||||
availableEEpromSize = Boards::getEEpromSize(board) - 64; // let's consider fat
|
||||
|
|
|
@ -314,7 +314,7 @@ bool readEeprom(const QString & filename, ProgressWidget * progress)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
QString radioPath = findMassstoragePath("RADIO", true);
|
||||
qDebug() << "Searching for SD card, found" << radioPath;
|
||||
if (radioPath.isEmpty()) {
|
||||
|
|
|
@ -14,6 +14,7 @@ set(simulation_SRCS
|
|||
simulateduiwidgetX12.cpp
|
||||
simulateduiwidgetJumperT12.cpp
|
||||
simulateduiwidgetJumperT16.cpp
|
||||
simulateduiwidgetTX16S.cpp
|
||||
simulatorinterface.cpp
|
||||
simulatormainwindow.cpp
|
||||
simulatorstartupdialog.cpp
|
||||
|
@ -38,6 +39,7 @@ set(simulation_UIS
|
|||
simulateduiwidgetX12.ui
|
||||
simulateduiwidgetJumperT12.ui
|
||||
simulateduiwidgetJumperT16.ui
|
||||
simulateduiwidgetTX16S.ui
|
||||
simulatormainwindow.ui
|
||||
simulatorstartupdialog.ui
|
||||
simulatorwidget.ui
|
||||
|
|
|
@ -113,6 +113,7 @@ namespace Ui {
|
|||
class SimulatedUIWidgetX12;
|
||||
class SimulatedUIWidgetJumperT12;
|
||||
class SimulatedUIWidgetJumperT16;
|
||||
class SimulatedUIWidgetTX16S;
|
||||
}
|
||||
|
||||
class SimulatedUIWidget9X: public SimulatedUIWidget
|
||||
|
@ -251,5 +252,17 @@ class SimulatedUIWidgetJumperT16: public SimulatedUIWidget
|
|||
Ui::SimulatedUIWidgetJumperT16 * ui;
|
||||
};
|
||||
|
||||
class SimulatedUIWidgetTX16S: public SimulatedUIWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SimulatedUIWidgetTX16S(SimulatorInterface * simulator, QWidget * parent = nullptr);
|
||||
virtual ~SimulatedUIWidgetTX16S();
|
||||
|
||||
private:
|
||||
Ui::SimulatedUIWidgetTX16S * ui;
|
||||
};
|
||||
|
||||
|
||||
#endif // SIMULATEDUIWIDGET_H
|
||||
|
|
72
companion/src/simulation/simulateduiwidgetTX16S.cpp
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 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_simulateduiwidgetTX16S.h"
|
||||
|
||||
SimulatedUIWidgetTX16S::SimulatedUIWidgetTX16S(SimulatorInterface *simulator, QWidget * parent):
|
||||
SimulatedUIWidget(simulator, parent),
|
||||
ui(new Ui::SimulatedUIWidgetTX16S)
|
||||
{
|
||||
RadioUiAction * act;
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
// add actions in order of appearance on the help menu
|
||||
|
||||
act = new RadioUiAction(3, QList<int>() << Qt::Key_Up, SIMU_STR_HLP_KEY_UP, SIMU_STR_HLP_ACT_MDL);
|
||||
addRadioWidget(ui->rightbuttons->addArea(QRect(10, 0, 80, 35), "TX16S/right_mdl.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->rightbuttons->addArea(QRect(45, 70, 100, 160), "TX16S/right_ent.png", m_mouseMidClickAction));
|
||||
|
||||
act = new RadioUiAction(6, QList<int>() << Qt::Key_Left, SIMU_STR_HLP_KEY_LFT, SIMU_STR_HLP_ACT_SYS);
|
||||
addRadioWidget(ui->leftbuttons->addArea(QRect(32, 1, 80, 35), "TX16S/left_sys.png", act));
|
||||
|
||||
act = new RadioUiAction(5, QList<int>() << Qt::Key_Right, SIMU_STR_HLP_KEY_RGT, SIMU_STR_HLP_ACT_TELE);
|
||||
addRadioWidget(ui->leftbuttons->addArea(QRect(55, 220, 80, 35), "TX16S/left_tele.png", act));
|
||||
|
||||
act = new RadioUiAction(1, QList<int>() << Qt::Key_PageDown, SIMU_STR_HLP_KEY_PGDN, SIMU_STR_HLP_ACT_PGDN);
|
||||
addRadioWidget(ui->leftbuttons->addArea(QRect(55, 115, 80, 35), "TX16S/left_page.png", act));
|
||||
|
||||
act = new RadioUiAction(0, QList<int>() << Qt::Key_PageUp, SIMU_STR_HLP_KEY_PGUP, SIMU_STR_HLP_ACT_PGUP);
|
||||
addRadioWidget(ui->leftbuttons->addArea(QRect(55, 160, 80, 35), "TX16S/left_page2.png", act));
|
||||
|
||||
act = new RadioUiAction(4, 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(55, 55, 80, 35), "TX16S/left_rtn.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();
|
||||
|
||||
addRadioWidget(ui->leftbuttons->addArea(QRect(10, 252, 30, 30), "TX16S/left_scrnsht.png", m_screenshotAction));
|
||||
|
||||
m_backlightColors << QColor(47, 123, 227);
|
||||
|
||||
setLcd(ui->lcd);
|
||||
}
|
||||
|
||||
SimulatedUIWidgetTX16S::~SimulatedUIWidgetTX16S()
|
||||
{
|
||||
delete ui;
|
||||
}
|
197
companion/src/simulation/simulateduiwidgetTX16S.ui
Normal file
|
@ -0,0 +1,197 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SimulatedUIWidgetTX16S</class>
|
||||
<widget class="QWidget" name="SimulatedUIWidgetTX16S">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>825</width>
|
||||
<height>292</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>825</width>
|
||||
<height>292</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>825</width>
|
||||
<height>292</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<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>174</width>
|
||||
<height>292</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>174</width>
|
||||
<height>292</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:url(:/images/simulator/TX16S/right.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>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>
|
||||
</item>
|
||||
<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>174</width>
|
||||
<height>292</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>174</width>
|
||||
<height>292</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:url(:/images/simulator/TX16S/left.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>480</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>480</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>5</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:url(:/images/simulator/TX16S/top.png)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QWidget" name="bottom" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>480</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>480</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>5</pointsize>
|
||||
<kerning>false</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:url(:/images/simulator/TX16S/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>
|
|
@ -86,7 +86,7 @@ void SimulatorStartupDialog::changeEvent(QEvent *e)
|
|||
// FIXME : need a better way to check for this
|
||||
bool SimulatorStartupDialog::usesCategorizedStorage(const QString & name)
|
||||
{
|
||||
return name.contains(QRegExp("(x12|x10|horus|t16)", Qt::CaseInsensitive));
|
||||
return name.contains(QRegExp("(x12|x10|horus|16)", Qt::CaseInsensitive));
|
||||
}
|
||||
|
||||
bool SimulatorStartupDialog::usesCategorizedStorage()
|
||||
|
|
|
@ -94,6 +94,9 @@ SimulatorWidget::SimulatorWidget(QWidget * parent, SimulatorInterface * simulato
|
|||
case Board::BOARD_JUMPER_T16:
|
||||
radioUiWidget = new SimulatedUIWidgetJumperT16(simulator, this);
|
||||
break;
|
||||
case Board::BOARD_RADIOMASTER_TX16S:
|
||||
radioUiWidget = new SimulatedUIWidgetTX16S(simulator, this);
|
||||
break;
|
||||
default:
|
||||
radioUiWidget = new SimulatedUIWidget9X(simulator, this);
|
||||
break;
|
||||
|
@ -270,7 +273,7 @@ bool SimulatorWidget::setRadioData(RadioData * radioData)
|
|||
|
||||
saveTempRadioData = (flags & SIMULATOR_FLAGS_STANDALONE);
|
||||
|
||||
if (IS_HORUS(m_board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(m_board))
|
||||
ret = useTempDataPath(true);
|
||||
|
||||
if (ret) {
|
||||
|
|
|
@ -93,7 +93,7 @@ bool CategorizedStorageFormat::load(RadioData & radioData)
|
|||
return false;
|
||||
}
|
||||
strncpy(radioData.models[modelIndex].filename, qPrintable(fileName), sizeof(radioData.models[modelIndex].filename));
|
||||
if (IS_HORUS(board) && !strcmp(radioData.generalSettings.currModelFilename, qPrintable(fileName))) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board) && !strcmp(radioData.generalSettings.currModelFilename, qPrintable(fileName))) {
|
||||
radioData.generalSettings.currModelIndex = modelIndex;
|
||||
qDebug() << "currModelIndex =" << modelIndex;
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ void RleFile::EeFsSetDat(unsigned int blk, unsigned int ofs, const uint8_t *buf,
|
|||
|
||||
unsigned int RleFile::EeFsGetFree()
|
||||
{
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
|
||||
unsigned int ret = 0;
|
||||
|
@ -261,7 +261,7 @@ unsigned int RleFile::EeFsGetFree()
|
|||
*/
|
||||
void RleFile::EeFsFree(unsigned int blk)
|
||||
{
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return;
|
||||
|
||||
unsigned int i = blk;
|
||||
|
@ -281,7 +281,7 @@ void RleFile::EeFsFree(unsigned int blk)
|
|||
*/
|
||||
unsigned int RleFile::EeFsAlloc()
|
||||
{
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
unsigned int ret = (IS_ARM(board) ? eeFsArm->freeList : eeFs->freeList);
|
||||
if (ret) {
|
||||
|
@ -296,7 +296,7 @@ unsigned int RleFile::EeFsAlloc()
|
|||
|
||||
unsigned int RleFile::size(unsigned int id)
|
||||
{
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
else
|
||||
return IS_ARM(board) ? eeFsArm->files[id].size : eeFs->files[id].size;
|
||||
|
@ -304,7 +304,7 @@ unsigned int RleFile::size(unsigned int id)
|
|||
|
||||
unsigned int RleFile::openRd(unsigned int i_fileId)
|
||||
{
|
||||
if (IS_HORUS(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
return 1;
|
||||
}
|
||||
else if (IS_SKY9X(board)) {
|
||||
|
@ -341,7 +341,7 @@ unsigned int RleFile::openRd(unsigned int i_fileId)
|
|||
|
||||
unsigned int RleFile::read(uint8_t *buf, unsigned int i_len)
|
||||
{
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
|
||||
unsigned int len = IS_ARM(board) ? eeFsArm->files[m_fileId].size : eeFs->files[m_fileId].size;
|
||||
|
@ -364,7 +364,7 @@ unsigned int RleFile::read(uint8_t *buf, unsigned int i_len)
|
|||
// G: Read runlength (RLE) compressed bytes into buf.
|
||||
unsigned int RleFile::readRlc12(uint8_t *buf, unsigned int i_len, bool rlc2)
|
||||
{
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
|
||||
memset(buf, 0, i_len);
|
||||
|
@ -550,7 +550,7 @@ void RleFile::closeTrunc()
|
|||
|
||||
unsigned int RleFile::writeRlc1(unsigned int i_fileId, unsigned int typ, const uint8_t *buf, unsigned int i_len)
|
||||
{
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
|
||||
create(i_fileId, typ);
|
||||
|
@ -599,7 +599,7 @@ unsigned int RleFile::writeRlc1(unsigned int i_fileId, unsigned int typ, const u
|
|||
*/
|
||||
unsigned int RleFile::writeRlc2(unsigned int i_fileId, unsigned int typ, const uint8_t *buf, unsigned int i_len)
|
||||
{
|
||||
if (IS_HORUS(board))
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
|
||||
if (IS_SKY9X(board)) {
|
||||
|
|
BIN
radio/sdcard/horus/THEMES/Darkblue/tx16s.bmp
Executable file
After Width: | Height: | Size: 161 KiB |
BIN
radio/sdcard/horus/THEMES/Default/tx16s.bmp
Normal file
After Width: | Height: | Size: 121 KiB |
BIN
radio/src/bitmaps/480x272/mask_txbat_charging.png
Executable file
After Width: | Height: | Size: 4.9 KiB |
|
@ -191,6 +191,8 @@ enum TrainerMode {
|
|||
#if defined(PCBTARANIS)
|
||||
TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE,
|
||||
TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE,
|
||||
#endif
|
||||
#if defined(PCBTARANIS) || defined(AUX_SERIAL)
|
||||
TRAINER_MODE_MASTER_BATTERY_COMPARTMENT,
|
||||
#endif
|
||||
TRAINER_MODE_MASTER_BLUETOOTH,
|
||||
|
@ -205,7 +207,7 @@ enum TrainerMode {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(RADIO_T16) || defined(ALLOW_TRAINER_MULTI)
|
||||
#if defined(RADIO_FAMILY_T16) || defined(ALLOW_TRAINER_MULTI)
|
||||
#define TRAINER_MODE_MAX() TRAINER_MODE_MULTI
|
||||
#elif defined(BLUETOOTH)
|
||||
#define TRAINER_MODE_MAX() TRAINER_MODE_SLAVE_BLUETOOTH
|
||||
|
|
|
@ -64,6 +64,10 @@ const uint8_t LBM_TOPMENU_TXBATT[] = {
|
|||
#include "mask_txbat.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_TOPMENU_TXBATT_CHARGING[] = {
|
||||
#include "mask_txbat_charging.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_TOPMENU_ANTENNA[] = {
|
||||
#include "mask_antenna.lbm"
|
||||
};
|
||||
|
|
|
@ -34,6 +34,7 @@ extern const uint8_t LBM_TOPMENU_VOLUME_3[];
|
|||
extern const uint8_t LBM_TOPMENU_VOLUME_4[];
|
||||
extern const uint8_t LBM_TOPMENU_VOLUME_SCALE[];
|
||||
extern const uint8_t LBM_TOPMENU_TXBATT[];
|
||||
extern const uint8_t LBM_TOPMENU_TXBATT_CHARGING[];
|
||||
extern const uint8_t LBM_HTRIM_FRAME[];
|
||||
extern const uint8_t LBM_VTRIM_FRAME[];
|
||||
extern const uint8_t LBM_TRIM_SHADOW[];
|
||||
|
|
|
@ -347,6 +347,9 @@ bool menuRadioHardware(event_t event)
|
|||
#if defined(AUX_SERIAL)
|
||||
case ITEM_RADIO_HARDWARE_AUX_SERIAL_MODE:
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_AUX_SERIAL_MODE);
|
||||
#if defined(RADIO_TX16S)
|
||||
lcdDrawText(lcdNextPos, y, " (TTL)");
|
||||
#endif
|
||||
g_eeGeneral.auxSerialMode = editChoice(HW_SETTINGS_COLUMN+50, y, STR_AUX_SERIAL_MODES, g_eeGeneral.auxSerialMode, 0, UART_MODE_MAX, attr, event);
|
||||
if (attr && checkIncDec_Ret) {
|
||||
auxSerialInit(g_eeGeneral.auxSerialMode, modelTelemetryProtocol());
|
||||
|
|
|
@ -139,6 +139,8 @@ class DarkblueTheme: public Theme
|
|||
delete calibHorus;
|
||||
#if defined(RADIO_T16)
|
||||
calibHorus = BitmapBuffer::load(getThemePath("t16.bmp"));
|
||||
#elif defined(RADIO_TX16S)
|
||||
calibHorus = BitmapBuffer::load(getThemePath("tx16s.bmp"));
|
||||
#elif defined(PCBX10)
|
||||
if(STICKS_PWM_ENABLED()) {
|
||||
calibHorus = BitmapBuffer::load(getThemePath("X10S.bmp"));
|
||||
|
|
|
@ -176,6 +176,8 @@ class DefaultTheme: public Theme
|
|||
delete calibHorus;
|
||||
#if defined(RADIO_T16)
|
||||
calibHorus = BitmapBuffer::load(getThemePath("t16.bmp"));
|
||||
#elif defined(RADIO_TX16S)
|
||||
calibHorus = BitmapBuffer::load(getThemePath("tx16s.bmp"));
|
||||
#elif defined(PCBX10)
|
||||
if(STICKS_PWM_ENABLED()) {
|
||||
calibHorus = BitmapBuffer::load(getThemePath("X10S.bmp"));
|
||||
|
|
|
@ -90,6 +90,11 @@ void drawTopBar()
|
|||
|
||||
/* Tx battery */
|
||||
uint8_t bars = GET_TXBATT_BARS(5);
|
||||
#if defined(USB_CHARGER)
|
||||
if(usbChargerLed())
|
||||
lcdDrawBitmapPattern(LCD_W-130, 24, LBM_TOPMENU_TXBATT_CHARGING, MENU_TITLE_COLOR);
|
||||
else
|
||||
#endif
|
||||
lcdDrawBitmapPattern(LCD_W-130, 24, LBM_TOPMENU_TXBATT, MENU_TITLE_COLOR);
|
||||
for (unsigned int i = 0; i < 5; i++) {
|
||||
lcdDrawSolidFilledRect(LCD_W-122+4*i, 30, 2, 8, i >= bars ? MENU_TITLE_DISABLE_COLOR : MENU_TITLE_COLOR);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#if defined(PCBX12S)
|
||||
#include "lua/lua_exports_x12s.inc" // this line must be after lua headers
|
||||
#elif defined(RADIO_T16)
|
||||
#elif defined(RADIO_FAMILY_T16)
|
||||
#include "lua/lua_exports_t16.inc"
|
||||
#elif defined(PCBX10)
|
||||
#include "lua/lua_exports_x10.inc"
|
||||
|
|
|
@ -546,7 +546,7 @@ bool setTrimValue(uint8_t phase, uint8_t idx, int trim);
|
|||
|
||||
#if defined(PCBSKY9X)
|
||||
#define ROTARY_ENCODER_GRANULARITY (2 << g_eeGeneral.rotarySteps)
|
||||
#elif defined(RADIO_T16)
|
||||
#elif defined(RADIO_FAMILY_T16)
|
||||
#define ROTARY_ENCODER_GRANULARITY (1)
|
||||
#else
|
||||
#define ROTARY_ENCODER_GRANULARITY (2)
|
||||
|
|
|
@ -128,6 +128,8 @@ const char * getBasename(const char * path);
|
|||
#define OTX_FOURCC 0x3478746F // otx for X12S
|
||||
#elif defined(RADIO_T16)
|
||||
#define OTX_FOURCC 0x3F78746F // otx for Jumper T16
|
||||
#elif defined(RADIO_TX16S)
|
||||
#define OTX_FOURCC 0x3878746F // otx for Radiomaster TX16S
|
||||
#elif defined(PCBX10)
|
||||
#define OTX_FOURCC 0x3778746F // otx for X10
|
||||
#elif defined(PCBX9E)
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
// not needed
|
||||
#elif defined(RADIO_T16)
|
||||
const int8_t adcDirection[NUM_ANALOGS] = {1,-1,1,-1, 1,1,1, -1,1, -1,1};
|
||||
#elif defined(RADIO_TX16S)
|
||||
const int8_t adcDirection[NUM_ANALOGS] = {-1,1,-1,1, 1,1,1, -1,1, -1,1};
|
||||
#elif defined(PCBX10)
|
||||
const int8_t adcDirection[NUM_ANALOGS] = {1,-1,1,-1, -1,1,-1, 1,1, 1, -1};
|
||||
#elif defined(PCBX9E)
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
#include "targets/horus/board.h"
|
||||
|
||||
#if defined(AUX_SERIAL)
|
||||
uint8_t auxSerialMode = 0;
|
||||
|
@ -40,6 +41,13 @@ void auxSerialSetup(unsigned int baudrate, bool dma)
|
|||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
|
||||
GPIO_Init(AUX_SERIAL_GPIO, &GPIO_InitStructure);
|
||||
|
||||
#if defined(AUX_SERIAL_PWR_GPIO)
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
|
||||
GPIO_InitStructure.GPIO_Pin = AUX_SERIAL_PWR_GPIO_PIN;
|
||||
GPIO_Init(AUX_SERIAL_PWR_GPIO, &GPIO_InitStructure);
|
||||
#endif
|
||||
|
||||
USART_InitStructure.USART_BaudRate = baudrate;
|
||||
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
|
||||
USART_InitStructure.USART_StopBits = USART_StopBits_1;
|
||||
|
@ -133,6 +141,7 @@ void auxSerialSbusInit()
|
|||
{
|
||||
auxSerialSetup(SBUS_BAUDRATE, true);
|
||||
AUX_SERIAL_USART->CR1 |= USART_CR1_M | USART_CR1_PCE ;
|
||||
AUX_SERIAL_POWER_ON();
|
||||
}
|
||||
|
||||
void auxSerialStop()
|
||||
|
|
|
@ -116,11 +116,20 @@ if(PCB STREQUAL X10 OR PCB STREQUAL X12S)
|
|||
../../../../../syscalls.c
|
||||
)
|
||||
|
||||
if(USB_CHARGER)
|
||||
set(BOOTLOADER_SRC
|
||||
${BOOTLOADER_SRC}
|
||||
../../../../../targets/${TARGET_DIR}/usb_charger_driver.cpp
|
||||
../../../../../targets/${TARGET_DIR}/led_driver.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if(DEBUG)
|
||||
set(BOOTLOADER_SRC
|
||||
${BOOTLOADER_SRC}
|
||||
../../../../../${STM32LIB_DIR}/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.c
|
||||
../../../../../serial.cpp
|
||||
../../../../../targets/common/arm/stm32/aux_serial_driver.cpp
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
|
|
|
@ -205,11 +205,26 @@ int main()
|
|||
AUX_SERIAL_RCC_APB1Periph |
|
||||
SD_RCC_APB1Periph, ENABLE);
|
||||
|
||||
RCC_APB2PeriphClockCmd(LCD_RCC_APB2Periph | BACKLIGHT_RCC_APB2Periph | RCC_APB2Periph_SYSCFG, ENABLE);
|
||||
RCC_APB2PeriphClockCmd(LCD_RCC_APB2Periph | BACKLIGHT_RCC_APB2Periph | RCC_APB2Periph_SYSCFG | AUX_SERIAL_RCC_APB2Periph, ENABLE);
|
||||
|
||||
pwrInit();
|
||||
keysInit();
|
||||
|
||||
// USB charger handling
|
||||
#if defined(USB_CHARGER)
|
||||
if (!WAS_RESET_BY_WATCHDOG_OR_SOFTWARE() && !pwrPressed()) {
|
||||
ledInit();
|
||||
usbChargerInit();
|
||||
ledOff();
|
||||
while (!pwrPressed()) {
|
||||
if(usbChargerLed())
|
||||
GPIO_SetBits(LED_GPIO, LED_GREEN_GPIO_PIN);
|
||||
else
|
||||
ledOff();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// wait a bit for the inputs to stabilize...
|
||||
if (!WAS_RESET_BY_WATCHDOG_OR_SOFTWARE()) {
|
||||
for (uint32_t i = 0; i < 150000; i++) {
|
||||
|
|
|
@ -71,7 +71,7 @@ void rotaryEncoderInit()
|
|||
|
||||
void rotaryEncoderCheck()
|
||||
{
|
||||
#if defined(RADIO_T16)
|
||||
#if defined(RADIO_FAMILY_T16)
|
||||
static uint8_t state = 0;
|
||||
uint8_t pins = ROTARY_ENCODER_POSITION();
|
||||
|
||||
|
|
|
@ -51,8 +51,20 @@ if (PCB STREQUAL X10)
|
|||
set(FLAVOUR t16)
|
||||
set(LUA_EXPORT lua_export_t16)
|
||||
add_definitions(-DRADIO_T16)
|
||||
add_definitions(-DRADIO_FAMILY_T16)
|
||||
option(INTERNAL_MODULE_MULTI "Support for MULTI internal module" OFF)
|
||||
option(BLUETOOTH "Support for bluetooth module" OFF)
|
||||
elseif (PCBREV STREQUAL TX16S)
|
||||
set(FLAVOUR tx16s)
|
||||
set(LUA_EXPORT lua_export_t16)
|
||||
add_definitions(-DRADIO_TX16S)
|
||||
add_definitions(-DRADIO_FAMILY_T16)
|
||||
option(INTERNAL_MODULE_MULTI "Support for MULTI internal module" ON)
|
||||
option(BLUETOOTH "Support for bluetooth module" OFF)
|
||||
if (NOT BLUETOOTH)
|
||||
set(AUX_SERIAL ON)
|
||||
endif()
|
||||
set(USB_CHARGER YES)
|
||||
else()
|
||||
set(FLAVOUR x10)
|
||||
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
|
||||
|
@ -195,15 +207,26 @@ set(TARGET_SRC
|
|||
../common/arm/stm32/rotary_encoder_driver.cpp
|
||||
)
|
||||
|
||||
if(USB_CHARGER)
|
||||
set(TARGET_SRC ${TARGET_SRC} usb_charger_driver.cpp)
|
||||
add_definitions(-DUSB_CHARGER)
|
||||
endif()
|
||||
|
||||
if(BLUETOOTH)
|
||||
add_definitions(-DBLUETOOTH)
|
||||
set(TARGET_SRC ${TARGET_SRC} ../common/arm/stm32/bluetooth_driver.cpp)
|
||||
set(SRC ${SRC} bluetooth.cpp)
|
||||
endif()
|
||||
|
||||
if (AUX_SERIAL)
|
||||
add_definitions(-DAUX_SERIAL)
|
||||
set(AUX_SERIAL_DRIVER ../common/arm/stm32/aux_serial_driver.cpp)
|
||||
endif()
|
||||
|
||||
set(FIRMWARE_TARGET_SRC
|
||||
${FIRMWARE_TARGET_SRC}
|
||||
${LCD_DRIVER}
|
||||
${AUX_SERIAL_DRIVER}
|
||||
board.cpp
|
||||
backlight_driver.cpp
|
||||
../common/arm/stm32/pwr_driver.cpp
|
||||
|
|
|
@ -41,6 +41,18 @@ void watchdogInit(unsigned int duration)
|
|||
IWDG->KR = 0xCCCC; // start
|
||||
}
|
||||
|
||||
#if defined(AUX_SERIAL_PWR_GPIO)
|
||||
void auxSerialPowerOn()
|
||||
{
|
||||
GPIO_SetBits(AUX_SERIAL_PWR_GPIO, AUX_SERIAL_PWR_GPIO_PIN);
|
||||
}
|
||||
|
||||
void auxSerialPowerOff()
|
||||
{
|
||||
GPIO_ResetBits(AUX_SERIAL_PWR_GPIO, AUX_SERIAL_PWR_GPIO_PIN);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCBX10) && !defined(RADIO_T16)
|
||||
void sportUpdateInit()
|
||||
{
|
||||
|
@ -110,6 +122,7 @@ void boardInit()
|
|||
EXTMODULE_RCC_APB2Periph |
|
||||
TELEMETRY_RCC_APB2Periph |
|
||||
BT_RCC_APB2Periph |
|
||||
AUX_SERIAL_RCC_APB2Periph |
|
||||
BACKLIGHT_RCC_APB2Periph,
|
||||
ENABLE);
|
||||
|
||||
|
@ -119,6 +132,10 @@ void boardInit()
|
|||
|
||||
__enable_irq();
|
||||
|
||||
#if defined(DEBUG) && defined(AUX_SERIAL)
|
||||
auxSerialInit(UART_MODE_DEBUG, 0); // default serial mode (None if DEBUG not defined)
|
||||
#endif
|
||||
|
||||
TRACE("\nHorus board started :)");
|
||||
TRACE("RCC->CSR = %08x", RCC->CSR);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ extern uint16_t sessionTimer;
|
|||
|
||||
#define SLAVE_MODE() (g_model.trainerData.mode == TRAINER_MODE_SLAVE)
|
||||
|
||||
#if defined(PCBX10) && !defined(RADIO_T16)
|
||||
#if defined(PCBX10) && !defined(RADIO_FAMILY_T16)
|
||||
#define TRAINER_CONNECTED() (GPIO_ReadInputDataBit(TRAINER_DETECT_GPIO, TRAINER_DETECT_GPIO_PIN) == Bit_SET)
|
||||
#else
|
||||
#define TRAINER_CONNECTED() (GPIO_ReadInputDataBit(TRAINER_DETECT_GPIO, TRAINER_DETECT_GPIO_PIN) == Bit_RESET)
|
||||
|
@ -490,6 +490,10 @@ void pwrResetHandler();
|
|||
bool pwrPressed();
|
||||
uint32_t pwrPressedDuration();
|
||||
|
||||
// USB Charger
|
||||
void usbChargerInit();
|
||||
bool usbChargerLed();
|
||||
|
||||
// Led driver
|
||||
void ledInit();
|
||||
void ledOff();
|
||||
|
@ -527,7 +531,7 @@ void backlightEnable(uint8_t dutyCycle = 0);
|
|||
#define BACKLIGHT_LEVEL_MAX 100
|
||||
#if defined(PCBX12S)
|
||||
#define BACKLIGHT_LEVEL_MIN 5
|
||||
#elif defined(RADIO_T16)
|
||||
#elif defined(RADIO_FAMILY_T16)
|
||||
#define BACKLIGHT_LEVEL_MIN 1
|
||||
#else
|
||||
#define BACKLIGHT_LEVEL_MIN 46
|
||||
|
@ -547,6 +551,10 @@ void usbJoystickUpdate();
|
|||
#define USB_NAME "Jumper T16"
|
||||
#define USB_MANUFACTURER 'J', 'u', 'm', 'p', 'e', 'r', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '1', '6', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_TX16S)
|
||||
#define USB_NAME "RadioMas TX16S"
|
||||
#define USB_MANUFACTURER 'R', 'a', 'd', 'i', 'o', 'M', 'a ', 's ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', 'X', '1', '6 ', 'S ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(PCBX10)
|
||||
#define USB_NAME "FrSky X10"
|
||||
#define USB_MANUFACTURER 'F', 'r', 'S', 'k', 'y', ' ', ' ', ' ' /* 8 bytes */
|
||||
|
@ -598,6 +606,26 @@ void sportUpdatePowerOff();
|
|||
#define SPORT_UPDATE_POWER_OFF()
|
||||
#endif
|
||||
|
||||
// Second serial port driver
|
||||
#if defined(AUX_SERIAL_GPIO)
|
||||
#define DEBUG_BAUDRATE 115200
|
||||
extern uint8_t auxSerialMode;
|
||||
void auxSerialInit(unsigned int mode, unsigned int protocol);
|
||||
void auxSerialPutc(char c);
|
||||
#define auxSerialTelemetryInit(protocol) auxSerialInit(UART_MODE_TELEMETRY, protocol)
|
||||
void auxSerialSbusInit();
|
||||
void auxSerialStop();
|
||||
void auxSerialPowerOn();
|
||||
void auxSerialPowerOff();
|
||||
#if defined(AUX_SERIAL_PWR_GPIO)
|
||||
#define AUX_SERIAL_POWER_ON() auxSerialPowerOn()
|
||||
#define AUX_SERIAL__POWER_OFF() auxSerialPowerOff()
|
||||
#else
|
||||
#define AUX_SERIAL_POWER_ON()
|
||||
#define AUX_SERIAL__POWER_OFF()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Haptic driver
|
||||
void hapticInit();
|
||||
void hapticDone();
|
||||
|
|
|
@ -38,6 +38,21 @@
|
|||
#define KEYS_GPIO_PIN_DOWN GPIO_Pin_6 // PI.06
|
||||
#define KEYS_GPIO_REG_RIGHT GPIOC->IDR
|
||||
#define KEYS_GPIO_PIN_RIGHT GPIO_Pin_4 // PC.04
|
||||
#elif defined(RADIO_TX16S)
|
||||
#define KEYS_GPIO_REG_ENTER GPIOI->IDR
|
||||
#define KEYS_GPIO_PIN_ENTER GPIO_Pin_8 // PI.08
|
||||
#define KEYS_GPIO_REG_PGUP GPIOH->IDR
|
||||
#define KEYS_GPIO_PIN_PGUP GPIO_Pin_2 // PH.02
|
||||
#define KEYS_GPIO_REG_PGDN GPIOI->IDR
|
||||
#define KEYS_GPIO_PIN_PGDN GPIO_Pin_11 // PI.11
|
||||
#define KEYS_GPIO_REG_UP GPIOI->IDR
|
||||
#define KEYS_GPIO_PIN_UP GPIO_Pin_6 // PI.06
|
||||
#define KEYS_GPIO_REG_DOWN GPIOI->IDR
|
||||
#define KEYS_GPIO_PIN_DOWN GPIO_Pin_4 // PI.04
|
||||
#define KEYS_GPIO_REG_LEFT GPIOI->IDR
|
||||
#define KEYS_GPIO_PIN_LEFT GPIO_Pin_7 // PI.07
|
||||
#define KEYS_GPIO_REG_RIGHT GPIOI->IDR
|
||||
#define KEYS_GPIO_PIN_RIGHT GPIO_Pin_5 // PI.05
|
||||
#elif defined(PCBX10)
|
||||
#define KEYS_GPIO_REG_ENTER GPIOI->IDR
|
||||
#define KEYS_GPIO_PIN_ENTER GPIO_Pin_8 // PI.08
|
||||
|
@ -183,7 +198,7 @@
|
|||
#define TRIMS_GPIO_PIN_RVU GPIO_Pin_12 // PJ.12
|
||||
#define TRIMS_GPIO_REG_RHR GPIOD->IDR
|
||||
#define TRIMS_GPIO_PIN_RHR GPIO_Pin_7 // PD.07
|
||||
#if defined(RADIO_T16)
|
||||
#if defined(RADIO_FAMILY_T16)
|
||||
#define TRIMS_GPIO_REG_LSU GPIOD->IDR
|
||||
#define TRIMS_GPIO_PIN_LSU GPIO_Pin_13 // PD.13
|
||||
#define TRIMS_GPIO_REG_LSD GPIOJ->IDR
|
||||
|
@ -215,7 +230,11 @@
|
|||
#define KEYS_GPIOD_PINS (GPIO_Pin_11 | GPIO_Pin_3 | GPIO_Pin_7 | GPIO_Pin_13)
|
||||
#define KEYS_GPIOE_PINS (GPIO_Pin_3)
|
||||
#define KEYS_GPIOG_PINS (SWITCHES_GPIO_PIN_D_L | SWITCHES_GPIO_PIN_G_H | SWITCHES_GPIO_PIN_G_L | SWITCHES_GPIO_PIN_H | TRIMS_GPIO_PIN_LVD)
|
||||
#if defined(RADIO_TX16S)
|
||||
#define KEYS_GPIOH_PINS (GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_14 | GPIO_Pin_15)
|
||||
#else
|
||||
#define KEYS_GPIOH_PINS (GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_14 | GPIO_Pin_15)
|
||||
#endif
|
||||
#define KEYS_GPIOI_PINS (GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_11 | GPIO_Pin_15)
|
||||
#define KEYS_GPIOJ_PINS (SWITCHES_GPIO_PIN_D_H | TRIMS_GPIO_PIN_LVU | TRIMS_GPIO_PIN_RVD | TRIMS_GPIO_PIN_RVU | GPIO_Pin_8)
|
||||
#endif
|
||||
|
@ -288,7 +307,7 @@
|
|||
#define ADC_DMA_Stream DMA2_Stream0
|
||||
#define ADC_SET_DMA_FLAGS() ADC_DMA->LIFCR = (DMA_LIFCR_CTCIF0 | DMA_LIFCR_CHTIF0 | DMA_LIFCR_CTEIF0 | DMA_LIFCR_CDMEIF0 | DMA_LIFCR_CFEIF0)
|
||||
#define ADC_TRANSFER_COMPLETE() (ADC_DMA->LISR & DMA_LISR_TCIF0)
|
||||
#if defined(RADIO_T16)
|
||||
#if defined(RADIO_FAMILY_T16)
|
||||
#define ADC_VREF_PREC2 300
|
||||
#else
|
||||
#define ADC_VREF_PREC2 250
|
||||
|
@ -302,13 +321,28 @@
|
|||
#define PWR_SWITCH_GPIO GPIOJ
|
||||
#define PWR_SWITCH_GPIO_PIN GPIO_Pin_0 // PJ.00
|
||||
|
||||
// USB Charger
|
||||
#if defined(USB_CHARGER)
|
||||
#define USB_CHARGER_RCC_AHB1Periph RCC_AHB1Periph_GPIOG
|
||||
#define USB_CHARGER_GPIO GPIOG
|
||||
#define USB_CHARGER_GPIO_PIN GPIO_Pin_11 // PG.11
|
||||
#else
|
||||
#define USB_CHARGER_RCC_AHB1Periph 0
|
||||
#endif
|
||||
|
||||
// S.Port update connector
|
||||
#if defined(RADIO_T16)
|
||||
#if defined(RADIO_FAMILY_T16)
|
||||
#define SPORT_MAX_BAUDRATE 400000
|
||||
#else
|
||||
#define SPORT_MAX_BAUDRATE 250000 // < 400000
|
||||
#endif
|
||||
#if defined(PCBX10) && !defined(RADIO_T16)
|
||||
|
||||
#if defined(RADIO_TX16S)
|
||||
#define SPORT_UPDATE_RCC_AHB1Periph RCC_AHB1Periph_GPIOA
|
||||
#define SPORT_UPDATE_PWR_GPIO GPIOA
|
||||
#define SPORT_UPDATE_PWR_GPIO_PIN GPIO_Pin_15 // PA.15
|
||||
#define HAS_SPORT_UPDATE_CONNECTOR() true
|
||||
#elif defined(PCBX10) && !defined(RADIO_T16)
|
||||
#define SPORT_UPDATE_RCC_AHB1Periph RCC_AHB1Periph_GPIOH
|
||||
#define SPORT_UPDATE_PWR_GPIO GPIOH
|
||||
#define SPORT_UPDATE_PWR_GPIO_PIN GPIO_Pin_13 // PH.13
|
||||
|
@ -350,6 +384,7 @@
|
|||
#if defined(PCBX12S)
|
||||
#define AUX_SERIAL_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_DMA1)
|
||||
#define AUX_SERIAL_RCC_APB1Periph RCC_APB1Periph_USART3
|
||||
#define AUX_SERIAL_RCC_APB2Periph 0
|
||||
#define AUX_SERIAL_GPIO GPIOB
|
||||
#define AUX_SERIAL_GPIO_PIN_TX GPIO_Pin_10 // PB.10
|
||||
#define AUX_SERIAL_GPIO_PIN_RX GPIO_Pin_11 // PB.11
|
||||
|
@ -361,9 +396,28 @@
|
|||
#define AUX_SERIAL_USART_IRQn USART3_IRQn
|
||||
#define AUX_SERIAL_DMA_Stream_RX DMA1_Stream1
|
||||
#define AUX_SERIAL_DMA_Channel_RX DMA_Channel_4
|
||||
#elif defined(RADIO_TX16S) && !defined(BLUETOOTH)
|
||||
#define AUX_SERIAL_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOG | RCC_AHB1Periph_DMA2)
|
||||
#define AUX_SERIAL_RCC_APB1Periph 0
|
||||
#define AUX_SERIAL_RCC_APB2Periph RCC_APB2Periph_USART6
|
||||
#define AUX_SERIAL_USART USART6
|
||||
#define AUX_SERIAL_GPIO_AF GPIO_AF_USART6
|
||||
#define AUX_SERIAL_USART_IRQn USART6_IRQn
|
||||
#define AUX_SERIAL_GPIO GPIOG
|
||||
#define AUX_SERIAL_GPIO_PIN_TX GPIO_Pin_14 // PG.14
|
||||
#define AUX_SERIAL_GPIO_PIN_RX GPIO_Pin_9 // PG.09
|
||||
#define AUX_SERIAL_GPIO_PinSource_TX GPIO_PinSource14
|
||||
#define AUX_SERIAL_GPIO_PinSource_RX GPIO_PinSource9
|
||||
#define AUX_SERIAL_USART_IRQHandler USART6_IRQHandler
|
||||
#define AUX_SERIAL_DMA_Stream_RX DMA2_Stream6
|
||||
#define AUX_SERIAL_DMA_Channel_RX DMA_Channel_5
|
||||
#define AUX_SERIAL_PWR_GPIO GPIOB
|
||||
#define AUX_SERIAL_PWR_GPIO_PIN GPIO_Pin_0 // PB.00
|
||||
#define TRAINER_BATTERY_COMPARTMENT
|
||||
#else
|
||||
#define AUX_SERIAL_RCC_AHB1Periph 0
|
||||
#define AUX_SERIAL_RCC_APB1Periph 0
|
||||
#define AUX_SERIAL_RCC_APB2Periph 0
|
||||
#endif
|
||||
|
||||
// Telemetry
|
||||
|
@ -550,12 +604,16 @@
|
|||
#define AUDIO_DMA DMA1
|
||||
#endif
|
||||
|
||||
#if defined(RADIO_T16)
|
||||
#if defined(RADIO_FAMILY_T16)
|
||||
#define AUDIO_UNMUTE_DELAY 120 // ms
|
||||
#define AUDIO_MUTE_DELAY 500 // ms
|
||||
#endif
|
||||
|
||||
// I2C Bus
|
||||
#if defined(RADIO_TX16S)
|
||||
#define I2C_RCC_AHB1Periph 0
|
||||
#define I2C_RCC_APB1Periph 0
|
||||
#else
|
||||
#define I2C_RCC_AHB1Periph RCC_AHB1Periph_GPIOB
|
||||
#define I2C_RCC_APB1Periph RCC_APB1Periph_I2C1
|
||||
#define I2C I2C1
|
||||
|
@ -566,6 +624,7 @@
|
|||
#define I2C_SCL_GPIO_PinSource GPIO_PinSource8
|
||||
#define I2C_SDA_GPIO_PinSource GPIO_PinSource9
|
||||
#define I2C_SPEED 400000
|
||||
#endif
|
||||
|
||||
// Haptic
|
||||
#define HAPTIC_PWM
|
||||
|
@ -593,7 +652,7 @@
|
|||
#define HAPTIC_TIMER_COMPARE_VALUE HAPTIC_GPIO_TIMER->CCR2
|
||||
#endif
|
||||
|
||||
#if !defined(RADIO_T16)
|
||||
#if !defined(RADIO_FAMILY_T16)
|
||||
#define EXTERNAL_ANTENNA
|
||||
#endif
|
||||
#define INTMODULE_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_DMA2)
|
||||
|
@ -760,6 +819,7 @@
|
|||
|
||||
// Bluetooth
|
||||
#define STORAGE_BLUETOOTH
|
||||
#if defined(BLUETOOTH)
|
||||
#define BT_RCC_APB2Periph RCC_APB2Periph_USART6
|
||||
#define BT_USART USART6
|
||||
#define BT_GPIO_AF GPIO_AF_USART6
|
||||
|
@ -770,6 +830,9 @@
|
|||
#define BT_TX_GPIO_PinSource GPIO_PinSource14
|
||||
#define BT_RX_GPIO_PinSource GPIO_PinSource9
|
||||
#define BT_USART_IRQHandler USART6_IRQHandler
|
||||
#else
|
||||
#define BT_RCC_APB2Periph 0
|
||||
#endif
|
||||
#if defined(PCBX12S)
|
||||
#if PCBREV >= 13
|
||||
#define BT_RCC_AHB1Periph (RCC_AHB1Periph_GPIOI | RCC_AHB1Periph_GPIOG)
|
||||
|
|
|
@ -24,7 +24,7 @@ uint32_t readKeys()
|
|||
{
|
||||
uint32_t result = 0;
|
||||
|
||||
#if defined(PCBX12S)
|
||||
#if defined(KEYS_GPIO_REG_PGUP)
|
||||
if (~KEYS_GPIO_REG_PGUP & KEYS_GPIO_PIN_PGUP)
|
||||
result |= 1 << KEY_PGUP;
|
||||
#endif
|
||||
|
|
38
radio/src/targets/horus/usb_charger_driver.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
void usbChargerInit()
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
GPIO_InitStructure.GPIO_Pin = USB_CHARGER_RCC_AHB1Periph;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||
GPIO_Init(USB_CHARGER_GPIO, &GPIO_InitStructure);
|
||||
}
|
||||
|
||||
bool usbChargerLed()
|
||||
{
|
||||
return GPIO_ReadInputDataBit(USB_CHARGER_GPIO, USB_CHARGER_GPIO_PIN) == Bit_RESET;
|
||||
}
|
||||
|
|
@ -786,6 +786,8 @@ void auxSerialPutc(char c);
|
|||
#define auxSerialTelemetryInit(protocol) auxSerialInit(UART_MODE_TELEMETRY, protocol)
|
||||
void auxSerialSbusInit();
|
||||
void auxSerialStop();
|
||||
#define AUX_SERIAL_POWER_ON()
|
||||
#define AUX_SERIAL__POWER_OFF()
|
||||
#endif
|
||||
|
||||
// BT driver
|
||||
|
|
|
@ -1309,10 +1309,12 @@
|
|||
#if defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITE) || defined(RADIO_X9DP2019)
|
||||
#define AUX_SERIAL_RCC_AHB1Periph 0
|
||||
#define AUX_SERIAL_RCC_APB1Periph 0
|
||||
#define AUX_SERIAL_RCC_APB2Periph 0
|
||||
#else
|
||||
#define TRAINER_BATTERY_COMPARTMENT
|
||||
#define AUX_SERIAL_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_DMA1)
|
||||
#define AUX_SERIAL_RCC_APB1Periph RCC_APB1Periph_USART3
|
||||
#define AUX_SERIAL_RCC_APB2Periph 0
|
||||
#define AUX_SERIAL_GPIO GPIOB
|
||||
#define AUX_SERIAL_GPIO_PIN_TX GPIO_Pin_10 // PB.10
|
||||
#define AUX_SERIAL_GPIO_PIN_RX GPIO_Pin_11 // PB.11
|
||||
|
|
|
@ -316,6 +316,13 @@ static void processMultiTelemetryPaket(const uint8_t * packet, uint8_t module)
|
|||
uint8_t len = packet[1];
|
||||
const uint8_t * data = packet + 2;
|
||||
|
||||
#if defined(AUX_SERIAL)
|
||||
if (g_eeGeneral.auxSerialMode == UART_MODE_TELEMETRY_MIRROR) {
|
||||
for (uint8_t c=0; c < len; c++)
|
||||
auxSerialPutc(packet[c]);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Switch type
|
||||
switch (type) {
|
||||
case MultiStatus:
|
||||
|
|
|
@ -68,7 +68,9 @@
|
|||
#define TR_VSWITCHES "---" "ID0""ID1""ID2" "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_ON_ONE_SWITCHES
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) && defined(AUX_SERIAL)
|
||||
#define TR_VTRAINERMODES TR_VTRAINER_MASTER_JACK TR_VTRAINER_SLAVE_JACK TR_VTRAINER_MASTER_BATTERY TR_VTRAINER_BLUETOOTH TR_VTRAINER_MULTI
|
||||
#elif defined(PCBHORUS)
|
||||
#define TR_VTRAINERMODES TR_VTRAINER_MASTER_JACK TR_VTRAINER_SLAVE_JACK TR_VTRAINER_BLUETOOTH TR_VTRAINER_MULTI
|
||||
#elif defined(PCBTARANIS)
|
||||
#define TR_VTRAINERMODES TR_VTRAINER_MASTER_JACK TR_VTRAINER_SLAVE_JACK TR_VTRAINER_MASTER_SBUS_MODULE TR_VTRAINER_MASTER_CPPM_MODULE TR_VTRAINER_MASTER_BATTERY TR_VTRAINER_BLUETOOTH TR_VTRAINER_MULTI
|
||||
|
|