mirror of
https://github.com/opentx/opentx.git
synced 2025-07-12 19:10:19 +03:00
Zorro Int ELRS (#8848)
This commit is contained in:
parent
8e42906cb6
commit
1d9f94e44f
25 changed files with 283 additions and 136 deletions
|
@ -1360,6 +1360,7 @@ void registerOpenTxFirmwares()
|
|||
firmware->addOption("noheli", Firmware::tr("Disable HELI menu and cyclic mix support"));
|
||||
firmware->addOption("nogvars", Firmware::tr("Disable Global variables"));
|
||||
firmware->addOption("lua", Firmware::tr("Enable Lua custom scripts screen"));
|
||||
firmware->addOption("internalelrs", Firmware::tr("Select if internal ELRS module is installed"));
|
||||
addOpenTxFontOptions(firmware);
|
||||
registerOpenTxFirmware(firmware);
|
||||
addOpenTxRfOptions(firmware, FLEX);
|
||||
|
|
|
@ -100,7 +100,8 @@ void libCrsfRouting(uint8_t inputPort, uint8_t * pArr)
|
|||
if (libCrsfPorts[routeToPort].gateway != NULL) {
|
||||
libCrsfPorts[routeToPort].gateway(pArr);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
for (portCnt = 0; portCnt < libCrsfPortsSize; portCnt++) {
|
||||
if (inputPort != libCrsfPorts[portCnt].portName
|
||||
&& libCrsfPorts[portCnt].gateway != NULL) {
|
||||
|
@ -134,7 +135,8 @@ bool libCrsfParse(libCrsfParseData * pParseData, uint8_t newData)
|
|||
if (pParseData->payload[LIBCRSF_LENGTH_ADD] < LIBCRSF_PAYLOAD_SIZE
|
||||
&& pParseData->payload[LIBCRSF_LENGTH_ADD] != 0) {
|
||||
pParseData->status = CRSF_PARSE_RD_FRAME;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
pParseData->status = CRSF_PARSE_SYNC;
|
||||
}
|
||||
break;
|
||||
|
@ -152,7 +154,8 @@ bool libCrsfParse(libCrsfParseData * pParseData, uint8_t newData)
|
|||
}
|
||||
pParseData->status = CRSF_PARSE_SYNC;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
pParseData->status = CRSF_PARSE_SYNC;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -726,11 +726,13 @@ static int luaCrossfireTelemetryPush(lua_State * L)
|
|||
return 1;
|
||||
}
|
||||
#endif
|
||||
if (telemetryProtocol != PROTOCOL_TELEMETRY_CROSSFIRE) {
|
||||
bool sport = (telemetryProtocol == PROTOCOL_TELEMETRY_CROSSFIRE);
|
||||
bool internal = (moduleState[INTERNAL_MODULE].protocol == PROTOCOL_CHANNELS_CROSSFIRE);
|
||||
|
||||
if (!internal && !sport) {
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (lua_gettop(L) == 0) {
|
||||
lua_pushboolean(L, outputTelemetryBuffer.isAvailable());
|
||||
}
|
||||
|
@ -749,8 +751,8 @@ static int luaCrossfireTelemetryPush(lua_State * L)
|
|||
lua_rawgeti(L, 2, i+1);
|
||||
outputTelemetryBuffer.pushByte(luaL_checkunsigned(L, -1));
|
||||
}
|
||||
outputTelemetryBuffer.pushByte(crc8(outputTelemetryBuffer.data+2, 1 + length));
|
||||
outputTelemetryBuffer.setDestination(TELEMETRY_ENDPOINT_SPORT);
|
||||
outputTelemetryBuffer.pushByte(crc8(outputTelemetryBuffer.data + 2, 1 + length));
|
||||
outputTelemetryBuffer.setDestination(internal ? 0 : TELEMETRY_ENDPOINT_SPORT);
|
||||
lua_pushboolean(L, true);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -467,7 +467,8 @@ int luaLoadScriptFileToState(lua_State * L, const char * filename, const char *
|
|||
if (scriptNeedsCompile || !strchr(lmode, 'b')) {
|
||||
// text version needs compilation or forced by mode
|
||||
loadFileType = 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// use binary file
|
||||
loadFileType = 2;
|
||||
}
|
||||
|
|
|
@ -71,6 +71,9 @@ static const char * const options[] = {
|
|||
#if defined(INTERNAL_MODULE_MULTI)
|
||||
"internalmulti",
|
||||
#endif
|
||||
#if defined(INTERNAL_MODULE_ELRS)
|
||||
"internalelrs",
|
||||
#endif
|
||||
#if defined(INTERNAL_MODULE_PXX2)
|
||||
"internalaccess",
|
||||
#endif
|
||||
|
|
|
@ -69,26 +69,43 @@ uint8_t createCrossfireChannelsFrame(uint8_t * frame, int16_t * pulses)
|
|||
return buf - frame;
|
||||
}
|
||||
|
||||
void setupPulsesCrossfire()
|
||||
static void setupPulsesCrossfire(uint8_t idx, CrossfirePulsesData* p_data, uint8_t endpoint)
|
||||
{
|
||||
if (telemetryProtocol == PROTOCOL_TELEMETRY_CROSSFIRE) {
|
||||
uint8_t * pulses = extmodulePulsesData.crossfire.pulses;
|
||||
#if defined(LUA)
|
||||
if (outputTelemetryBuffer.destination == TELEMETRY_ENDPOINT_SPORT) {
|
||||
memcpy(pulses, outputTelemetryBuffer.data, outputTelemetryBuffer.size);
|
||||
extmodulePulsesData.crossfire.length = outputTelemetryBuffer.size;
|
||||
outputTelemetryBuffer.reset();
|
||||
}
|
||||
else
|
||||
if (outputTelemetryBuffer.destination == endpoint) {
|
||||
memcpy(p_data->pulses, outputTelemetryBuffer.data, outputTelemetryBuffer.size);
|
||||
p_data->length = outputTelemetryBuffer.size;
|
||||
outputTelemetryBuffer.reset();
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
if (moduleState[EXTERNAL_MODULE].counter == CRSF_FRAME_MODELID) {
|
||||
extmodulePulsesData.crossfire.length = createCrossfireModelIDFrame(pulses);
|
||||
moduleState[EXTERNAL_MODULE].counter = CRSF_FRAME_MODELID_SENT;
|
||||
}
|
||||
else {
|
||||
extmodulePulsesData.crossfire.length = createCrossfireChannelsFrame(pulses, &channelOutputs[g_model.moduleData[EXTERNAL_MODULE].channelsStart]);
|
||||
}
|
||||
{
|
||||
if (moduleState[idx].counter == CRSF_FRAME_MODELID) {
|
||||
p_data->length = createCrossfireModelIDFrame(p_data->pulses);
|
||||
moduleState[idx].counter = CRSF_FRAME_MODELID_SENT;
|
||||
}
|
||||
else {
|
||||
p_data->length = createCrossfireChannelsFrame(
|
||||
p_data->pulses,
|
||||
&channelOutputs[g_model.moduleData[idx].channelsStart]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void setupPulsesCrossfire(uint8_t idx)
|
||||
{
|
||||
#if !defined(PCBSKY9X)
|
||||
if (idx == INTERNAL_MODULE) {
|
||||
auto* p_data = &intmodulePulsesData.crossfire;
|
||||
setupPulsesCrossfire(idx, p_data, 0);
|
||||
}
|
||||
else if (telemetryProtocol == PROTOCOL_TELEMETRY_CROSSFIRE) {
|
||||
auto* p_data = &extmodulePulsesData.crossfire;
|
||||
setupPulsesCrossfire(idx, p_data, TELEMETRY_ENDPOINT_SPORT);
|
||||
}
|
||||
#else
|
||||
if (telemetryProtocol == PROTOCOL_TELEMETRY_CROSSFIRE) {
|
||||
auto * p_data = &extmodulePulsesData.crossfire;
|
||||
setupPulsesCrossfire(idx, p_data, TELEMETRY_ENDPOINT_SPORT);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -390,7 +390,7 @@ bool setupPulsesExternalModule(uint8_t protocol)
|
|||
}
|
||||
else
|
||||
mixerSchedulerSetPeriod(EXTERNAL_MODULE, CROSSFIRE_PERIOD);
|
||||
setupPulsesCrossfire();
|
||||
setupPulsesCrossfire(EXTERNAL_MODULE);
|
||||
#if defined(PCBSKY9X)
|
||||
scheduleNextMixerCalculation(EXTERNAL_MODULE, CROSSFIRE_PERIOD);
|
||||
#endif
|
||||
|
@ -460,7 +460,12 @@ static void enablePulsesInternalModule(uint8_t protocol)
|
|||
// start new protocol hardware here
|
||||
|
||||
switch (protocol) {
|
||||
#if defined(INTERNAL_MODULE_CRSF) || defined(INTERNAL_MODULE_ELRS)
|
||||
#if defined(INTERNAL_MODULE_ELRS)
|
||||
case PROTOCOL_CHANNELS_CROSSFIRE:
|
||||
intmoduleSerialStart(CROSSFIRE_BAUDRATE, true, USART_Parity_No, USART_StopBits_1, USART_WordLength_8b);
|
||||
mixerSchedulerSetPeriod(INTERNAL_MODULE, CROSSFIRE_PERIOD);
|
||||
break;
|
||||
#elif defined(INTERNAL_MODULE_CRSF)
|
||||
case PROTOCOL_CHANNELS_CROSSFIRE:
|
||||
break;
|
||||
#elif defined(PXX1) && !defined(INTMODULE_USART)
|
||||
|
@ -572,9 +577,15 @@ bool setupPulsesInternalModule(uint8_t protocol)
|
|||
#endif
|
||||
|
||||
#if defined(INTERNAL_MODULE_CRSF) || defined(INTERNAL_MODULE_ELRS)
|
||||
case PROTOCOL_CHANNELS_CROSSFIRE:
|
||||
mixerSchedulerSetPeriod(INTERNAL_MODULE, CROSSFIRE_PERIOD);
|
||||
case PROTOCOL_CHANNELS_CROSSFIRE: {
|
||||
ModuleSyncStatus & status = getModuleSyncStatus(INTERNAL_MODULE);
|
||||
if (status.isValid())
|
||||
mixerSchedulerSetPeriod(INTERNAL_MODULE, status.getAdjustedRefreshRate());
|
||||
else
|
||||
mixerSchedulerSetPeriod(INTERNAL_MODULE, CROSSFIRE_PERIOD);
|
||||
setupPulsesCrossfire(INTERNAL_MODULE);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
default:
|
||||
|
|
|
@ -266,6 +266,8 @@ union InternalModulePulsesData {
|
|||
UartMultiPulses multi;
|
||||
#endif
|
||||
|
||||
CrossfirePulsesData crossfire;
|
||||
|
||||
#if defined(INTERNAL_MODULE_PPM)
|
||||
PpmPulsesData<pulse_duration_t> ppm;
|
||||
#endif
|
||||
|
@ -327,7 +329,7 @@ bool setupPulsesExternalModule();
|
|||
void stopPulsesExternalModule();
|
||||
#endif
|
||||
void setupPulsesDSM2();
|
||||
void setupPulsesCrossfire();
|
||||
void setupPulsesCrossfire(uint8_t module);
|
||||
void setupPulsesGhost();
|
||||
void setupPulsesMultiExternalModule();
|
||||
void setupPulsesMultiInternalModule();
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
ModuleFifo intmoduleFifo;
|
||||
#if !defined(INTMODULE_DMA_STREAM)
|
||||
uint8_t * intmoduleTxBufferData;
|
||||
uint8_t intmoduleTxBufferRemaining;
|
||||
volatile uint8_t intmoduleTxBufferRemaining;
|
||||
#endif
|
||||
|
||||
void intmoduleStop()
|
||||
|
@ -75,7 +75,7 @@ void intmoduleSerialStart(uint32_t baudrate, uint8_t rxEnable, uint16_t parity,
|
|||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(INTMODULE_GPIO, &GPIO_InitStructure);
|
||||
|
||||
USART_DeInit(INTMODULE_USART);
|
||||
|
@ -176,10 +176,22 @@ void intmoduleSendNextFrame()
|
|||
break;
|
||||
#endif
|
||||
|
||||
#if defined(INTERNAL_MODULE_PPM)
|
||||
case PROTOCOL_CHANNELS_PPM:
|
||||
intmoduleSendNextFramePPM(intmodulePulsesData.ppm.pulses, intmodulePulsesData.ppm.ptr - intmodulePulsesData.ppm.pulses);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(PXX1)
|
||||
#if defined(INTMODULE_USART)
|
||||
case PROTOCOL_CHANNELS_PXX1_SERIAL:
|
||||
intmoduleSendBuffer(intmodulePulsesData.pxx_uart.getData(), intmodulePulsesData.pxx_uart.getSize());
|
||||
break;
|
||||
#else
|
||||
case PROTOCOL_CHANNELS_PXX1_PULSES:
|
||||
intmoduleSendNextFramePxx1(intmodulePulsesData.pxx.getData(), intmodulePulsesData.pxx.getSize());
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(INTERNAL_MODULE_MULTI)
|
||||
|
@ -187,5 +199,11 @@ void intmoduleSendNextFrame()
|
|||
intmoduleSendBuffer(intmodulePulsesData.multi.getData(), intmodulePulsesData.multi.getSize());
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(INTERNAL_MODULE_ELRS)
|
||||
case PROTOCOL_CHANNELS_CROSSFIRE:
|
||||
intmoduleSendBuffer(intmodulePulsesData.crossfire.pulses,intmodulePulsesData.crossfire.length);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -466,7 +466,8 @@ static void pushCluster(uint8_t *buffer, uint16_t sector, uint16_t & cluster, in
|
|||
// First 12 bit half
|
||||
rest = value >> 8;
|
||||
writeByte(buffer, sector, startbyte, value & 0xff);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// second 12 bit half, write rest and next byte
|
||||
writeByte(buffer, sector, startbyte, value << 4 | rest );
|
||||
writeByte(buffer, sector, startbyte+1, (value >> 4) & 0xff);
|
||||
|
|
|
@ -404,6 +404,8 @@ void telemetryPortSetDirectionInput();
|
|||
void telemetryTransmitBuffer(const uint8_t * buffer, uint32_t size);
|
||||
void rxPdcUsart( void (*pChProcess)(uint8_t x) );
|
||||
void sportSendBuffer(const uint8_t * buffer, uint32_t size);
|
||||
bool telemetryGetByte(uint8_t * byte);
|
||||
void telemetryClearFifo();
|
||||
|
||||
// Second UART driver
|
||||
void auxSerialTelemetryInit(unsigned int protocol);
|
||||
|
|
|
@ -156,7 +156,8 @@ void init_ssc(uint8_t baudrateDiv1000)
|
|||
#if defined(REVX)
|
||||
if (isModuleMultimodule(EXTERNAL_MODULE)) {
|
||||
PIOA->PIO_MDDR = PIO_PA17; // Push Pull O/p in A17
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
PIOA->PIO_MDER = PIO_PA17; // Open Drain O/p in A17
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -139,6 +139,7 @@ elseif(PCB STREQUAL X7)
|
|||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
elseif(PCBREV STREQUAL TPRO)
|
||||
option(INTERNAL_MODULE_MULTI "Support for MULTI internal module" ON)
|
||||
option(INTERNAL_MODULE_ELRS "Support for ELRS internal module" OFF)
|
||||
set(FLAVOUR tpro)
|
||||
set(NAVIGATION_TYPE x7)
|
||||
set(CPU_TYPE STM32F2)
|
||||
|
@ -522,6 +523,7 @@ endif()
|
|||
if(INTERNAL_MODULE_ELRS)
|
||||
add_definitions(-DHARDWARE_INTERNAL_MODULE)
|
||||
add_definitions(-DINTERNAL_MODULE_ELRS)
|
||||
add_definitions(-DINTERNAL_MODULE_SERIAL_TELEMETRY)
|
||||
set(INTERNAL_MODULE_MULTI NO)
|
||||
set(TARGET_SRC
|
||||
${TARGET_SRC}
|
||||
|
@ -532,6 +534,7 @@ endif()
|
|||
if(INTERNAL_MODULE_MULTI)
|
||||
add_definitions(-DHARDWARE_INTERNAL_MODULE)
|
||||
add_definitions(-DINTERNAL_MODULE_MULTI)
|
||||
add_definitions(-DINTERNAL_MODULE_SERIAL_TELEMETRY)
|
||||
set(TARGET_SRC
|
||||
${TARGET_SRC}
|
||||
../common/arm/stm32/intmodule_serial_driver.cpp
|
||||
|
|
|
@ -927,7 +927,7 @@ void hapticOff();
|
|||
|
||||
// Aux serial port driver
|
||||
#if defined(AUX_SERIAL_GPIO)
|
||||
#define DEBUG_BAUDRATE 115200
|
||||
#define DEBUG_BAUDRATE 400000
|
||||
#define LUA_DEFAULT_BAUDRATE 115200
|
||||
#define AUX_SERIAL
|
||||
extern uint8_t auxSerialMode;
|
||||
|
|
|
@ -1423,6 +1423,9 @@
|
|||
#define INTMODULE_DMA_STREAM_IRQHandler DMA2_Stream7_IRQHandler
|
||||
#define INTMODULE_DMA_FLAG_TC DMA_IT_TCIF7
|
||||
#define INTMODULE_DMA_CHANNEL DMA_Channel_4
|
||||
#define INTMODULE_BOOTCMD_GPIO GPIOB
|
||||
#define INTMODULE_BOOTCMD_GPIO_PIN GPIO_Pin_1 // PB.01
|
||||
#define INIT_INTMODULE_BOOTCMD_PIN() GPIO_ResetBits(INTMODULE_BOOTCMD_GPIO, INTMODULE_BOOTCMD_GPIO_PIN);
|
||||
#elif defined(PCBX9E) || defined(PCBX9DP) || defined(RADIO_X7)
|
||||
#define INTMODULE_PULSES
|
||||
#define INTMODULE_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_DMA2)
|
||||
|
@ -1443,7 +1446,7 @@
|
|||
#define INTMODULE_DMA_STREAM_IRQHandler DMA2_Stream5_IRQHandler
|
||||
#define INTMODULE_DMA_FLAG_TC DMA_IT_TCIF5
|
||||
#define INTMODULE_TIMER_FREQ (PERI2_FREQUENCY * TIMER_MULT_APB2)
|
||||
#elif (defined(RADIO_FAMILY_JUMPER_T12) && defined(HARDWARE_INTERNAL_MODULE)) || defined(RADIO_TX12) || defined(RADIO_ZORRO) || defined(RADIO_T8) || defined(RADIO_TPRO)
|
||||
#elif (defined(RADIO_FAMILY_JUMPER_T12) && defined(HARDWARE_INTERNAL_MODULE)) || defined(RADIO_TX12) || defined(RADIO_T8) || defined(RADIO_TPRO)
|
||||
#define INTMODULE_RCC_AHB1Periph (RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_DMA1)
|
||||
#define INTMODULE_RCC_APB1Periph (RCC_APB1Periph_USART3 | RCC_APB1Periph_TIM2)
|
||||
#define INTMODULE_RCC_APB2Periph 0
|
||||
|
@ -1790,15 +1793,7 @@
|
|||
#define INTMODULE_HEARTBEAT_EXTI_IRQn EXTI15_10_IRQn
|
||||
#define INTMODULE_HEARTBEAT_EXTI_IRQHandler EXTI15_10_IRQHandler
|
||||
#elif defined(PCBX9LITE)
|
||||
// #define INTMODULE_HEARTBEAT
|
||||
#define INTMODULE_HEARTBEAT_RCC_AHB1Periph 0 // RCC_AHB1Periph_GPIOC
|
||||
// #define INTMODULE_HEARTBEAT_GPIO GPIOC
|
||||
// #define INTMODULE_HEARTBEAT_GPIO_PIN GPIO_Pin_9
|
||||
// #define INTMODULE_HEARTBEAT_EXTI_PortSource EXTI_PortSourceGPIOC
|
||||
// #define INTMODULE_HEARTBEAT_EXTI_PinSource GPIO_PinSource9
|
||||
// #define INTMODULE_HEARTBEAT_EXTI_LINE EXTI_Line9
|
||||
// #define INTMODULE_HEARTBEAT_EXTI_IRQn EXTI9_5_IRQn
|
||||
// #define INTMODULE_HEARTBEAT_EXTI_IRQHandler EXTI9_5_IRQHandler
|
||||
#define INTMODULE_HEARTBEAT_RCC_AHB1Periph 0
|
||||
#elif defined(RADIO_X7ACCESS)
|
||||
#define INTMODULE_HEARTBEAT
|
||||
#define INTMODULE_HEARTBEAT_REUSE_INTERRUPT_ROTARY_ENCODER
|
||||
|
@ -1809,7 +1804,7 @@
|
|||
#define INTMODULE_HEARTBEAT_EXTI_PinSource GPIO_PinSource7
|
||||
#define INTMODULE_HEARTBEAT_EXTI_LINE EXTI_Line7
|
||||
#define INTMODULE_HEARTBEAT_EXTI_IRQn EXTI9_5_IRQn
|
||||
#elif defined(RADIO_X9DP2019) || defined(RADIO_ZORRO)
|
||||
#elif defined(RADIO_X9DP2019)
|
||||
#define INTMODULE_HEARTBEAT
|
||||
#define INTMODULE_HEARTBEAT_RCC_AHB1Periph RCC_AHB1Periph_GPIOB
|
||||
#define INTMODULE_HEARTBEAT_GPIO GPIOB
|
||||
|
@ -1819,6 +1814,8 @@
|
|||
#define INTMODULE_HEARTBEAT_EXTI_LINE EXTI_Line1
|
||||
#define INTMODULE_HEARTBEAT_EXTI_IRQn EXTI1_IRQn
|
||||
#define INTMODULE_HEARTBEAT_EXTI_IRQHandler EXTI1_IRQHandler
|
||||
#elif defined(RADIO_ZORRO)
|
||||
#define INTMODULE_HEARTBEAT_RCC_AHB1Periph 0
|
||||
#elif defined(RADIO_X7) || defined(RADIO_TX12) || defined(RADIO_TPRO)
|
||||
#define INTMODULE_HEARTBEAT
|
||||
#define INTMODULE_HEARTBEAT_REUSE_INTERRUPT_ROTARY_ENCODER
|
||||
|
@ -1881,10 +1878,9 @@
|
|||
#define TRAINER_MODULE_SBUS_DMA_STREAM EXTMODULE_USART_RX_DMA_STREAM
|
||||
#define TRAINER_MODULE_SBUS_DMA_CHANNEL EXTMODULE_USART_RX_DMA_CHANNEL
|
||||
#else
|
||||
#if defined(HARDWARE_EXTERNAL_MODULE)
|
||||
#if defined(INTMODULE_HEARTBEAT_GPIO) && defined(HARDWARE_EXTERNAL_MODULE)
|
||||
// Trainer CPPM input on heartbeat pin
|
||||
#define TRAINER_MODULE_CPPM
|
||||
#define TRAINER_MODULE_SBUS
|
||||
#endif
|
||||
#define TRAINER_MODULE_RCC_AHB1Periph RCC_AHB1Periph_GPIOC
|
||||
#define TRAINER_MODULE_RCC_APB2Periph RCC_APB2Periph_USART6
|
||||
#define TRAINER_MODULE_RCC_APB1Periph RCC_APB1Periph_TIM3
|
||||
|
@ -1899,6 +1895,8 @@
|
|||
#define TRAINER_MODULE_CPPM_COUNTER_REGISTER TRAINER_TIMER->CCR2
|
||||
#define TRAINER_MODULE_CPPM_TIMER_IRQn TRAINER_TIMER_IRQn
|
||||
#define TRAINER_MODULE_CPPM_GPIO_AF GPIO_AF_TIM3
|
||||
// Trainer SBUS input on heartbeat pin
|
||||
#define TRAINER_MODULE_SBUS
|
||||
#define TRAINER_MODULE_SBUS_GPIO_AF GPIO_AF_USART6
|
||||
#define TRAINER_MODULE_SBUS_USART USART6
|
||||
#define TRAINER_MODULE_SBUS_GPIO INTMODULE_HEARTBEAT_GPIO
|
||||
|
@ -1906,6 +1904,11 @@
|
|||
#define TRAINER_MODULE_SBUS_GPIO_PinSource INTMODULE_HEARTBEAT_EXTI_PinSource
|
||||
#define TRAINER_MODULE_SBUS_DMA_STREAM DMA2_Stream1
|
||||
#define TRAINER_MODULE_SBUS_DMA_CHANNEL DMA_Channel_5
|
||||
#else
|
||||
#define TRAINER_MODULE_RCC_AHB1Periph 0
|
||||
#define TRAINER_MODULE_RCC_APB2Periph 0
|
||||
#define TRAINER_MODULE_RCC_APB1Periph 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// USB
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "opentx.h"
|
||||
|
||||
#if defined(INTERNAL_MODULE_CRSF) || defined(INTERNAL_MODULE_ELRS)
|
||||
#if defined(INTERNAL_MODULE_CRSF)
|
||||
uint8_t intTelemetryRxBuffer[TELEMETRY_RX_PACKET_SIZE];
|
||||
uint8_t intTelemetryRxBufferCount;
|
||||
#endif
|
||||
|
@ -81,24 +81,6 @@ const CrossfireSensor & getCrossfireSensor(uint8_t id, uint8_t subId)
|
|||
return crossfireSensors[UNKNOWN_INDEX];
|
||||
}
|
||||
|
||||
static uint8_t * getRxBuffer(uint8_t moduleIdx)
|
||||
{
|
||||
#if defined(INTERNAL_MODULE_CRSF) || defined(INTERNAL_MODULE_ELRS)
|
||||
if (moduleIdx == INTERNAL_MODULE)
|
||||
return intTelemetryRxBuffer;
|
||||
#endif
|
||||
return telemetryRxBuffer;
|
||||
}
|
||||
|
||||
static uint8_t &getRxBufferCount(uint8_t moduleIdx)
|
||||
{
|
||||
#if defined(INTERNAL_MODULE_CRSF) || defined(INTERNAL_MODULE_ELRS)
|
||||
if (moduleIdx == INTERNAL_MODULE)
|
||||
return intTelemetryRxBufferCount;
|
||||
#endif
|
||||
return telemetryRxBufferCount;
|
||||
}
|
||||
|
||||
void processCrossfireTelemetryValue(uint8_t index, int32_t value)
|
||||
{
|
||||
if (!TELEMETRY_STREAMING())
|
||||
|
@ -110,7 +92,7 @@ void processCrossfireTelemetryValue(uint8_t index, int32_t value)
|
|||
|
||||
bool checkCrossfireTelemetryFrameCRC(uint8_t module)
|
||||
{
|
||||
uint8_t * rxBuffer = getRxBuffer(module);
|
||||
uint8_t * rxBuffer = getTelemetryRxBuffer(module);
|
||||
uint8_t len = rxBuffer[1];
|
||||
uint8_t crc = crc8(&rxBuffer[2], len-1);
|
||||
return (crc == rxBuffer[len+1]);
|
||||
|
@ -119,7 +101,7 @@ bool checkCrossfireTelemetryFrameCRC(uint8_t module)
|
|||
template<int N>
|
||||
bool getCrossfireTelemetryValue(uint8_t index, int32_t & value, uint8_t module)
|
||||
{
|
||||
uint8_t * rxBuffer = getRxBuffer(module);
|
||||
uint8_t * rxBuffer = getTelemetryRxBuffer(module);
|
||||
bool result = false;
|
||||
uint8_t * byte = &rxBuffer[index];
|
||||
value = (*byte & 0x80) ? -1 : 0;
|
||||
|
@ -135,8 +117,8 @@ bool getCrossfireTelemetryValue(uint8_t index, int32_t & value, uint8_t module)
|
|||
|
||||
void processCrossfireTelemetryFrame(uint8_t module)
|
||||
{
|
||||
uint8_t * rxBuffer = getRxBuffer(module);
|
||||
uint8_t &rxBufferCount = getRxBufferCount(module);
|
||||
uint8_t * rxBuffer = getTelemetryRxBuffer(module);
|
||||
uint8_t &rxBufferCount = getTelemetryRxBufferCount(module);
|
||||
|
||||
if (!checkCrossfireTelemetryFrameCRC(module)) {
|
||||
TRACE("[XF] CRC error");
|
||||
|
@ -184,7 +166,7 @@ void processCrossfireTelemetryFrame(uint8_t module)
|
|||
telemetryStreaming = TELEMETRY_TIMEOUT10ms;
|
||||
telemetryData.telemetryValid |= 1 << module;
|
||||
}
|
||||
else{
|
||||
else {
|
||||
if (telemetryData.telemetryValid & (1 << module)) {
|
||||
telemetryData.rssi.reset();
|
||||
telemetryStreaming = 0;
|
||||
|
@ -242,10 +224,9 @@ void processCrossfireTelemetryFrame(uint8_t module)
|
|||
}
|
||||
|
||||
case RADIO_ID:
|
||||
if (telemetryRxBuffer[3] == 0xEA // radio address
|
||||
&& telemetryRxBuffer[5] == 0x10 // timing correction frame
|
||||
) {
|
||||
|
||||
if (rxBuffer[3] == 0xEA // radio address
|
||||
&& rxBuffer[5] == 0x10 // timing correction frame
|
||||
) {
|
||||
uint32_t update_interval;
|
||||
int32_t offset;
|
||||
if (getCrossfireTelemetryValue<4>(6, (int32_t&)update_interval, module) && getCrossfireTelemetryValue<4>(10, offset, module)) {
|
||||
|
@ -254,7 +235,7 @@ void processCrossfireTelemetryFrame(uint8_t module)
|
|||
update_interval /= 10;
|
||||
offset /= 10;
|
||||
|
||||
TRACE("[XF] Rate: %d, Lag: %d", update_interval, offset);
|
||||
//TRACE("[XF] Rate: %d, Lag: %d", update_interval, offset);
|
||||
getModuleSyncStatus(module).update(update_interval, offset);
|
||||
}
|
||||
}
|
||||
|
@ -282,8 +263,8 @@ bool isCrossfireOutputBufferAvailable()
|
|||
|
||||
void processCrossfireTelemetryData(uint8_t data, uint8_t module)
|
||||
{
|
||||
uint8_t * rxBuffer = getRxBuffer(module);
|
||||
uint8_t &rxBufferCount = getRxBufferCount(module);
|
||||
uint8_t * rxBuffer = getTelemetryRxBuffer(module);
|
||||
uint8_t &rxBufferCount = getTelemetryRxBufferCount(module);
|
||||
|
||||
#if !defined(DEBUG) && defined(USB_SERIAL)
|
||||
if (getSelectedUsbMode() == USB_TELEMETRY_MIRROR_MODE) {
|
||||
|
@ -327,7 +308,7 @@ void processCrossfireTelemetryData(uint8_t data, uint8_t module)
|
|||
if (length + 2 == rxBufferCount) {
|
||||
#if defined(BLUETOOTH)
|
||||
if (g_eeGeneral.bluetoothMode == BLUETOOTH_TELEMETRY && bluetooth.state == BLUETOOTH_STATE_CONNECTED) {
|
||||
bluetooth.write(telemetryRxBuffer, telemetryRxBufferCount);
|
||||
bluetooth.write(rxBuffer, rxBufferCount);
|
||||
}
|
||||
#endif
|
||||
processCrossfireTelemetryFrame(module);
|
||||
|
|
|
@ -117,6 +117,10 @@ const uint8_t CROSSFIRE_PERIODS[] = {
|
|||
#define CROSSFIRE_BAUDRATE CROSSFIRE_BAUDRATES[g_eeGeneral.telemetryBaudrate]
|
||||
#define CROSSFIRE_PERIOD (CROSSFIRE_PERIODS[g_eeGeneral.telemetryBaudrate] * 1000)
|
||||
|
||||
#if defined(DEBUG)
|
||||
#define CROSSFIRE_TELEM_MIRROR_BAUDRATE DEBUG_BAUDRATE
|
||||
#else
|
||||
#define CROSSFIRE_TELEM_MIRROR_BAUDRATE 115200
|
||||
#endif
|
||||
|
||||
#endif // _CROSSFIRE_H_
|
||||
|
|
|
@ -373,7 +373,8 @@ uint8_t processHoTTWarnings(const uint8_t * packet) {
|
|||
default:
|
||||
warnings[HOTT_WARN_RX] = 53; // other rx events -> translate to general receiver warning
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (PAGE > 0 && PAGE <= 4) { // sending device is other than rx
|
||||
switch (DEVICE) {
|
||||
case HOTT_TELEM_ESC: // sending device is ESC
|
||||
|
|
|
@ -100,10 +100,6 @@ static uint16_t& getMultiTelemetryLastRxTS(uint8_t module)
|
|||
return multiTelemetryLastRxTS[module];
|
||||
}
|
||||
|
||||
// Use additional telemetry buffer
|
||||
uint8_t intTelemetryRxBuffer[TELEMETRY_RX_PACKET_SIZE];
|
||||
uint8_t intTelemetryRxBufferCount;
|
||||
|
||||
#else // !INTERNAL_MODULE_MULTI
|
||||
|
||||
static MultiModuleStatus multiModuleStatus;
|
||||
|
@ -162,10 +158,10 @@ static MultiBufferState guessProtocol(uint8_t module)
|
|||
return FrskyTelemetryFallback;
|
||||
}
|
||||
|
||||
static void processMultiScannerPacket(const uint8_t *data)
|
||||
static void processMultiScannerPacket(const uint8_t *data, const uint8_t moduleIdx)
|
||||
{
|
||||
uint8_t cur_channel = data[0];
|
||||
if (moduleState[g_moduleIdx].mode == MODULE_MODE_SPECTRUM_ANALYSER) {
|
||||
if (moduleState[moduleIdx].mode == MODULE_MODE_SPECTRUM_ANALYSER) {
|
||||
for (uint8_t channel = 0; channel <5; channel++) {
|
||||
uint8_t power = max<int>(0,(data[channel+1] - 34) >> 1); // remove everything below -120dB
|
||||
|
||||
|
@ -444,7 +440,7 @@ static void processMultiTelemetryPaket(const uint8_t * packet, uint8_t module)
|
|||
#endif
|
||||
case SpectrumScannerPacket:
|
||||
if (len == 6)
|
||||
processMultiScannerPacket(data);
|
||||
processMultiScannerPacket(data, module);
|
||||
else
|
||||
TRACE("[MP] Received spectrum scanner len %d != 6", len);
|
||||
break;
|
||||
|
@ -526,28 +522,10 @@ void MultiModuleStatus::getStatusString(char * statusText) const
|
|||
}
|
||||
}
|
||||
|
||||
static uint8_t * getRxBuffer(uint8_t moduleIdx)
|
||||
{
|
||||
#if defined(INTERNAL_MODULE_MULTI)
|
||||
if (moduleIdx == INTERNAL_MODULE)
|
||||
return intTelemetryRxBuffer;
|
||||
#endif
|
||||
return telemetryRxBuffer;
|
||||
}
|
||||
|
||||
static uint8_t &getRxBufferCount(uint8_t moduleIdx)
|
||||
{
|
||||
#if defined(INTERNAL_MODULE_MULTI)
|
||||
if (moduleIdx == INTERNAL_MODULE)
|
||||
return intTelemetryRxBufferCount;
|
||||
#endif
|
||||
return telemetryRxBufferCount;
|
||||
}
|
||||
|
||||
static void processMultiTelemetryByte(const uint8_t data, uint8_t module)
|
||||
{
|
||||
uint8_t * rxBuffer = getRxBuffer(module);
|
||||
uint8_t &rxBufferCount = getRxBufferCount(module);
|
||||
uint8_t * rxBuffer = getTelemetryRxBuffer(module);
|
||||
uint8_t &rxBufferCount = getTelemetryRxBufferCount(module);
|
||||
|
||||
if (rxBufferCount < TELEMETRY_RX_PACKET_SIZE) {
|
||||
rxBuffer[rxBufferCount++] = data;
|
||||
|
@ -577,8 +555,8 @@ static void processMultiTelemetryByte(const uint8_t data, uint8_t module)
|
|||
|
||||
void processMultiTelemetryData(uint8_t data, uint8_t module)
|
||||
{
|
||||
uint8_t * rxBuffer = getRxBuffer(module);
|
||||
uint8_t &rxBufferCount = getRxBufferCount(module);
|
||||
uint8_t * rxBuffer = getTelemetryRxBuffer(module);
|
||||
uint8_t &rxBufferCount = getTelemetryRxBufferCount(module);
|
||||
|
||||
uint16_t &lastRxTS = getMultiTelemetryLastRxTS(module);
|
||||
uint16_t nowMs = (uint16_t)RTOS_GET_MS();
|
||||
|
|
|
@ -37,6 +37,29 @@ uint8_t telemetryProtocol = 255;
|
|||
uint8_t serialInversion = 0;
|
||||
#endif
|
||||
|
||||
#if defined(INTERNAL_MODULE_SERIAL_TELEMETRY)
|
||||
uint8_t intTelemetryRxBuffer[TELEMETRY_RX_PACKET_SIZE];
|
||||
uint8_t intTelemetryRxBufferCount;
|
||||
#endif
|
||||
|
||||
uint8_t * getTelemetryRxBuffer(uint8_t moduleIdx)
|
||||
{
|
||||
#if defined(INTERNAL_MODULE_SERIAL_TELEMETRY)
|
||||
if (moduleIdx == INTERNAL_MODULE)
|
||||
return intTelemetryRxBuffer;
|
||||
#endif
|
||||
return telemetryRxBuffer;
|
||||
}
|
||||
|
||||
uint8_t &getTelemetryRxBufferCount(uint8_t moduleIdx)
|
||||
{
|
||||
#if defined(INTERNAL_MODULE_SERIAL_TELEMETRY)
|
||||
if (moduleIdx == INTERNAL_MODULE)
|
||||
return intTelemetryRxBufferCount;
|
||||
#endif
|
||||
return telemetryRxBufferCount;
|
||||
}
|
||||
|
||||
void processTelemetryData(uint8_t data)
|
||||
{
|
||||
#if defined(CROSSFIRE)
|
||||
|
@ -92,6 +115,75 @@ inline bool isBadAntennaDetected()
|
|||
return false;
|
||||
}
|
||||
|
||||
#if defined(INTERNAL_MODULE_PXX2)
|
||||
static void pollIntPXX2()
|
||||
{
|
||||
uint8_t frame[PXX2_FRAME_MAXLENGTH];
|
||||
|
||||
while (intmoduleFifo.getFrame(frame)) {
|
||||
processPXX2Frame(INTERNAL_MODULE, frame);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PXX2) && defined(EXTMODULE_USART)
|
||||
static void pollExtPXX2()
|
||||
{
|
||||
uint8_t frame[PXX2_FRAME_MAXLENGTH];
|
||||
|
||||
while (extmoduleFifo.getFrame(frame)) {
|
||||
processPXX2Frame(EXTERNAL_MODULE, frame);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(PCBSKY9X)
|
||||
static inline void pollIntTelemetry(void (*processData)(uint8_t,uint8_t))
|
||||
{
|
||||
uint8_t data;
|
||||
if (intmoduleFifo.pop(data)) {
|
||||
LOG_TELEMETRY_WRITE_START();
|
||||
do {
|
||||
processData(data, INTERNAL_MODULE);
|
||||
LOG_TELEMETRY_WRITE_BYTE(data);
|
||||
} while (intmoduleFifo.pop(data));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(INTERNAL_MODULE_MULTI)
|
||||
static void pollIntMulti()
|
||||
{
|
||||
pollIntTelemetry(processMultiTelemetryData);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(INTERNAL_MODULE_ELRS)
|
||||
static void pollIntELRS()
|
||||
{
|
||||
pollIntTelemetry(processCrossfireTelemetryData);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(PCBSKY9X)
|
||||
static void pollExtTelemetry()
|
||||
{
|
||||
uint8_t data;
|
||||
if (telemetryGetByte(&data)) {
|
||||
LOG_TELEMETRY_WRITE_START();
|
||||
do {
|
||||
processTelemetryData(data);
|
||||
LOG_TELEMETRY_WRITE_BYTE(data);
|
||||
} while (telemetryGetByte(&data));
|
||||
}
|
||||
#if defined(PXX2) && defined(EXTMODULE_USART)
|
||||
if (isModulePXX2(EXTERNAL_MODULE)) {
|
||||
pollExtPXX2();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void telemetryWakeup()
|
||||
{
|
||||
uint8_t requiredTelemetryProtocol = modelTelemetryProtocol();
|
||||
|
@ -109,32 +201,25 @@ void telemetryWakeup()
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(INTERNAL_MODULE_PXX2) || defined(EXTMODULE_USART)
|
||||
uint8_t frame[PXX2_FRAME_MAXLENGTH];
|
||||
|
||||
#if defined(INTERNAL_MODULE_PXX2)
|
||||
while (intmoduleFifo.getFrame(frame)) {
|
||||
processPXX2Frame(INTERNAL_MODULE, frame);
|
||||
// Poll internal modules
|
||||
#if defined(INTERNAL_MODULE_PXX2)
|
||||
if (isModuleISRM(INTERNAL_MODULE)) {
|
||||
pollIntPXX2();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(EXTMODULE_USART)
|
||||
while (isModulePXX2(EXTERNAL_MODULE) && extmoduleFifo.getFrame(frame)) {
|
||||
processPXX2Frame(EXTERNAL_MODULE, frame);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(INTERNAL_MODULE_MULTI)
|
||||
if (intmoduleFifo.pop(data)) {
|
||||
LOG_TELEMETRY_WRITE_START();
|
||||
do {
|
||||
processMultiTelemetryData(data, INTERNAL_MODULE);
|
||||
LOG_TELEMETRY_WRITE_BYTE(data);
|
||||
} while (intmoduleFifo.pop(data));
|
||||
if (isModuleMultimodule(INTERNAL_MODULE)) {
|
||||
pollIntMulti();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(INTERNAL_MODULE_ELRS)
|
||||
if (isModuleCrossfire(INTERNAL_MODULE)) {
|
||||
pollIntELRS();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(INTERNAL_MODULE_CRSF) && !defined(SIMU)
|
||||
if (IS_INTERNAL_MODULE_ENABLED()) {
|
||||
if (intCrsfTelemetryFifo.pop(data)) {
|
||||
|
@ -165,8 +250,11 @@ void telemetryWakeup()
|
|||
// Receive serial data here
|
||||
rxPdcUsart(processTelemetryData);
|
||||
}
|
||||
#else
|
||||
// Poll external / S.PORT telemetry
|
||||
// TODO: how to switch this OFF ???
|
||||
pollExtTelemetry();
|
||||
#endif
|
||||
|
||||
for (int i=0; i<MAX_TELEMETRY_SENSORS; i++) {
|
||||
const TelemetrySensor & sensor = g_model.telemetrySensors[i];
|
||||
if (sensor.type == TELEM_TYPE_CALCULATED) {
|
||||
|
@ -434,7 +522,7 @@ void ModuleSyncStatus::update(uint16_t newRefreshRate, int16_t newInputLag)
|
|||
currentLag = newInputLag;
|
||||
lastUpdate = get_tmr10ms();
|
||||
|
||||
TRACE("[SYNC] update rate = %dus; lag = %dus",refreshRate,currentLag);
|
||||
//TRACE("[SYNC] update rate = %dus; lag = %dus",refreshRate,currentLag);
|
||||
}
|
||||
|
||||
uint16_t ModuleSyncStatus::getAdjustedRefreshRate()
|
||||
|
@ -456,7 +544,7 @@ uint16_t ModuleSyncStatus::getAdjustedRefreshRate()
|
|||
}
|
||||
|
||||
currentLag -= newRefreshRate - refreshRate;
|
||||
TRACE("[SYNC] mod rate = %dus; lag = %dus",newRefreshRate,currentLag);
|
||||
//TRACE("[SYNC] mod rate = %dus; lag = %dus",newRefreshRate,currentLag);
|
||||
|
||||
return (uint16_t)newRefreshRate;
|
||||
}
|
||||
|
|
|
@ -74,6 +74,10 @@ extern uint8_t intTelemetryRxBufferCount;
|
|||
extern uint8_t telemetryRxBuffer[TELEMETRY_RX_PACKET_SIZE];
|
||||
extern uint8_t telemetryRxBufferCount;
|
||||
|
||||
//TODO: use module scoped buffers instead
|
||||
uint8_t* getTelemetryRxBuffer(uint8_t moduleIdx);
|
||||
uint8_t& getTelemetryRxBufferCount(uint8_t moduleIdx);
|
||||
|
||||
#define TELEMETRY_AVERAGE_COUNT 3
|
||||
|
||||
enum {
|
||||
|
|
|
@ -135,7 +135,8 @@ I18N_PLAY_FUNCTION(es, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
|||
if (number >= 2000) {
|
||||
PLAY_NUMBER(number / 1000, 0, 0);
|
||||
PUSH_NUMBER_PROMPT(ES_PROMPT_MIL);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
PUSH_NUMBER_PROMPT(ES_PROMPT_MIL);
|
||||
}
|
||||
number %= 1000;
|
||||
|
|
|
@ -146,7 +146,7 @@ def main():
|
|||
elif board_name == "tpro":
|
||||
cmake_options["PCB"] = "X7"
|
||||
cmake_options["PCBREV"] = "TPRO"
|
||||
firmware_options = options_jumper_tlite
|
||||
firmware_options = options_jumper_tpro
|
||||
maxsize = 65536 * 8
|
||||
elif board_name == "t12":
|
||||
cmake_options["PCB"] = "X7"
|
||||
|
|
|
@ -220,6 +220,17 @@ options_jumper_tlite = {
|
|||
"afhds3": ("AFHDS3", "YES", "NO")
|
||||
}
|
||||
|
||||
options_jumper_tpro = {
|
||||
"noheli": ("HELI", "NO", "YES"),
|
||||
"ppmus": ("PPM_UNIT", "US", "PERCENT_PREC1"),
|
||||
"lua": ("LUA", "YES", "NO_MODEL_SCRIPTS"),
|
||||
"nogvars": ("GVARS", "NO", "YES"),
|
||||
"faimode": ("FAI", "YES", None),
|
||||
"faichoice": ("FAI", "CHOICE", None),
|
||||
"nooverridech": ("OVERRIDE_CHANNEL_FUNCTION", "NO", "YES"),
|
||||
"flexr9m": ("MODULE_PROTOCOL_FLEX", "YES", None),
|
||||
"internalelrs": ("INTERNAL_MODULE_ELRS", "YES", "NO"),
|
||||
}
|
||||
|
||||
options_jumper_t12 = {
|
||||
"noheli": ("HELI", "NO", "YES"),
|
||||
|
@ -282,7 +293,6 @@ options_radiomaster_zorro = {
|
|||
"faichoice": ("FAI", "CHOICE", None),
|
||||
"nooverridech": ("OVERRIDE_CHANNEL_FUNCTION", "NO", "YES"),
|
||||
"flexr9m": ("MODULE_PROTOCOL_FLEX", "YES", None),
|
||||
"afhds3": ("AFHDS3", "YES", "NO"),
|
||||
"internalelrs": ("INTERNAL_MODULE_ELRS", "YES", "NO"),
|
||||
}
|
||||
|
||||
|
|
|
@ -66,4 +66,16 @@ boards = {
|
|||
"PCB": "X7",
|
||||
"PCBREV": "TX12",
|
||||
},
|
||||
"TLITE": {
|
||||
"PCB": "X7",
|
||||
"PCBREV": "TLITE",
|
||||
},
|
||||
"TPRO": {
|
||||
"PCB": "X7",
|
||||
"PCBREV": "TPRO",
|
||||
},
|
||||
"ZORRO": {
|
||||
"PCB": "X7",
|
||||
"PCBREV": "ZORRO",
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue