chore: centralize board manufacturer/model/USB identity in hw_defs JSON (#7786)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
598255e1d1
commit
425944bff2
@@ -73,6 +73,7 @@ BoardJson::BoardJson(Board::Type board, QString hwdefn) :
|
||||
m_display({0, 0, 0, 0, 0, 0, 0, 0}),
|
||||
m_cfs({0, 0}),
|
||||
m_hardware({0, 0, 0}),
|
||||
m_identity({"", ""}),
|
||||
m_inputCnt({0, 0, 0, 0, 0, 0, 0, 0, 0}),
|
||||
m_switchCnt({0, 0, 0})
|
||||
{
|
||||
@@ -1005,7 +1006,7 @@ bool BoardJson::loadDefinition()
|
||||
if (m_board == Board::BOARD_UNKNOWN)
|
||||
return true;
|
||||
|
||||
if (!loadFile(m_board, m_hwdefn, m_inputs, m_switches, m_keys, m_trims, m_display, m_cfs, m_hardware, m_hasKeyLockCombo))
|
||||
if (!loadFile(m_board, m_hwdefn, m_inputs, m_switches, m_keys, m_trims, m_display, m_cfs, m_hardware, m_identity, m_hasKeyLockCombo))
|
||||
return false;
|
||||
|
||||
afterLoadFixups(m_board, m_inputs, m_switches, m_keys, m_trims);
|
||||
@@ -1042,7 +1043,7 @@ bool BoardJson::loadDefinition()
|
||||
// static
|
||||
bool BoardJson::loadFile(Board::Type board, QString hwdefn, InputsTable * inputs, SwitchesTable * switches,
|
||||
KeysTable * keys, TrimsTable * trims, DisplayDefn & display, CustomSwitchesDefn & cfs,
|
||||
HardwareDefn & hardware, bool & hasKeyLockCombo)
|
||||
HardwareDefn & hardware, IdentityDefn & identity, bool & hasKeyLockCombo)
|
||||
{
|
||||
if (board == Board::BOARD_UNKNOWN) {
|
||||
return false;
|
||||
@@ -1293,6 +1294,13 @@ bool BoardJson::loadFile(Board::Type board, QString hwdefn, InputsTable * inputs
|
||||
hardware.cpu_type = o.value("cpu_type").toString().toStdString();
|
||||
}
|
||||
|
||||
if (obj.value("identity").isObject()) {
|
||||
const QJsonObject &o = obj.value("identity").toObject();
|
||||
|
||||
identity.manufacturer = o.value("manufacturer").toString().toStdString();
|
||||
identity.model = o.value("model").toString().toStdString();
|
||||
}
|
||||
|
||||
delete json;
|
||||
return true;
|
||||
}
|
||||
@@ -1342,6 +1350,8 @@ const QString BoardJson::getCapabilityStr(const Board::Capability capability) co
|
||||
return m_hardware.cpu.c_str();
|
||||
case Board::CPUType:
|
||||
return m_hardware.cpu_type.c_str();
|
||||
case Board::Manufacturer:
|
||||
return m_identity.manufacturer.c_str();
|
||||
default:
|
||||
return QString();
|
||||
}
|
||||
|
||||
@@ -127,6 +127,11 @@ class BoardJson
|
||||
std::string cpu_type = "";
|
||||
};
|
||||
|
||||
struct IdentityDefn {
|
||||
std::string manufacturer = "";
|
||||
std::string model = "";
|
||||
};
|
||||
|
||||
typedef std::vector<TrimDefn> TrimsTable;
|
||||
|
||||
explicit BoardJson(Board::Type board, QString hwdefn);
|
||||
@@ -202,6 +207,7 @@ private:
|
||||
DisplayDefn m_display;
|
||||
CustomSwitchesDefn m_cfs;
|
||||
HardwareDefn m_hardware;
|
||||
IdentityDefn m_identity;
|
||||
bool m_hasKeyLockCombo = false;
|
||||
|
||||
struct InputCounts {
|
||||
@@ -228,7 +234,7 @@ private:
|
||||
|
||||
static bool loadFile(Board::Type board, QString hwdefn, InputsTable * inputs, SwitchesTable * switches,
|
||||
KeysTable * keys, TrimsTable * trims, DisplayDefn & lcd, CustomSwitchesDefn & cfs,
|
||||
HardwareDefn & hardware, bool & hasKeyLockCombo);
|
||||
HardwareDefn & hardware, IdentityDefn & identity, bool & hasKeyLockCombo);
|
||||
static void afterLoadFixups(Board::Type board, InputsTable * inputs, SwitchesTable * switches,
|
||||
KeysTable * keys, TrimsTable * trims);
|
||||
|
||||
|
||||
@@ -1255,72 +1255,5 @@ QString Boards::getCapabilityStr(Board::Type board, Board::Capability capability
|
||||
|
||||
QString Boards::getManufacturer(Board::Type board)
|
||||
{
|
||||
switch (board) {
|
||||
case BOARD_BETAFPV_LR3PRO:
|
||||
return "BETAFPV";
|
||||
case BOARD_FATFISH_F16:
|
||||
return "Fatfish";
|
||||
case BOARD_FLYSKY_NV14:
|
||||
case BOARD_FLYSKY_EL18:
|
||||
case BOARD_FLYSKY_PA01:
|
||||
case BOARD_FLYSKY_PL18:
|
||||
case BOARD_FLYSKY_PL18EV:
|
||||
case BOARD_FLYSKY_PL18U:
|
||||
case BOARD_FLYSKY_NB4P:
|
||||
case BOARD_FLYSKY_ST16:
|
||||
return "FlySky";
|
||||
case BOARD_TARANIS_X7:
|
||||
case BOARD_TARANIS_X7_ACCESS:
|
||||
case BOARD_TARANIS_XLITE:
|
||||
case BOARD_TARANIS_XLITES:
|
||||
case BOARD_TARANIS_X9D:
|
||||
case BOARD_TARANIS_X9DP:
|
||||
case BOARD_TARANIS_X9DP_2019:
|
||||
case BOARD_TARANIS_X9E:
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
case BOARD_TARANIS_X9LITES:
|
||||
case BOARD_HORUS_X12S:
|
||||
case BOARD_X10:
|
||||
case BOARD_X10_EXPRESS:
|
||||
return "FrSky";
|
||||
case BOARD_HELLORADIOSKY_V16:
|
||||
case BOARD_HELLORADIOSKY_V12:
|
||||
case BOARD_HELLORADIOSKY_V14:
|
||||
case BOARD_HELLORADIOSKY_V14LCD:
|
||||
return "HelloRadioSky";
|
||||
case BOARD_IFLIGHT_COMMANDO8:
|
||||
case BOARD_IFLIGHT_COMMANDO14:
|
||||
return "iFlight";
|
||||
case BOARD_JUMPER_T12:
|
||||
case BOARD_JUMPER_TLITE:
|
||||
case BOARD_JUMPER_TLITE_F4:
|
||||
case BOARD_JUMPER_TPRO:
|
||||
case BOARD_JUMPER_TPROV2:
|
||||
case BOARD_JUMPER_TPROS:
|
||||
case BOARD_JUMPER_T12MAX:
|
||||
case BOARD_JUMPER_BUMBLEBEE:
|
||||
case BOARD_JUMPER_T14:
|
||||
case BOARD_JUMPER_T15:
|
||||
case BOARD_JUMPER_T15PRO:
|
||||
case BOARD_JUMPER_T22:
|
||||
case BOARD_JUMPER_T16:
|
||||
case BOARD_JUMPER_T18:
|
||||
case BOARD_JUMPER_T20:
|
||||
case BOARD_JUMPER_T20V2:
|
||||
return "Jumper";
|
||||
case BOARD_RADIOMASTER_BOXER:
|
||||
case BOARD_RADIOMASTER_POCKET:
|
||||
case BOARD_RADIOMASTER_MT12:
|
||||
case BOARD_RADIOMASTER_T8:
|
||||
case BOARD_RADIOMASTER_TX12:
|
||||
case BOARD_RADIOMASTER_TX12_MK2:
|
||||
case BOARD_RADIOMASTER_TX16S:
|
||||
case BOARD_RADIOMASTER_TX16SMK3:
|
||||
case BOARD_RADIOMASTER_TX15:
|
||||
case BOARD_RADIOMASTER_ZORRO:
|
||||
case BOARD_RADIOMASTER_GX12:
|
||||
return "Radiomaster";
|
||||
default:
|
||||
return CPN_STR_UNKNOWN_ITEM;
|
||||
}
|
||||
return getCapabilityStr(board, Board::Manufacturer);
|
||||
}
|
||||
|
||||
@@ -262,6 +262,7 @@ namespace Board {
|
||||
LcdHeight,
|
||||
LcdOLED,
|
||||
LcdWidth,
|
||||
Manufacturer,
|
||||
MaxContrast,
|
||||
MaxVolume,
|
||||
MinContrast,
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Boards::getManufacturer() now reads the "manufacturer" field from each
|
||||
// board's hw_defs JSON (via BoardJson) instead of a hand-maintained switch
|
||||
// statement. This guards against the JSON entries and the switch it replaced
|
||||
// silently drifting apart, e.g. a newly-added board being forgotten (as
|
||||
// happened with BOARD_SENDUWING_H17 and BOARD_RADIOMASTER_GX15, both of
|
||||
// which fell through to "???" under the old switch).
|
||||
|
||||
#include "gtests.h"
|
||||
|
||||
#include "constants.h"
|
||||
#include "firmwares/boards.h"
|
||||
#include "firmwares/eeprominterface.h"
|
||||
|
||||
TEST(BoardManufacturer, NoRegisteredBoardIsUnknown)
|
||||
{
|
||||
for (Firmware *firmware : Firmware::getRegisteredFirmwares()) {
|
||||
const QString manufacturer = Boards::getManufacturer(firmware->getBoard());
|
||||
EXPECT_FALSE(manufacturer.isEmpty()) << "board: " << firmware->getId().toStdString();
|
||||
EXPECT_NE(manufacturer, QString(CPN_STR_UNKNOWN_ITEM))
|
||||
<< "board: " << firmware->getId().toStdString();
|
||||
}
|
||||
}
|
||||
|
||||
TEST(BoardManufacturer, KnownBoardsMatchExpectedManufacturer)
|
||||
{
|
||||
EXPECT_EQ(Boards::getManufacturer(Board::BOARD_RADIOMASTER_TX16S), QString("RadioMaster"));
|
||||
EXPECT_EQ(Boards::getManufacturer(Board::BOARD_RADIOMASTER_GX15), QString("RadioMaster"));
|
||||
EXPECT_EQ(Boards::getManufacturer(Board::BOARD_FLYSKY_NV14), QString("Flysky"));
|
||||
EXPECT_EQ(Boards::getManufacturer(Board::BOARD_HELLORADIOSKY_V12), QString("HelloRadioSky"));
|
||||
EXPECT_EQ(Boards::getManufacturer(Board::BOARD_SENDUWING_H17), QString("Senduwing"));
|
||||
EXPECT_EQ(Boards::getManufacturer(Board::BOARD_JUMPER_T16), QString("Jumper"));
|
||||
EXPECT_EQ(Boards::getManufacturer(Board::BOARD_IFLIGHT_COMMANDO14), QString("iFlight"));
|
||||
EXPECT_EQ(Boards::getManufacturer(Board::BOARD_TARANIS_X9E), QString("FrSky"));
|
||||
EXPECT_EQ(Boards::getManufacturer(Board::BOARD_BETAFPV_LR3PRO), QString("BETAFPV"));
|
||||
EXPECT_EQ(Boards::getManufacturer(Board::BOARD_FATFISH_F16), QString("Fatfish"));
|
||||
}
|
||||
@@ -154,6 +154,7 @@ AddHWGenTarget(${HW_DESC_JSON} simu_keys simu_keys.inc)
|
||||
AddHWGenTarget(${HW_DESC_JSON} simu_switches simu_switches.inc)
|
||||
|
||||
AddHWGenTarget(${HW_DESC_JSON} hal_keys_lock hal_keys_lock.h)
|
||||
AddHWGenTarget(${HW_DESC_JSON} hal_usb_descriptor usb_descriptor.h)
|
||||
|
||||
add_dependencies(board hal_settings hal_pwm_sticks hal_keys hal_keys_lock hal_adc_inputs stm32_keys stm32_switches stm32_adc_inputs stm32_pwm_inputs yaml_inputs lua_inputs lua_mixsrc lua_keys)
|
||||
add_dependencies(board_bl hal_settings hal_pwm_sticks hal_keys stm32_keys)
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "RadioMaster",
|
||||
"model": "Boxer",
|
||||
"usb_manufacturer": "RM_TX",
|
||||
"usb_product": "RM Boxer"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "Bumblebee",
|
||||
"usb_manufacturer": "JUMPER",
|
||||
"usb_product": "Bumblebe"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "iFlight",
|
||||
"model": "Commando 14",
|
||||
"usb_manufacturer": "iFlight",
|
||||
"usb_product": "C14"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "iFlight",
|
||||
"model": "Commando 8",
|
||||
"usb_manufacturer": "iFlight",
|
||||
"usb_product": "C8"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Flysky",
|
||||
"model": "EL18",
|
||||
"usb_manufacturer": "Flysky",
|
||||
"usb_product": "EL18"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Fatfish",
|
||||
"model": "F16",
|
||||
"usb_manufacturer": "FATFISH",
|
||||
"usb_product": "FF F16"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "RadioMaster",
|
||||
"model": "GX12",
|
||||
"usb_manufacturer": "RM_TX",
|
||||
"usb_product": "RM GX12"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "RadioMaster",
|
||||
"model": "GX15",
|
||||
"usb_manufacturer": "RM",
|
||||
"usb_product": "GX15"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Senduwing",
|
||||
"model": "H17",
|
||||
"usb_manufacturer": "SEND",
|
||||
"usb_product": "H17"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "BETAFPV",
|
||||
"model": "LR3PRO",
|
||||
"usb_manufacturer": "BETAFPV",
|
||||
"usb_product": "LR3PRO"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "RadioMaster",
|
||||
"model": "MT12",
|
||||
"usb_manufacturer": "RM_TX",
|
||||
"usb_product": "RM MT12"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Flysky",
|
||||
"model": "NB4+",
|
||||
"usb_manufacturer": "FlySky",
|
||||
"usb_product": "NB4+"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Flysky",
|
||||
"model": "NV14",
|
||||
"usb_manufacturer": "Flysky",
|
||||
"usb_product": "NV14"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Flysky",
|
||||
"model": "PA01",
|
||||
"usb_manufacturer": "FlySky",
|
||||
"usb_product": "PA01"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Flysky",
|
||||
"model": "PL18",
|
||||
"usb_manufacturer": "FlySky",
|
||||
"usb_product": "PL18"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Flysky",
|
||||
"model": "PL18EV",
|
||||
"usb_manufacturer": "FlySky",
|
||||
"usb_product": "PL18EV"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Flysky",
|
||||
"model": "PL18U",
|
||||
"usb_manufacturer": "FlySky",
|
||||
"usb_product": "PL18U"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "RadioMaster",
|
||||
"model": "Pocket",
|
||||
"usb_manufacturer": "RM_TX",
|
||||
"usb_product": "RMPocket"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Flysky",
|
||||
"model": "ST16",
|
||||
"usb_manufacturer": "FlySky",
|
||||
"usb_product": "ST16"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T12",
|
||||
"usb_manufacturer": "JUMPER",
|
||||
"usb_product": "T12"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T12 MAX",
|
||||
"usb_manufacturer": "JUMPER",
|
||||
"usb_product": "T12 MAX"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T14",
|
||||
"usb_manufacturer": "JUMPER",
|
||||
"usb_product": "T14"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T15",
|
||||
"usb_manufacturer": "Jumper",
|
||||
"usb_product": "T15"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T15 Pro",
|
||||
"usb_manufacturer": "JUMPER",
|
||||
"usb_product": "T15 PRO"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T16",
|
||||
"usb_manufacturer": "Jumper",
|
||||
"usb_product": "T16"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T18",
|
||||
"usb_manufacturer": "Jumper",
|
||||
"usb_product": "T18"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T20",
|
||||
"usb_manufacturer": "JUMPER",
|
||||
"usb_product": "T20"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T20 V2",
|
||||
"usb_manufacturer": "JUMPER",
|
||||
"usb_product": "T20V2"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T22",
|
||||
"usb_manufacturer": "JUMPER",
|
||||
"usb_product": "T22"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "RadioMaster",
|
||||
"model": "T8",
|
||||
"usb_manufacturer": "RM_TX",
|
||||
"usb_product": "RM T8"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T-Lite",
|
||||
"usb_manufacturer": "JUMPER",
|
||||
"usb_product": "T-Lite"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T-Pro",
|
||||
"usb_manufacturer": "JUMPER",
|
||||
"usb_product": "T-Pro"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T-Pro S",
|
||||
"usb_manufacturer": "JUMPER",
|
||||
"usb_product": "T-Pro S"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "Jumper",
|
||||
"model": "T-Pro V2",
|
||||
"usb_manufacturer": "JUMPER",
|
||||
"usb_product": "T-Pro V2"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "RadioMaster",
|
||||
"model": "TX12",
|
||||
"usb_manufacturer": "RM_TX",
|
||||
"usb_product": "RM TX12"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "RadioMaster",
|
||||
"model": "TX12 Mark II",
|
||||
"usb_manufacturer": "RM_TX",
|
||||
"usb_product": "RM TX12"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "RadioMaster",
|
||||
"model": "TX15",
|
||||
"usb_manufacturer": "RM",
|
||||
"usb_product": "TX15"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "RadioMaster",
|
||||
"model": "TX16S",
|
||||
"usb_manufacturer": "RM_TX",
|
||||
"usb_product": "RM TX16S"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "RadioMaster",
|
||||
"model": "TX16S MK3",
|
||||
"usb_manufacturer": "RM",
|
||||
"usb_product": "TX16SMK3"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "HelloRadioSky",
|
||||
"model": "V12",
|
||||
"usb_manufacturer": "HRSky",
|
||||
"usb_product": "V12"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "HelloRadioSky",
|
||||
"model": "V14",
|
||||
"usb_manufacturer": "HRSky",
|
||||
"usb_product": "V14"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "HelloRadioSky",
|
||||
"model": "V14LCD",
|
||||
"usb_manufacturer": "HRSky",
|
||||
"usb_product": "V14LCD"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "HelloRadioSky",
|
||||
"model": "V16",
|
||||
"usb_manufacturer": "HRSky",
|
||||
"usb_product": "V16"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X10/X10S",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "X10"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X10/X10S Express",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "X10"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X12S",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "Horus"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X7/X7S",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "Taranis"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X7/X7S Access",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "Taranis"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X9D+",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "Taranis"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X9D+ 2019",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "Taranis"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X9D",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "Taranis"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X9E",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "Taranis"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X9-Lite",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "Taranis"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X9-Lite S",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "Taranis"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X-Lite",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "Taranis"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "FrSky",
|
||||
"model": "X-Lite S/PRO",
|
||||
"usb_manufacturer": "FrSky",
|
||||
"usb_product": "Taranis"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"identity": {
|
||||
"manufacturer": "RadioMaster",
|
||||
"model": "Zorro",
|
||||
"usb_manufacturer": "RM_TX",
|
||||
"usb_product": "Zorro"
|
||||
},
|
||||
"adc_inputs": {
|
||||
"adcs": [
|
||||
{
|
||||
|
||||
@@ -56,7 +56,6 @@ add_definitions(-DFIRMWARE_FORMAT_UF2)
|
||||
add_definitions(-DUSE_CUSTOM_EXTI_IRQ)
|
||||
|
||||
set(FLAVOUR c14)
|
||||
add_definitions(-DMANUFACTURER_IFLIGHT)
|
||||
|
||||
# Defines internal modules for PL18 via UART7
|
||||
# set(INTERNAL_MODULES MULTI CACHE STRING "Internal modules")
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define USB_NAME "C14"
|
||||
#define USB_MANUFACTURER 'I', 'F', 'l', 'i', 'g', 'h', 't', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'C', '1', '4', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
@@ -62,6 +62,8 @@ if(NOT NATIVE_BUILD)
|
||||
${STM32USB_DIR}/Class/HID/Inc
|
||||
${STM32USB_DIR}/Class/MSC/Inc)
|
||||
|
||||
add_dependencies(stm32usb_device_bl hal_usb_descriptor)
|
||||
|
||||
set(BOOTLOADER_SRC ${BOOTLOADER_SRC} $<TARGET_OBJECTS:stm32usb_device_bl>)
|
||||
|
||||
# Firmware USB devices
|
||||
@@ -85,6 +87,8 @@ if(NOT NATIVE_BUILD)
|
||||
${STM32USB_DIR}/Class/HID/Inc
|
||||
${STM32USB_DIR}/Class/MSC/Inc)
|
||||
|
||||
add_dependencies(stm32usb_device_fw hal_usb_descriptor)
|
||||
|
||||
set(FIRMWARE_SRC ${FIRMWARE_SRC} $<TARGET_OBJECTS:stm32usb_device_fw>)
|
||||
|
||||
# HAL/LL based driver library
|
||||
|
||||
@@ -52,7 +52,6 @@ add_definitions(-DUSB_CHARGER)
|
||||
add_definitions(-DUSB_CHARGE_CONTROL)
|
||||
|
||||
set(FLAVOUR gx15)
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
|
||||
# defines existing internal modules
|
||||
set(INTERNAL_MODULES CRSF CACHE STRING "Internal modules")
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _USB_DESCRIPTOR_H_
|
||||
#define _USB_DESCRIPTOR_H_
|
||||
|
||||
#define USB_NAME "Radiomaster GX15"
|
||||
#define USB_MANUFACTURER 'R', 'M', ' ', ' ', ' ', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'G', 'X', '1', '5', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
|
||||
#endif // _USB_DESCRIPTOR_H_
|
||||
@@ -51,8 +51,6 @@ add_definitions(-DFIRMWARE_FORMAT_UF2)
|
||||
add_definitions(-DUSE_CUSTOM_EXTI_IRQ)
|
||||
|
||||
set(FLAVOUR h17)
|
||||
add_definitions(-DRADIO_H17)
|
||||
add_definitions(-DMANUFACTURER_SENDUWING)
|
||||
|
||||
# defines existing internal modules
|
||||
set(INTERNAL_MODULES CRSF CACHE STRING "Internal modules")
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _USB_DESCRIPTOR_H_
|
||||
#define _USB_DESCRIPTOR_H_
|
||||
|
||||
#define USB_NAME "Senduwing H17"
|
||||
#define USB_MANUFACTURER 'S', 'E', 'N', 'D', ' ', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'H', '1', '7', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
|
||||
#endif // _USB_DESCRIPTOR_H_
|
||||
@@ -56,7 +56,6 @@ if (PCB STREQUAL X10)
|
||||
set(AUX_SERIAL OFF)
|
||||
set(EXTERNAL_ANTENNA ON)
|
||||
add_definitions(-DHARDWARE_POWER_MANAGEMENT_UNIT)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
elseif (PCBREV STREQUAL T15)
|
||||
set(FLAVOUR t15)
|
||||
add_definitions(-DRADIO_FAMILY_T16)
|
||||
@@ -71,14 +70,12 @@ if (PCB STREQUAL X10)
|
||||
# Aux2 is reserved for serial gimbal on this radio
|
||||
set(AUX2_SERIAL OFF)
|
||||
set(USB_CHARGE_LED YES)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
set(LCD_DRIVER lcd_st7796s_driver.cpp)
|
||||
elseif (PCBREV STREQUAL T16)
|
||||
set(FLAVOUR t16)
|
||||
add_definitions(-DRADIO_FAMILY_T16)
|
||||
set(DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module")
|
||||
option(BLUETOOTH "Support for bluetooth module" OFF)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
if (NOT BLUETOOTH)
|
||||
set(AUX2_SERIAL ON)
|
||||
endif()
|
||||
@@ -93,7 +90,6 @@ if (PCB STREQUAL X10)
|
||||
set(DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module")
|
||||
option(BLUETOOTH "Support for bluetooth module" OFF)
|
||||
set(USB_CHARGER YES)
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
if (NOT BLUETOOTH)
|
||||
set(AUX2_SERIAL ON)
|
||||
endif()
|
||||
@@ -104,7 +100,6 @@ if (PCB STREQUAL X10)
|
||||
add_definitions(-DRADIO_FAMILY_T16)
|
||||
set(DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module")
|
||||
option(BLUETOOTH "Support for bluetooth module" OFF)
|
||||
add_definitions(-DMANUFACTURER_FATFISH)
|
||||
set(FLEXSW "2" CACHE STRING "Max flex inputs usable as switches")
|
||||
set(VIDEO_SWITCH ON)
|
||||
elseif (PCBREV STREQUAL V16)
|
||||
@@ -112,7 +107,6 @@ if (PCB STREQUAL X10)
|
||||
add_definitions(-DRADIO_FAMILY_T16)
|
||||
set(DEFAULT_INTERNAL_MODULE CROSSFIRE CACHE STRING "Default internal module")
|
||||
option(BLUETOOTH "Support for bluetooth module" OFF)
|
||||
add_definitions(-DMANUFACTURER_HELLORADIOSKY)
|
||||
set(FLEXSW "2" CACHE STRING "Max flex inputs usable as switches")
|
||||
set(AUX2_SERIAL OFF)
|
||||
set(CSD203_SENSOR ON)
|
||||
@@ -128,7 +122,6 @@ if (PCB STREQUAL X10)
|
||||
add_definitions(-DRADIO_FAMILY_T16)
|
||||
set(DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module")
|
||||
option(BLUETOOTH "Support for bluetooth module" OFF)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
if (NOT BLUETOOTH)
|
||||
set(AUX2_SERIAL ON)
|
||||
endif()
|
||||
@@ -138,7 +131,6 @@ if (PCB STREQUAL X10)
|
||||
set(DEFAULT_INTERNAL_MODULE XJT_PXX1 CACHE STRING "Default internal module")
|
||||
set(BLUETOOTH ON)
|
||||
set(EXTERNAL_ANTENNA ON)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
endif()
|
||||
elseif (PCB STREQUAL X12S)
|
||||
set(DEFAULT_INTERNAL_MODULE XJT_PXX1 CACHE STRING "Default internal module")
|
||||
@@ -150,7 +142,6 @@ elseif (PCB STREQUAL X12S)
|
||||
set(USE_VS1053B ON)
|
||||
set(USE_ADS79xx ON)
|
||||
set(FONTS_TARGET x12s_fonts)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
endif()
|
||||
|
||||
# Handset supports external antenna
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(PCBX12S)
|
||||
#define USB_NAME "FrSky Horus"
|
||||
#define USB_MANUFACTURER 'F', 'r', 'S', 'k', 'y', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'H', 'o', 'r', 'u', 's', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_T15)
|
||||
#define USB_NAME "Jumper T15"
|
||||
#define USB_MANUFACTURER 'J', 'u', 'm', 'p', 'e', 'r', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '1', '5', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_T16)
|
||||
#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_T18)
|
||||
#define USB_NAME "Jumper T18"
|
||||
#define USB_MANUFACTURER 'J', 'u', 'm', 'p', 'e', 'r', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '1', '8', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_TX16S)
|
||||
#define USB_NAME "Radiomaster TX16S"
|
||||
#define USB_MANUFACTURER 'R', 'M', '_', 'T', 'X', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'R', 'M', ' ', 'T', 'X', '1', '6', 'S' /* 8 Bytes */
|
||||
#elif defined(RADIO_F16)
|
||||
#define USB_NAME "Fatfish F16"
|
||||
#define USB_MANUFACTURER 'F', 'A', 'T', 'F', 'I', 'S', 'H', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'F', 'F', ' ', 'F', '1', '6', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_V16)
|
||||
#define USB_NAME "HelloRadioSky V16"
|
||||
#define USB_MANUFACTURER 'H', 'R', 'S', 'k', 'y', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'V', '1', '6', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(PCBX10)
|
||||
#define USB_NAME "FrSky X10"
|
||||
#define USB_MANUFACTURER 'F', 'r', 'S', 'k', 'y', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'X', '1', '0', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#endif
|
||||
@@ -48,7 +48,6 @@ add_definitions(-DFIRMWARE_FORMAT_UF2)
|
||||
add_definitions(-DUSE_CUSTOM_EXTI_IRQ)
|
||||
|
||||
set(FLAVOUR pa01)
|
||||
add_definitions(-DMANUFACTURER_FLYSKY)
|
||||
|
||||
# Defines internal modules for PL18 via UART7
|
||||
set(INTERNAL_MODULES AFHDS3;CRSF CACHE STRING "Internal modules")
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _USB_DESCRIPTOR_H_
|
||||
#define _USB_DESCRIPTOR_H_
|
||||
|
||||
#define USB_NAME "PA01"
|
||||
#define USB_MANUFACTURER 'F', 'l', 'y', 'S', 'k', 'y', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'P', 'A', '0', '1', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
|
||||
#endif // _USB_DESCRIPTOR_H_
|
||||
@@ -40,7 +40,6 @@ set(PCB_RF_BAUD 921600 CACHE STRING "INTERNAL_MODULE_BAUDRATE: ${RF_BAUD_RATE}")
|
||||
set_property(CACHE PCB_RF_BAUD PROPERTY STRINGS ${RF_BAUD_RATE})
|
||||
|
||||
add_definitions(-DPCBPL18 -DPCBFLYSKY)
|
||||
add_definitions(-DMANUFACTURER_FLYSKY)
|
||||
add_definitions(-DBATTERY_CHARGE)
|
||||
add_definitions(-DSTM32_SUPPORT_32BIT_TIMERS)
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(RADIO_PL18U)
|
||||
#define USB_NAME "FlySky PL18Ultra"
|
||||
#define USB_MANUFACTURER 'F', 'l', 'y', 'S', 'k', 'y', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'P', 'L', '1', '8', 'U', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_EL18)
|
||||
#define USB_NAME "Flysky EL18"
|
||||
#define USB_MANUFACTURER 'F', 'l', 'y', 's', 'k', 'y', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'E', 'L', '1', '8', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_NV14)
|
||||
#define USB_NAME "Flysky NV14"
|
||||
#define USB_MANUFACTURER 'F', 'l', 'y', 's', 'k', 'y', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'N', 'V', '1', '4', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_NB4P)
|
||||
#define USB_NAME "FlySky NB4+"
|
||||
#define USB_MANUFACTURER 'F', 'l', 'y', 'S', 'k', 'y', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'N', 'B', '4', '+', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_PL18EV)
|
||||
#define USB_NAME "FlySky PL18EV"
|
||||
#define USB_MANUFACTURER 'F', 'l', 'y', 'S', 'k', 'y', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'P', 'L', '1', '8', 'E', 'V', ' ', ' ' /* 8 Bytes */
|
||||
#else
|
||||
#define USB_NAME "FlySky PL18"
|
||||
#define USB_MANUFACTURER 'F', 'l', 'y', 'S', 'k', 'y', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'P', 'L', '1', '8', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#endif
|
||||
@@ -48,7 +48,6 @@ add_definitions(-DFIRMWARE_FORMAT_UF2)
|
||||
add_definitions(-DUSE_CUSTOM_EXTI_IRQ)
|
||||
|
||||
set(FLAVOUR st16)
|
||||
add_definitions(-DMANUFACTURER_FLYSKY)
|
||||
|
||||
# Defines internal modules for PL18 via UART7
|
||||
# set(INTERNAL_MODULES MULTI CACHE STRING "Internal modules")
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define USB_NAME "ST16"
|
||||
#define USB_MANUFACTURER 'F', 'l', 'y', 'S', 'k', 'y', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'S', 'T', '1', '6', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
@@ -44,7 +44,7 @@ set(FIRMWARE_QSPI ON)
|
||||
|
||||
add_definitions(
|
||||
-DSTM32H7S7xx -DFIRMWARE_QSPI
|
||||
-DSDRAM -DPCBHORUS -DPCBX10 -DRADIO_H7RS
|
||||
-DSDRAM -DPCBHORUS -DPCBX10
|
||||
-DHARDWARE_TOUCH -DSOFTWARE_KEYBOARD
|
||||
-DSOFTWARE_VOLUME
|
||||
)
|
||||
|
||||
@@ -47,7 +47,6 @@ add_definitions(-DUSE_CUSTOM_EXTI_IRQ)
|
||||
add_definitions(-DUSB_CHARGER)
|
||||
|
||||
set(FLAVOUR t15pro)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
|
||||
# defines existing internal modules
|
||||
set(INTERNAL_MODULES CRSF CACHE STRING "Internal modules")
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define USB_NAME "T15PRO"
|
||||
#define USB_MANUFACTURER 'J', 'U', 'M', 'P', 'E', 'R', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '1', '5', ' ', 'P', 'R', 'O', ' ' /* 8 Bytes */
|
||||
@@ -47,7 +47,6 @@ add_definitions(-DUSE_CUSTOM_EXTI_IRQ)
|
||||
add_definitions(-DUSB_CHARGER)
|
||||
|
||||
set(FLAVOUR t22)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
|
||||
# defines existing internal modules
|
||||
set(INTERNAL_MODULES CRSF CACHE STRING "Internal modules")
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define USB_NAME "T22"
|
||||
#define USB_MANUFACTURER 'J', 'U', 'M', 'P', 'E', 'R', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '2', '2', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
@@ -44,7 +44,6 @@ if(PCB STREQUAL X9E)
|
||||
set(BLUETOOTH YES)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(MODULE_SIZE_STD YES)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
elseif(PCB STREQUAL X9D+)
|
||||
set(HAPTIC YES)
|
||||
add_definitions(-DPCBX9DP -DPCBX9)
|
||||
@@ -56,7 +55,6 @@ elseif(PCB STREQUAL X9D+)
|
||||
set(PCBREV 2014 CACHE STRING "PCB Revision")
|
||||
#set(AFHDS3 NO)
|
||||
add_definitions(-DPCBREV=${PCBREV})
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
if (${PCBREV} STREQUAL 2019)
|
||||
set(DEFAULT_INTERNAL_MODULE ISRM_PXX2 CACHE STRING "Default internal module")
|
||||
set(FLAVOUR x9d+2019)
|
||||
@@ -89,7 +87,6 @@ elseif(PCB STREQUAL X9D)
|
||||
set(FONTS_TARGET taranis_fonts)
|
||||
set(LCD_DRIVER lcd_driver_aspi.cpp)
|
||||
set(AUX_SERIAL ON)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
set(MODULE_SIZE_STD YES)
|
||||
elseif(PCB STREQUAL X7)
|
||||
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
|
||||
@@ -108,7 +105,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(FLAVOUR t12)
|
||||
set(CPU_TYPE_FULL STM32F205xE)
|
||||
add_definitions(-DRADIO_FAMILY_JUMPER_T12)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
elseif(PCBREV STREQUAL TPRO)
|
||||
set(DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module")
|
||||
set(INTERNAL_MODULE_SERIAL YES)
|
||||
@@ -117,7 +113,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(CPU_TYPE_FULL STM32F205xE)
|
||||
set(FUNCTION_SWITCHES ON)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
elseif(PCBREV STREQUAL TPROV2)
|
||||
set(DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module")
|
||||
@@ -127,7 +122,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(CPU_TYPE_FULL STM32F407xE)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(FUNCTION_SWITCHES ON)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
elseif(PCBREV STREQUAL TPROS)
|
||||
set(DEFAULT_INTERNAL_MODULE CROSSFIRE CACHE STRING "Default internal module")
|
||||
@@ -137,7 +131,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(CPU_TYPE_FULL STM32F407xG)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(USB_CHARGE_LED YES)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
elseif(PCBREV STREQUAL BUMBLEBEE)
|
||||
set(DEFAULT_INTERNAL_MODULE CROSSFIRE CACHE STRING "Default internal module")
|
||||
@@ -148,7 +141,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(CPU_TYPE_FULL STM32F407xG)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(FUNCTION_SWITCHES YES)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
set(AUX_SERIAL ON)
|
||||
elseif (PCBREV STREQUAL T14)
|
||||
@@ -160,7 +152,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(CPU_TYPE_FULL STM32F407xG)
|
||||
set(PXX2 ON)
|
||||
set(USB_CHARGE_LED YES)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
elseif (PCBREV STREQUAL T12MAX)
|
||||
set(DEFAULT_INTERNAL_MODULE CROSSFIRE CACHE STRING "Default internal module")
|
||||
@@ -170,7 +161,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(USB_CHARGE_LED YES)
|
||||
set(CPU_TYPE_FULL STM32F407xG)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
elseif(PCBREV STREQUAL T20)
|
||||
set(DEFAULT_INTERNAL_MODULE CROSSFIRE CACHE STRING "Default internal module")
|
||||
@@ -182,7 +172,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(FLYSKY_GIMBAL ON)
|
||||
set(FUNCTION_SWITCHES ON)
|
||||
add_definitions(-DRADIO_FAMILY_T20)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
elseif(PCBREV STREQUAL T20V2)
|
||||
set(DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module")
|
||||
@@ -195,7 +184,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(PXX2 ON)
|
||||
set(FUNCTION_SWITCHES ON)
|
||||
add_definitions(-DRADIO_FAMILY_T20)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
elseif(PCBREV STREQUAL TLITE)
|
||||
set(DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module")
|
||||
@@ -204,7 +192,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(FLAVOUR tlite)
|
||||
set(CPU_TYPE_FULL STM32F205xE)
|
||||
add_definitions(-DRADIO_FAMILY_JUMPER_T12)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
elseif(PCBREV STREQUAL LR3PRO)
|
||||
set(DEFAULT_INTERNAL_MODULE CROSSFIRE CACHE STRING "Default internal module")
|
||||
@@ -213,7 +200,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(FLAVOUR lr3pro)
|
||||
set(CPU_TYPE_FULL STM32F205xE)
|
||||
add_definitions(-DRADIO_FAMILY_JUMPER_T12)
|
||||
add_definitions(-DMANUFACTURER_BETAFPV)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
elseif(PCBREV STREQUAL TX12)
|
||||
set(DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module")
|
||||
@@ -224,7 +210,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(BLUETOOTH NO)
|
||||
set(USB_CHARGER YES)
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
elseif(PCBREV STREQUAL TX12MK2)
|
||||
set(DEFAULT_INTERNAL_MODULE CROSSFIRE CACHE STRING "Default internal module")
|
||||
set(INTERNAL_MODULE_SERIAL YES)
|
||||
@@ -236,7 +221,6 @@ elseif(PCB STREQUAL X7)
|
||||
if (NOT BLUETOOTH)
|
||||
set(AUX_SERIAL ON)
|
||||
endif()
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
set(PXX2 ON)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
elseif(PCBREV STREQUAL MT12)
|
||||
@@ -249,7 +233,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(BLUETOOTH NO)
|
||||
set(USB_CHARGER YES)
|
||||
set(HELI NO)
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
set(PXX2 ON)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
set(FLEXSW "2" CACHE STRING "Max flex inputs usable as switches")
|
||||
@@ -265,7 +248,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(CPU_TYPE_FULL STM32F407xG)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(USB_CHARGER YES)
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
set(PXX2 ON)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
set(FLYSKY_GIMBAL ON)
|
||||
@@ -281,7 +263,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(CPU_TYPE_FULL STM32F407xG)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(USB_CHARGER YES)
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
add_definitions(-DRGB_LEDS_900NS)
|
||||
set(PXX2 ON)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
@@ -301,7 +282,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(CPU_TYPE_FULL STM32F407xE)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(USB_CHARGER YES)
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
set(PXX2 ON)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
if (NOT BLUETOOTH)
|
||||
@@ -316,7 +296,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(CPU_TYPE_FULL STM32F407xE)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(USB_CHARGER YES)
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
set(PXX2 ON)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
if (NOT BLUETOOTH)
|
||||
@@ -333,7 +312,6 @@ elseif(PCB STREQUAL X7)
|
||||
if(RADIOMASTER_RELEASE)
|
||||
set(BIND_KEY YES)
|
||||
endif()
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
elseif(PCBREV STREQUAL COMMANDO8)
|
||||
set(DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module")
|
||||
set(INTERNAL_MODULE_SERIAL YES)
|
||||
@@ -345,7 +323,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(BLUETOOTH NO)
|
||||
set(USE_RTC_CLOCK NO)
|
||||
add_definitions(-DMUTUALLY_EXCLUSIVE_MODULES)
|
||||
add_definitions(-DMANUFACTURER_IFLIGHT)
|
||||
elseif(PCBREV STREQUAL ACCESS)
|
||||
set(DEFAULT_INTERNAL_MODULE ISRM_PXX2 CACHE STRING "Default internal module")
|
||||
set(INTERNAL_MODULE_SERIAL YES)
|
||||
@@ -359,7 +336,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(PXX_FREQUENCY "HIGH")
|
||||
set(BLUETOOTH YES)
|
||||
set(ROTARY_ENCODER YES)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
elseif(PCBREV STREQUAL V14 OR PCBREV STREQUAL V14LCD)
|
||||
set(DEFAULT_INTERNAL_MODULE CROSSFIRE CACHE STRING "Default internal module")
|
||||
set(INTERNAL_MODULE_SERIAL YES)
|
||||
@@ -373,7 +349,6 @@ elseif(PCB STREQUAL X7)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(USB_CHARGER YES)
|
||||
add_definitions(-DSTM32_SUPPORT_32BIT_TIMERS)
|
||||
add_definitions(-DMANUFACTURER_HELLORADIOSKY)
|
||||
set(PXX2 ON)
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
set(CSD203_SENSOR ON)
|
||||
@@ -389,7 +364,6 @@ elseif(PCB STREQUAL X7)
|
||||
add_definitions(-DBLUETOOTH_PROBE)
|
||||
set(ROTARY_ENCODER YES)
|
||||
set(MODULE_SIZE_STD YES)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
if(DEFINED PCBREV_HARDCODED)
|
||||
# This *can* be used to prevent messing with PA14 (SWCLK), so stlink can be used
|
||||
# without interruptions.
|
||||
@@ -417,7 +391,6 @@ elseif(PCB STREQUAL X9LITE)
|
||||
set(FONTS_TARGET 9x_fonts_1bit)
|
||||
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||
set(ROTARY_ENCODER YES)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
elseif(PCB STREQUAL X9LITES)
|
||||
set(DEFAULT_INTERNAL_MODULE ISRM_PXX2 CACHE STRING "Default internal module")
|
||||
set(INTERNAL_MODULE_SERIAL YES)
|
||||
@@ -437,7 +410,6 @@ elseif(PCB STREQUAL X9LITES)
|
||||
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||
set(BLUETOOTH YES)
|
||||
set(ROTARY_ENCODER YES)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
elseif(PCB STREQUAL XLITE)
|
||||
set(DEFAULT_INTERNAL_MODULE XJT_PXX1 CACHE STRING "Default internal module")
|
||||
set(INTERNAL_MODULE_SERIAL YES)
|
||||
@@ -456,7 +428,6 @@ elseif(PCB STREQUAL XLITE)
|
||||
set(FONTS_TARGET 9x_fonts_1bit)
|
||||
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||
set(BLUETOOTH YES)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
elseif(PCB STREQUAL XLITES)
|
||||
set(DEFAULT_INTERNAL_MODULE ISRM_PXX2 CACHE STRING "Default internal module")
|
||||
set(INTERNAL_MODULE_SERIAL YES)
|
||||
@@ -476,7 +447,6 @@ elseif(PCB STREQUAL XLITES)
|
||||
set(PXX2 ON)
|
||||
set(BLUETOOTH YES)
|
||||
set(IMU YES)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
endif()
|
||||
|
||||
message("CPU_TYPE_FULL = ${CPU_TYPE_FULL}")
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(RADIO_TX12) || defined(RADIO_TX12MK2)
|
||||
#define USB_NAME "Radiomaster TX12"
|
||||
#define USB_MANUFACTURER 'R', 'M', '_', 'T', 'X', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'R', 'M', ' ', 'T', 'X', '1', '2', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_BOXER)
|
||||
#define USB_NAME "Radiomaster Boxer"
|
||||
#define USB_MANUFACTURER 'R', 'M', '_', 'T', 'X', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'R', 'M', ' ', 'B', 'o', 'x', 'e', 'r' /* 8 Bytes */
|
||||
#elif defined(RADIO_ZORRO)
|
||||
#define USB_NAME "Radiomaster Zorro"
|
||||
#define USB_MANUFACTURER 'R', 'M', '_', 'T', 'X', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'R', 'M', ' ', 'Z', 'o', 'r', 'r', 'o' /* 8 Bytes */
|
||||
#elif defined(RADIO_MT12)
|
||||
#define USB_NAME "Radiomaster MT12"
|
||||
#define USB_MANUFACTURER 'R', 'M', '_', 'T', 'X', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'R', 'M', ' ', 'M', 'T', '1', '2', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_GX12)
|
||||
#define USB_NAME "Radiomaster GX12"
|
||||
#define USB_MANUFACTURER 'R', 'M', '_', 'T', 'X', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'R', 'M', ' ', 'G', 'X', '1', '2', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_POCKET)
|
||||
#define USB_NAME "Radiomaster Pocket"
|
||||
#define USB_MANUFACTURER 'R', 'M', '_', 'T', 'X', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'R', 'M', 'P', 'o', 'c', 'k', 'e', 't' /* 8 Bytes */
|
||||
#elif defined(RADIO_T8)
|
||||
#define USB_NAME "Radiomaster T8"
|
||||
#define USB_MANUFACTURER 'R', 'M', '_', 'T', 'X', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'R', 'M', ' ', 'T', '8', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_LR3PRO)
|
||||
#define USB_NAME "BETAFPV LR3PRO"
|
||||
#define USB_MANUFACTURER 'B', 'E', 'T', 'A', 'F', 'P', 'V', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'L', 'R', '3', 'P', 'R', 'O', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_TLITE)
|
||||
#define USB_NAME "Jumper TLite"
|
||||
#define USB_MANUFACTURER 'J', 'U', 'M', 'P', 'E', 'R', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '-', 'L', 'i', 't', 'e', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_TPRO)
|
||||
#define USB_NAME "Jumper TPro"
|
||||
#define USB_MANUFACTURER 'J', 'U', 'M', 'P', 'E', 'R', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '-', 'P', 'r', 'o', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_TPROV2)
|
||||
#define USB_NAME "Jumper TPro V2"
|
||||
#define USB_MANUFACTURER 'J', 'U', 'M', 'P', 'E', 'R', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '-', 'P', 'r', 'o', ' ', 'V', '2' /* 8 Bytes */
|
||||
#elif defined(RADIO_T12MAX)
|
||||
#define USB_NAME "Jumper T12 MAX"
|
||||
#define USB_MANUFACTURER 'J', 'U', 'M', 'P', 'E', 'R', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '1', '2', ' ', 'M', 'A', 'X', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_TPROS)
|
||||
#define USB_NAME "Jumper T-Pro S"
|
||||
#define USB_MANUFACTURER 'J', 'U', 'M', 'P', 'E', 'R', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '-', 'P', 'r', 'o', ' ', 'S', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_BUMBLEBEE)
|
||||
#define USB_NAME "Jumper Bumblebee"
|
||||
#define USB_MANUFACTURER 'J', 'U', 'M', 'P', 'E', 'R', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'B', 'u', 'm', 'b', 'l', 'e', 'b', 'e' /* 8 Bytes */
|
||||
#elif defined(RADIO_T14)
|
||||
#define USB_NAME "Jumper T14"
|
||||
#define USB_MANUFACTURER 'J', 'U', 'M', 'P', 'E', 'R', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '1', '4', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_T20)
|
||||
#define USB_NAME "Jumper T20"
|
||||
#define USB_MANUFACTURER 'J', 'U', 'M', 'P', 'E', 'R', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '2', '0', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_T20V2)
|
||||
#define USB_NAME "Jumper T20 V2"
|
||||
#define USB_MANUFACTURER 'J', 'U', 'M', 'P', 'E', 'R', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', '2', '0', 'V', '2', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_COMMANDO8)
|
||||
#define USB_NAME "iFlight Commando 8"
|
||||
#define USB_MANUFACTURER 'i', 'F', 'l', 'i', 'g', 'h', 't', '-' /* 8 bytes */
|
||||
#define USB_PRODUCT 'C', 'o', 'm', 'm', 'a', 'n', 'd', 'o' /* 8 Bytes */
|
||||
#elif defined(RADIO_V14)
|
||||
#define USB_NAME "HelloRadioSky V14"
|
||||
#define USB_MANUFACTURER 'H', 'R', 'S', 'k', 'y', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'V', '1', '4', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#elif defined(RADIO_V14LCD)
|
||||
#define USB_NAME "HelloRadioSky V14LCD"
|
||||
#define USB_MANUFACTURER 'H', 'R', 'S', 'k', 'y', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'V', '1', '4', 'L', 'C', 'D', ' ', ' ' /* 8 Bytes */
|
||||
#else
|
||||
#define USB_NAME "FrSky Taranis"
|
||||
#define USB_MANUFACTURER 'F', 'r', 'S', 'k', 'y', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', 'a', 'r', 'a', 'n', 'i', 's', ' ' /* 8 Bytes */
|
||||
#endif
|
||||
@@ -64,7 +64,6 @@ add_definitions(-DUSB_CHARGER)
|
||||
add_definitions(-DUSB_CHARGE_CONTROL)
|
||||
|
||||
set(FLAVOUR tx15)
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
|
||||
# defines existing internal modules
|
||||
set(INTERNAL_MODULES CRSF CACHE STRING "Internal modules")
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _USB_DESCRIPTOR_H_
|
||||
#define _USB_DESCRIPTOR_H_
|
||||
|
||||
#define USB_NAME "RadioMaster TX15"
|
||||
#define USB_MANUFACTURER 'R', 'M', ' ', ' ', ' ', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', 'X', '1', '5', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
|
||||
#endif // _USB_DESCRIPTOR_H_
|
||||
@@ -68,7 +68,6 @@ add_definitions(-DUSB_CHARGE_CONTROL)
|
||||
add_definitions(-DLUMINOSITY_SENSOR)
|
||||
|
||||
set(FLAVOUR tx16smk3)
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
|
||||
# defines existing internal modules
|
||||
set(INTERNAL_MODULES CRSF CACHE STRING "Internal modules")
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _USB_DESCRIPTOR_H_
|
||||
#define _USB_DESCRIPTOR_H_
|
||||
|
||||
#define USB_NAME "TX16SMK3"
|
||||
#define USB_MANUFACTURER 'R', 'M', ' ', ' ', ' ', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'T', 'X', '1', '6', 'S', 'M', 'K', '3' /* 8 Bytes */
|
||||
|
||||
#endif // _USB_DESCRIPTOR_H_
|
||||
@@ -47,7 +47,6 @@ add_definitions(-DUSE_CUSTOM_EXTI_IRQ)
|
||||
add_definitions(-DUSB_CHARGER)
|
||||
|
||||
set(FLAVOUR v12)
|
||||
add_definitions(-DMANUFACTURER_HELLORADIOSKY)
|
||||
|
||||
# defines existing internal modules
|
||||
set(INTERNAL_MODULES CRSF CACHE STRING "Internal modules")
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define USB_NAME "HelloRadioSky V12"
|
||||
#define USB_MANUFACTURER 'H', 'E', 'L', 'L', 'O', ' ', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'V', '1', '2', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
@@ -58,6 +58,8 @@ def generate_from_template(json_filename, template_filename, target):
|
||||
trims = root_obj.get("trims")
|
||||
trim_gpios = json_index.build_trim_gpio_port_index(trims)
|
||||
|
||||
identity = root_obj.get("identity")
|
||||
|
||||
legacy_inputs = legacy_names.inputs_by_target(target)
|
||||
|
||||
template_dir = os.path.dirname(os.path.abspath(template_filename))
|
||||
@@ -80,6 +82,7 @@ def generate_from_template(json_filename, template_filename, target):
|
||||
switches=hw_def.switches,
|
||||
keys=hw_def.keys,
|
||||
trims=trims,
|
||||
identity=identity,
|
||||
adc_index=adc_index,
|
||||
adc_gpios=adc_gpios,
|
||||
switch_gpios=switch_gpios,
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
//
|
||||
|
||||
#pragma once
|
||||
{% if identity %}
|
||||
|
||||
// Identity
|
||||
#define MANUFACTURER_{{ identity.manufacturer.upper() }}
|
||||
{% endif -%}
|
||||
|
||||
{% if timers %}
|
||||
|
||||
// Timers
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
//
|
||||
// WARNING: DO NOT EDIT THIS FILE
|
||||
// This file has been generated from the target's JSON hardware description
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#define USB_NAME "{{ identity.manufacturer }} {{ identity.model }}"
|
||||
#define USB_MANUFACTURER {% for c in identity.usb_manufacturer.ljust(8) %}'{{ c }}'{% if not loop.last %}, {% endif %}{% endfor %} /* 8 bytes */
|
||||
#define USB_PRODUCT {% for c in identity.usb_product.ljust(8) %}'{{ c }}'{% if not loop.last %}, {% endif %}{% endfor %} /* 8 Bytes */
|
||||
@@ -6,6 +6,7 @@
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"identity",
|
||||
"adc_inputs",
|
||||
"switches",
|
||||
"keys",
|
||||
@@ -15,6 +16,7 @@
|
||||
"timers"
|
||||
],
|
||||
"properties": {
|
||||
"identity": { "$ref": "#/$defs/identity" },
|
||||
"adc_inputs": { "$ref": "#/$defs/adc_inputs" },
|
||||
"switches": { "type": "array", "items": { "$ref": "#/$defs/switch" } },
|
||||
"keys": { "type": "array", "items": { "$ref": "#/$defs/key" } },
|
||||
@@ -45,6 +47,19 @@
|
||||
"pattern": "^GPIO_PIN\\(GPIO[A-K],\\s*\\d+\\)$"
|
||||
},
|
||||
|
||||
"identity": {
|
||||
"description": "Board identity metadata, independent of any electrical/hardware detail. Consumed at build time (firmware) and runtime (Companion) so manufacturer/model/USB descriptor strings aren't hand-maintained separately in either.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["manufacturer", "model", "usb_manufacturer", "usb_product"],
|
||||
"properties": {
|
||||
"manufacturer": { "type": "string", "minLength": 1 },
|
||||
"model": { "type": "string", "minLength": 1 },
|
||||
"usb_manufacturer": { "type": "string", "minLength": 1, "maxLength": 8, "description": "USB manufacturer string (USB_MANUFACTURER); space-padded to a fixed 8 bytes at codegen time." },
|
||||
"usb_product": { "type": "string", "minLength": 1, "maxLength": 8, "description": "USB product string (USB_PRODUCT); space-padded to a fixed 8 bytes at codegen time." }
|
||||
}
|
||||
},
|
||||
|
||||
"adc_inputs": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
|
||||
Reference in New Issue
Block a user