Automatically detect FlySky digital hall sticks on X10-class radios without necessity of build-time CMake option FLYSKY_HALL_STICKS.
Added special UART4 init to sample if FlySky sticks are present or not. Added boolean globalData.flyskygimbals to save the detection result. Removed FLYSKY_HALL_STICKS and FLYSKY_HALL_STICKS_REVERSE CMake build options. Tested on two RM TX16S radios, one with FlySky digital hall sticks and second with stock analog sticks.
This commit is contained in:
@@ -398,14 +398,6 @@ if(FRSKY_STICKS)
|
||||
add_definitions(-DFRSKY_STICKS)
|
||||
endif()
|
||||
|
||||
if(FLYSKY_HALL_STICKS)
|
||||
add_definitions(-DFLYSKY_HALL_STICKS)
|
||||
endif()
|
||||
|
||||
if(FLYSKY_HALL_STICKS_REVERSE)
|
||||
add_definitions(-DFLYSKY_HALL_STICKS_REVERSE)
|
||||
endif()
|
||||
|
||||
if(IMU_LSM6DS33)
|
||||
add_definitions(-DIMU_LSM6DS33)
|
||||
endif()
|
||||
|
||||
+2
-1
@@ -31,7 +31,8 @@ PACK(struct GlobalData {
|
||||
uint8_t authenticationCount:2;
|
||||
uint8_t upgradeModulePopup:1;
|
||||
uint8_t internalModuleVersionChecked:1;
|
||||
uint8_t spare:2;
|
||||
uint8_t flyskygimbals:1;
|
||||
uint8_t spare:1;
|
||||
});
|
||||
|
||||
extern GlobalData globalData;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "imu_lsm6ds33.h"
|
||||
#endif
|
||||
|
||||
#if defined (FLYSKY_HALL_STICKS) || defined (FLYSKY_HALL_STICKS_REVERSE)
|
||||
#if defined(RADIO_FAMILY_T16) || defined(PCBNV14)
|
||||
#include "../../targets/horus/flyskyHallStick_driver.h"
|
||||
#endif
|
||||
|
||||
@@ -48,49 +48,55 @@ class RadioAnalogsDiagsWindow: public Window {
|
||||
|
||||
void paint(BitmapBuffer * dc) override
|
||||
{
|
||||
#if !defined(SIMU) && (defined (FLYSKY_HALL_STICKS) || defined (FLYSKY_HALL_STICKS_REVERSE))
|
||||
for (uint8_t i = 0; i < FLYSKY_HALL_CHANNEL_COUNT; i++) {
|
||||
#if !defined(SIMU) && (defined(RADIO_FAMILY_T16) || defined(PCBNV14))
|
||||
if (globalData.flyskygimbals)
|
||||
{
|
||||
for (uint8_t i = 0; i < FLYSKY_HALL_CHANNEL_COUNT; i++) {
|
||||
#if LCD_W > LCD_H
|
||||
coord_t y = 1 + (i / 2) * FH;
|
||||
uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10;
|
||||
coord_t y = 1 + (i / 2) * FH;
|
||||
uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10;
|
||||
#else
|
||||
coord_t y = 1 + i * FH;
|
||||
uint8_t x = 10;
|
||||
coord_t y = 1 + i * FH;
|
||||
uint8_t x = 10;
|
||||
#endif
|
||||
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2);
|
||||
dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x + 3 * 15 - 1, y, hall_raw_values[i], LEFT | COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1);
|
||||
}
|
||||
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2);
|
||||
dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x + 3 * 15 - 1, y, hall_raw_values[i], LEFT | COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1);
|
||||
}
|
||||
|
||||
for (uint8_t i = FLYSKY_HALL_CHANNEL_COUNT; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) {
|
||||
for (uint8_t i = FLYSKY_HALL_CHANNEL_COUNT; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) {
|
||||
#if LCD_W > LCD_H
|
||||
coord_t y = 1 + (i / 2) * FH;
|
||||
uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10;
|
||||
coord_t y = 1 + (i / 2) * FH;
|
||||
uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10;
|
||||
#else
|
||||
coord_t y = 1 + i * FH;
|
||||
uint8_t x = 10;
|
||||
coord_t y = 1 + i * FH;
|
||||
uint8_t x = 10;
|
||||
#endif
|
||||
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2);
|
||||
dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x + 3 * 15 -1, y, anaIn(i), LEFT | COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2);
|
||||
dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x + 3 * 15 -1, y, anaIn(i), LEFT | COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1);
|
||||
}
|
||||
}
|
||||
#else
|
||||
for (uint8_t i = 0; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) {
|
||||
#endif
|
||||
|
||||
if (!globalData.flyskygimbals) // Also Simulator
|
||||
{
|
||||
for (uint8_t i = 0; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) {
|
||||
#if LCD_W > LCD_H
|
||||
coord_t y = 1 + (i / 2) * FH;
|
||||
uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10;
|
||||
coord_t y = 1 + (i / 2) * FH;
|
||||
uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10;
|
||||
#else
|
||||
coord_t y = 1 + i * FH;
|
||||
uint8_t x = 10;
|
||||
#endif
|
||||
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2);
|
||||
dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x + 3 * 15 -1, y, anaIn(i), LEFT | COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1);
|
||||
}
|
||||
coord_t y = 1 + i * FH;
|
||||
uint8_t x = 10;
|
||||
#endif
|
||||
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2);
|
||||
dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x + 3 * 15 -1, y, anaIn(i), LEFT | COLOR_THEME_PRIMARY1);
|
||||
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1);
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(SIMU) && defined(IMU_LSM6DS33)
|
||||
coord_t yimu = MENU_CONTENT_TOP + 3 * FH;
|
||||
|
||||
@@ -125,10 +125,24 @@ bool adcRead()
|
||||
{
|
||||
uint16_t temp[NUM_ANALOGS] = { 0 };
|
||||
|
||||
uint8_t first_analog_adc;
|
||||
#if defined(RADIO_FAMILY_T16) || defined(PCBNV14)
|
||||
if (globalData.flyskygimbals)
|
||||
{
|
||||
first_analog_adc = FIRST_ANALOG_ADC_FS;
|
||||
} else
|
||||
{
|
||||
first_analog_adc = FIRST_ANALOG_ADC;
|
||||
}
|
||||
#else
|
||||
first_analog_adc = FIRST_ANALOG_ADC;
|
||||
#endif
|
||||
|
||||
|
||||
for (int i=0; i<4; i++) {
|
||||
if (!adcSingleRead())
|
||||
return false;
|
||||
for (uint8_t x=FIRST_ANALOG_ADC; x<NUM_ANALOGS; x++) {
|
||||
for (uint8_t x=first_analog_adc; x<NUM_ANALOGS; x++) {
|
||||
uint16_t val = adcValues[x];
|
||||
#if defined(JITTER_MEASURE)
|
||||
if (JITTER_MEASURE_ACTIVE()) {
|
||||
@@ -139,7 +153,7 @@ bool adcRead()
|
||||
}
|
||||
}
|
||||
|
||||
for (uint8_t x=FIRST_ANALOG_ADC; x<NUM_ANALOGS; x++) {
|
||||
for (uint8_t x=first_analog_adc; x<NUM_ANALOGS; x++) {
|
||||
adcValues[x] = temp[x] >> 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,11 +31,10 @@
|
||||
#define FIRST_ANALOG_ADC 0
|
||||
#define NUM_ANALOGS_ADC 11
|
||||
#define NUM_ANALOGS_ADC_EXT (NUM_ANALOGS - NUM_ANALOGS_ADC)
|
||||
#elif defined(PCBNV14) && defined(FLYSKY_HALL_STICKS)
|
||||
#define FIRST_ANALOG_ADC 4
|
||||
#define NUM_ANALOGS_ADC 10
|
||||
#define NUM_ANALOGS_ADC_EXT 2
|
||||
#else
|
||||
#define FIRST_ANALOG_ADC_FS 4
|
||||
#define NUM_ANALOGS_ADC_FS 10
|
||||
#define NUM_ANALOGS_ADC_EXT 2
|
||||
#define FIRST_ANALOG_ADC 0
|
||||
#define NUM_ANALOGS_ADC NUM_ANALOGS
|
||||
#endif
|
||||
|
||||
+12
-7
@@ -1067,15 +1067,20 @@ void getADC()
|
||||
|
||||
for (uint8_t x=0; x<NUM_ANALOGS; x++) {
|
||||
uint32_t v;
|
||||
#if defined(FLYSKY_HALL_STICKS)
|
||||
if (x < 4) {
|
||||
v = get_flysky_hall_adc_value(x) >> (1 - ANALOG_SCALE);
|
||||
} else {
|
||||
v = getAnalogValue(x) >> (1 - ANALOG_SCALE);
|
||||
#if defined(RADIO_FAMILY_T16) || defined(PCBNV14)
|
||||
if (globalData.flyskygimbals)
|
||||
{
|
||||
if (x < 4) {
|
||||
v = get_flysky_hall_adc_value(x) >> (1 - ANALOG_SCALE);
|
||||
} else {
|
||||
v = getAnalogValue(x) >> (1 - ANALOG_SCALE);
|
||||
}
|
||||
}
|
||||
#else
|
||||
v = getAnalogValue(x) >> (1 - ANALOG_SCALE);
|
||||
else
|
||||
#endif
|
||||
{
|
||||
v = getAnalogValue(x) >> (1 - ANALOG_SCALE);
|
||||
}
|
||||
|
||||
// Jitter filter:
|
||||
// * pass trough any big change directly
|
||||
|
||||
@@ -98,9 +98,6 @@ static const char * const options[] = {
|
||||
#if defined(HARDWARE_EXTERNAL_ACCESS_MOD)
|
||||
"externalaccessmod",
|
||||
#endif
|
||||
#if defined(FLYSKY_HALL_STICKS)
|
||||
"flyskyhallsticks",
|
||||
#endif
|
||||
#if defined(IMU_LSM6DS33)
|
||||
"lsm6ds33",
|
||||
#endif
|
||||
|
||||
@@ -35,7 +35,14 @@ static void adc_init_pins()
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||
|
||||
#if defined(ADC_GPIOA_PINS)
|
||||
GPIO_InitStructure.GPIO_Pin = ADC_GPIOA_PINS;
|
||||
#if defined(RADIO_FAMILY_T16) || defined(PCBNV14)
|
||||
if (globalData.flyskygimbals)
|
||||
{
|
||||
GPIO_InitStructure.GPIO_Pin = ADC_GPIOA_PINS_FS;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
GPIO_InitStructure.GPIO_Pin = ADC_GPIOA_PINS;
|
||||
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
||||
#endif
|
||||
|
||||
@@ -134,12 +141,26 @@ static const stm32_hal_adc_channel* ADC_MAIN_get_channels()
|
||||
if (STICKS_PWM_ENABLED())
|
||||
return ADC_MAIN_channels + 4;
|
||||
#endif
|
||||
return ADC_MAIN_channels + FIRST_ANALOG_ADC;
|
||||
#if defined(RADIO_FAMILY_T16) || defined(PCBNV14)
|
||||
if (globalData.flyskygimbals)
|
||||
{
|
||||
return ADC_MAIN_channels + FIRST_ANALOG_ADC_FS;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
return ADC_MAIN_channels + FIRST_ANALOG_ADC;
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t ADC_MAIN_get_nconv()
|
||||
{
|
||||
return NUM_ANALOGS_ADC; // based on STICKS_PWM_ENABLED()
|
||||
#if defined(RADIO_FAMILY_T16) || defined(PCBNV14)
|
||||
if (globalData.flyskygimbals)
|
||||
return NUM_ANALOGS_ADC_FS;
|
||||
else
|
||||
#endif
|
||||
return NUM_ANALOGS_ADC; // based on STICKS_PWM_ENABLED()
|
||||
}
|
||||
|
||||
#if defined(ADC_EXT)
|
||||
@@ -181,13 +202,29 @@ static const stm32_hal_adc_channel* ADC_EXT_get_channels()
|
||||
|
||||
static uint16_t* ADC_MAIN_get_dma_buffer()
|
||||
{
|
||||
return &adcValues[FIRST_ANALOG_ADC];
|
||||
#if defined(RADIO_FAMILY_T16) || defined(PCBNV14)
|
||||
if (globalData.flyskygimbals)
|
||||
{
|
||||
return &adcValues[FIRST_ANALOG_ADC_FS];
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
return &adcValues[FIRST_ANALOG_ADC];
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(ADC_EXT) && defined(ADC_EXT_DMA_Stream)
|
||||
static uint16_t* ADC_EXT_get_dma_buffer()
|
||||
{
|
||||
return adcValues + NUM_ANALOGS_ADC + FIRST_ANALOG_ADC;
|
||||
if (globalData.flyskygimbals)
|
||||
{
|
||||
return adcValues + NUM_ANALOGS_ADC_FS + FIRST_ANALOG_ADC_FS;
|
||||
}
|
||||
else
|
||||
{
|
||||
return adcValues + NUM_ANALOGS_ADC + FIRST_ANALOG_ADC;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -60,8 +60,11 @@ void interrupt1ms()
|
||||
++pre_scale;
|
||||
|
||||
// 1 ms loop
|
||||
#if defined(FLYSKY_HALL_STICKS) && !defined(SIMU)
|
||||
flysky_hall_stick_loop(); // TODO: need to put in 1ms timer loop for best performance
|
||||
#if not defined(SIMU) && (defined(RADIO_FAMILY_T16) || defined(PCBNV14))
|
||||
if (globalData.flyskygimbals)
|
||||
{
|
||||
flysky_hall_stick_loop();
|
||||
}
|
||||
#endif
|
||||
|
||||
// 5ms loop
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
option(DISK_CACHE "Enable SD card disk cache" ON)
|
||||
option(UNEXPECTED_SHUTDOWN "Enable the Unexpected Shutdown screen" ON)
|
||||
option(FLYSKY_HALL_STICKS "Enable FlySky Hall Sticks" OFF)
|
||||
option(IMU_LSM6DS33 "Enable I2C2 and LSM6DS33 IMU" OFF)
|
||||
option(PXX1 "PXX1 protocol support" ON)
|
||||
option(PXX2 "PXX2 protocol support" OFF)
|
||||
@@ -189,16 +188,8 @@ if(HARDWARE_EXTERNAL_ACCESS_MOD)
|
||||
add_definitions(-DHARDWARE_EXTERNAL_ACCESS_MOD)
|
||||
endif()
|
||||
|
||||
if(FLYSKY_HALL_STICKS)
|
||||
add_definitions(-DFLYSKY_HALL_STICKS)
|
||||
add_definitions(-DFLYSKY_HALL_STICKS_REVERSE)
|
||||
if(PCB STREQUAL X10)
|
||||
set(FLYSKY_HALL_STICKS_DRIVER flyskyHallStick_driver.cpp)
|
||||
|
||||
# option(FLYSKY_HALL_STICKS_EXT3_EXT4
|
||||
# "Additional EXT3 & EXT4 inputs for FlySky Hall Sticks" OFF)
|
||||
# if(FLYSKY_HALL_STICKS_EXT3_EXT4)
|
||||
# add_definitions(-DFLYSKY_HALL_STICKS_EXT3_EXT4)
|
||||
# endif()
|
||||
endif()
|
||||
|
||||
if(IMU_LSM6DS33)
|
||||
|
||||
@@ -40,7 +40,9 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void flysky_hall_stick_init( void );
|
||||
extern void flysky_hall_stick_check_init(void);
|
||||
extern void flysky_hall_stick_init(void);
|
||||
extern void flysky_hall_stick_loop( void );
|
||||
|
||||
HardwareOptions hardwareOptions;
|
||||
bool boardBacklightOn = false;
|
||||
@@ -122,8 +124,8 @@ void boardInit()
|
||||
AUDIO_RCC_AHB1Periph |
|
||||
KEYS_RCC_AHB1Periph |
|
||||
ADC_RCC_AHB1Periph |
|
||||
#if defined(FLYSKY_HALL_STICKS)
|
||||
FLYSKY_HALL_RCC_AHB1Periph |
|
||||
#if defined(RADIO_FAMILY_T16)
|
||||
FLYSKY_HALL_RCC_AHB1Periph |
|
||||
#endif
|
||||
#if defined(IMU_LSM6DS33)
|
||||
I2C_B2_RCC_AHB1Periph |
|
||||
@@ -150,8 +152,8 @@ void boardInit()
|
||||
ADC_RCC_APB1Periph |
|
||||
TIMER_2MHz_RCC_APB1Periph |
|
||||
AUDIO_RCC_APB1Periph |
|
||||
#if defined(FLYSKY_HALL_STICKS)
|
||||
FLYSKY_HALL_RCC_APB1Periph |
|
||||
#if defined(RADIO_FAMILY_T16)
|
||||
FLYSKY_HALL_RCC_APB1Periph |
|
||||
#endif
|
||||
#if defined(IMU_LSM6DS33)
|
||||
I2C_B2_RCC_APB1Periph |
|
||||
@@ -217,16 +219,34 @@ void boardInit()
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!adcInit(&ADC_DRIVER))
|
||||
TRACE("adcInit failed");
|
||||
|
||||
lcdInit();
|
||||
backlightInit();
|
||||
|
||||
#if defined(FLYSKY_HALL_STICKS)
|
||||
flysky_hall_stick_init();
|
||||
globalData.flyskygimbals = false;
|
||||
#if defined(RADIO_FAMILY_T16) || defined(PCBNV14)
|
||||
flysky_hall_stick_check_init();
|
||||
|
||||
// Wait 70ms for FlySky gimbals to respond. According to LA trace, minimally 23ms is required
|
||||
for (uint8_t ui8 = 0; ui8 < 70; ui8++)
|
||||
{
|
||||
flysky_hall_stick_loop();
|
||||
delay_ms(1);
|
||||
if (globalData.flyskygimbals)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (globalData.flyskygimbals)
|
||||
{
|
||||
flysky_hall_stick_init();
|
||||
}
|
||||
|
||||
if (!adcInit(&ADC_DRIVER))
|
||||
TRACE("adcInit failed");
|
||||
|
||||
#if defined(IMU_LSM6DS33)
|
||||
imu_lsm6ds33_init();
|
||||
#endif
|
||||
|
||||
@@ -366,7 +366,7 @@ void watchdogInit(unsigned int duration);
|
||||
|
||||
#if defined(PCBX10)
|
||||
#define NUM_SLIDERS 2
|
||||
#if defined(RADIO_TX16S)
|
||||
#if defined(RADIO_TX16S) || defined(RADIO_T18) || defined(RADIO_T16)
|
||||
#define NUM_PWMSTICKS 0
|
||||
#else
|
||||
#define NUM_PWMSTICKS 4
|
||||
@@ -435,10 +435,8 @@ enum Analogs {
|
||||
#if !defined(PCBX12S) // ext are used by mouse on X12S
|
||||
#define HARDWARE_EXT1
|
||||
#define HARDWARE_EXT2
|
||||
#if defined(FLYSKY_HALL_STICKS)
|
||||
#define HARDWARE_EXT3
|
||||
#define HARDWARE_EXT4
|
||||
#endif
|
||||
#define HARDWARE_EXT3
|
||||
#define HARDWARE_EXT4
|
||||
#endif
|
||||
|
||||
enum CalibratedAnalogs {
|
||||
|
||||
@@ -67,7 +67,7 @@ const unsigned short CRC16Table[256]= {
|
||||
0x6e17,0x7e36,0x4e55,0x5e74,0x2e93,0x3eb2,0x0ed1,0x1ef0
|
||||
};
|
||||
|
||||
const uint8_t sticks_mapping[4] = { 0 /*STICK1*/, 1/*STICK2*/, 2/*STICK3*/, 3 /*STICK4*/};
|
||||
//const uint8_t sticks_mapping[4] = { 0 /*STICK1*/, 1/*STICK2*/, 2/*STICK3*/, 3 /*STICK4*/};
|
||||
|
||||
unsigned short calc_crc16(void *pBuffer,unsigned char BufferSize)
|
||||
{
|
||||
@@ -89,18 +89,7 @@ uint16_t get_flysky_hall_adc_value(uint8_t ch)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(FLYSKY_HALL_STICKS_REVERSE)
|
||||
ch = sticks_mapping[ch];
|
||||
|
||||
return 2*FLYSKY_OFFSET_VALUE - hall_adc_values[ch];
|
||||
#else
|
||||
if (ch < 2)
|
||||
{
|
||||
return 2*FLYSKY_OFFSET_VALUE - hall_adc_values[ch];
|
||||
}
|
||||
|
||||
return hall_adc_values[ch];
|
||||
#endif
|
||||
}
|
||||
|
||||
void HallSendBuffer(uint8_t * buffer, uint32_t count)
|
||||
@@ -169,8 +158,69 @@ void reset_hall_stick( void )
|
||||
HallSendBuffer( HallCmd, 6);
|
||||
}
|
||||
|
||||
void flysky_hall_stick_check_init()
|
||||
{
|
||||
NVIC_InitTypeDef NVIC_InitStructure;
|
||||
NVIC_InitStructure.NVIC_IRQChannel = FLYSKY_HALL_SERIAL_RX_DMA_Stream_IRQn;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
|
||||
USART_InitTypeDef USART_InitStructure;
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
|
||||
GPIO_PinAFConfig(FLYSKY_HALL_SERIAL_GPIO, FLYSKY_HALL_SERIAL_RX_GPIO_PinSource, FLYSKY_HALL_SERIAL_GPIO_AF);
|
||||
|
||||
GPIO_InitStructure.GPIO_Pin = FLYSKY_HALL_SERIAL_RX_GPIO_PIN;
|
||||
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_Init(FLYSKY_HALL_SERIAL_GPIO, &GPIO_InitStructure);
|
||||
|
||||
USART_InitStructure.USART_BaudRate = FLYSKY_HALL_BAUDRATE;
|
||||
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
|
||||
USART_InitStructure.USART_StopBits = USART_StopBits_1;
|
||||
USART_InitStructure.USART_Parity = USART_Parity_No;
|
||||
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
|
||||
USART_InitStructure.USART_Mode = USART_Mode_Rx;
|
||||
USART_Init(FLYSKY_HALL_SERIAL_USART, &USART_InitStructure);
|
||||
|
||||
DMA_Cmd(FLYSKY_HALL_DMA_Stream_RX, DISABLE);
|
||||
USART_DMACmd(FLYSKY_HALL_SERIAL_USART, USART_DMAReq_Rx, DISABLE);
|
||||
DMA_DeInit(FLYSKY_HALL_DMA_Stream_RX);
|
||||
|
||||
DMA_InitTypeDef DMA_InitStructure;
|
||||
hallDMAFifo.clear();
|
||||
|
||||
USART_ITConfig(FLYSKY_HALL_SERIAL_USART, USART_IT_RXNE, DISABLE);
|
||||
|
||||
DMA_InitStructure.DMA_Channel = FLYSKY_HALL_DMA_Channel;
|
||||
DMA_InitStructure.DMA_PeripheralBaseAddr = CONVERT_PTR_UINT(&FLYSKY_HALL_SERIAL_USART->DR);
|
||||
DMA_InitStructure.DMA_Memory0BaseAddr = CONVERT_PTR_UINT(hallDMAFifo.buffer());
|
||||
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralToMemory;
|
||||
DMA_InitStructure.DMA_BufferSize = hallDMAFifo.size();
|
||||
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
|
||||
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
|
||||
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte;
|
||||
DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_Byte;
|
||||
DMA_InitStructure.DMA_Mode = DMA_Mode_Circular;
|
||||
DMA_InitStructure.DMA_Priority = DMA_Priority_Low;
|
||||
DMA_InitStructure.DMA_FIFOMode = DMA_FIFOMode_Disable;
|
||||
DMA_InitStructure.DMA_FIFOThreshold = DMA_FIFOThreshold_Full;
|
||||
DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_Single;
|
||||
DMA_InitStructure.DMA_PeripheralBurst = DMA_PeripheralBurst_Single;
|
||||
DMA_Init(FLYSKY_HALL_DMA_Stream_RX, &DMA_InitStructure);
|
||||
USART_DMACmd(FLYSKY_HALL_SERIAL_USART, USART_DMAReq_Rx, ENABLE);
|
||||
USART_Cmd(FLYSKY_HALL_SERIAL_USART, ENABLE);
|
||||
DMA_Cmd(FLYSKY_HALL_DMA_Stream_RX, ENABLE);
|
||||
}
|
||||
|
||||
void flysky_hall_stick_init()
|
||||
{
|
||||
USART_DeInit(FLYSKY_HALL_SERIAL_USART);
|
||||
|
||||
NVIC_InitTypeDef NVIC_InitStructure;
|
||||
NVIC_InitStructure.NVIC_IRQChannel = FLYSKY_HALL_SERIAL_RX_DMA_Stream_IRQn;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
|
||||
@@ -333,6 +383,7 @@ void flysky_hall_stick_loop(void)
|
||||
}
|
||||
break;
|
||||
}
|
||||
globalData.flyskygimbals = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,16 +283,10 @@
|
||||
#define ADC_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOF | RCC_AHB1Periph_DMA2)
|
||||
#define ADC_RCC_APB1Periph (RCC_APB1Periph_TIM5)
|
||||
#define ADC_RCC_APB2Periph (RCC_APB2Periph_ADC1 | RCC_APB2Periph_ADC3)
|
||||
// #if !defined(FLYSKY_HALL_STICKS)
|
||||
// this does not seem to be used anywhere...
|
||||
#define ADC_GPIO_PIN_STICK_LH GPIO_Pin_0 // PA.00
|
||||
#define ADC_GPIO_PIN_STICK_LV GPIO_Pin_1 // PA.01
|
||||
#define ADC_GPIO_PIN_STICK_RH GPIO_Pin_2 // PA.02
|
||||
#define ADC_GPIO_PIN_STICK_RV GPIO_Pin_3 // PA.03
|
||||
// #elif defined(FLYSKY_HALL_STICKS_EXT3_EXT4)
|
||||
// #define ADC_GPIO_PIN_EXT3 GPIO_Pin_2 // PA.02
|
||||
// #define ADC_GPIO_PIN_EXT4 GPIO_Pin_3 // PA.03
|
||||
// #endif
|
||||
#define ADC_GPIO_PIN_STICK_LH GPIO_Pin_0 // PA.00
|
||||
#define ADC_GPIO_PIN_STICK_LV GPIO_Pin_1 // PA.01
|
||||
#define ADC_GPIO_PIN_STICK_RH GPIO_Pin_2 // PA.02
|
||||
#define ADC_GPIO_PIN_STICK_RV GPIO_Pin_3 // PA.03
|
||||
#define ADC_GPIO_PIN_POT1 GPIO_Pin_0 // PC.00
|
||||
#define ADC_GPIO_PIN_POT2 GPIO_Pin_1 // PC.01
|
||||
#define ADC_GPIO_PIN_POT3 GPIO_Pin_2 // PC.02
|
||||
@@ -309,13 +303,8 @@
|
||||
#define PWM_IRQn TIM5_IRQn
|
||||
#define PWM_GPIOA_PINS (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3)
|
||||
#endif
|
||||
#if defined(FLYSKY_HALL_STICKS)
|
||||
#if defined (RADIO_TX16S)
|
||||
#define ADC_GPIOA_PINS (GPIO_Pin_2 | GPIO_Pin_3)
|
||||
#endif
|
||||
#else
|
||||
#define ADC_GPIOA_PINS (STICKS_PWM_ENABLED() ? 0 : (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3))
|
||||
#endif
|
||||
#define ADC_GPIOA_PINS_FS (GPIO_Pin_2 | GPIO_Pin_3)
|
||||
#define ADC_GPIOA_PINS (STICKS_PWM_ENABLED() ? 0 : (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3))
|
||||
#define ADC_GPIOC_PINS (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3)
|
||||
#define ADC_GPIOF_PINS (GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9)
|
||||
#define ADC_CHANNEL_STICK_LH ADC_Channel_0 // ADC3_IN0
|
||||
@@ -784,10 +773,7 @@
|
||||
#define HAPTIC_TIMER_OUTPUT_ENABLE TIM_CCER_CC2E
|
||||
#define HAPTIC_TIMER_MODE TIM_CCMR1_OC2M_1 | TIM_CCMR1_OC2M_2
|
||||
#define HAPTIC_TIMER_COMPARE_VALUE HAPTIC_GPIO_TIMER->CCR2
|
||||
#endif
|
||||
|
||||
// Flysky Hall Stick
|
||||
#if defined(FLYSKY_HALL_STICKS)
|
||||
// FlySky Hall Sticks
|
||||
#define FLYSKY_HALL_SERIAL_USART UART4
|
||||
#define FLYSKY_HALL_SERIAL_GPIO GPIOA
|
||||
#define FLYSKY_HALL_DMA_Channel DMA_Channel_4
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
option(DISK_CACHE "Enable SD card disk cache" ON)
|
||||
option(UNEXPECTED_SHUTDOWN "Enable the Unexpected Shutdown screen" ON)
|
||||
option(FLYSKY_HALL_STICKS "sticks for FlySky hall sticks" ON)
|
||||
option(FLYSKY_HALL_STICKS_REVERSE "Reverse sticks for FlySky hall sticks" OFF)
|
||||
option(MULTIMODULE "DIY Multiprotocol TX Module (https://github.com/pascallanger/DIY-Multiprotocol-TX-Module)" ON)
|
||||
option(AFHDS2 "Support for AFHDS2" ON)
|
||||
option(PXX1 "PXX1 protocol support" ON)
|
||||
@@ -86,8 +84,6 @@ add_definitions(-DEEPROM_VARIANT=0 -DAUDIO -DVOICE -DRTCLOCK)
|
||||
add_definitions(-DGPS_USART_BAUDRATE=${INTERNAL_GPS_BAUDRATE})
|
||||
add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
|
||||
add_definitions(-DCROSSFIRE_NATIVE)
|
||||
add_definitions(-DFLYSKY_HALL_STICKS_REVERSE)
|
||||
add_definitions(-DFLYSKY_HALL_STICKS)
|
||||
add_definitions(-DAFHDS2)
|
||||
add_definitions(-DHARDWARE_EXTERNAL_MODULE)
|
||||
#add_definitions(-DAUX_SERIAL)
|
||||
|
||||
@@ -133,9 +133,7 @@ void boardInit()
|
||||
pwrInit();
|
||||
extModuleInit();
|
||||
battery_charge_init();
|
||||
#if defined(FLYSKY_HALL_STICKS)
|
||||
flysky_hall_stick_init();
|
||||
#endif
|
||||
init2MhzTimer();
|
||||
init1msTimer();
|
||||
TouchInit();
|
||||
|
||||
@@ -119,11 +119,12 @@
|
||||
#define ADC_GPIO_PIN_BATT GPIO_Pin_5 // PC.05
|
||||
|
||||
// FLYSKY_HALL_STICKS
|
||||
#define ADC_GPIOA_PINS (GPIO_Pin_6 | GPIO_Pin_7)
|
||||
#define ADC_GPIOB_PINS (GPIO_Pin_0 | GPIO_Pin_1)
|
||||
#define ADC_GPIOA_PINS_FS (GPIO_Pin_6 | GPIO_Pin_7)
|
||||
#define ADC_GPIOA_PINS ADC_GPIOA_PINS_FS
|
||||
#define ADC_GPIOB_PINS (GPIO_Pin_0 | GPIO_Pin_1)
|
||||
#define ADC_GPIOC_PINS \
|
||||
(GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_4 | GPIO_Pin_5)
|
||||
#define ADC_GPIOF_PINS (GPIO_Pin_8 | GPIO_Pin_10)
|
||||
#define ADC_GPIOF_PINS (GPIO_Pin_8 | GPIO_Pin_10)
|
||||
|
||||
#define ADC_CHANNEL_STICK_LH 0
|
||||
#define ADC_CHANNEL_STICK_LV 0
|
||||
@@ -352,30 +353,28 @@
|
||||
#define HAPTIC_TIMER_COMPARE_VALUE HAPTIC_GPIO_TIMER->CCR1
|
||||
|
||||
// Flysky Hall Stick
|
||||
#if defined(FLYSKY_HALL_STICKS)
|
||||
#define FLYSKY_HALL_SERIAL_USART UART4
|
||||
#define FLYSKY_HALL_SERIAL_GPIO GPIOA
|
||||
#define FLYSKY_HALL_DMA_Channel DMA_Channel_4
|
||||
#define FLYSKY_HALL_SERIAL_TX_GPIO_PIN GPIO_Pin_0 // PA.00
|
||||
#define FLYSKY_HALL_SERIAL_RX_GPIO_PIN GPIO_Pin_1 // PA.01
|
||||
#define FLYSKY_HALL_SERIAL_TX_GPIO_PinSource GPIO_PinSource0
|
||||
#define FLYSKY_HALL_SERIAL_RX_GPIO_PinSource GPIO_PinSource1
|
||||
#define FLYSKY_HALL_SERIAL_GPIO_AF GPIO_AF_UART4
|
||||
#define FLYSKY_HALL_SERIAL_USART UART4
|
||||
#define FLYSKY_HALL_SERIAL_GPIO GPIOA
|
||||
#define FLYSKY_HALL_DMA_Channel DMA_Channel_4
|
||||
#define FLYSKY_HALL_SERIAL_TX_GPIO_PIN GPIO_Pin_0 // PA.00
|
||||
#define FLYSKY_HALL_SERIAL_RX_GPIO_PIN GPIO_Pin_1 // PA.01
|
||||
#define FLYSKY_HALL_SERIAL_TX_GPIO_PinSource GPIO_PinSource0
|
||||
#define FLYSKY_HALL_SERIAL_RX_GPIO_PinSource GPIO_PinSource1
|
||||
#define FLYSKY_HALL_SERIAL_GPIO_AF GPIO_AF_UART4
|
||||
|
||||
#define FLYSKY_HALL_RCC_AHB1Periph RCC_AHB1Periph_DMA1
|
||||
#define FLYSKY_HALL_RCC_APB1Periph RCC_APB1Periph_UART4
|
||||
#define FLYSKY_HALL_RCC_AHB1Periph RCC_AHB1Periph_DMA1
|
||||
#define FLYSKY_HALL_RCC_APB1Periph RCC_APB1Periph_UART4
|
||||
|
||||
#define FLYSKY_HALL_SERIAL_USART_IRQHandler UART4_IRQHandler
|
||||
#define FLYSKY_HALL_SERIAL_USART_IRQn UART4_IRQn
|
||||
#define FLYSKY_HALL_SERIAL_RX_DMA_Stream_IRQn DMA1_Stream2_IRQn
|
||||
#define FLYSKY_HALL_SERIAL_TX_DMA_Stream_IRQn DMA1_Stream4_IRQn
|
||||
#define FLYSKY_HALL_DMA_Stream_RX DMA1_Stream2
|
||||
#define FLYSKY_HALL_DMA_Stream_TX DMA1_Stream4
|
||||
#define FLYSKY_HALL_DMA_TX_FLAG_TC DMA_IT_TCIF4
|
||||
#define FLYSKY_HALL_SERIAL_USART_IRQHandler UART4_IRQHandler
|
||||
#define FLYSKY_HALL_SERIAL_USART_IRQn UART4_IRQn
|
||||
#define FLYSKY_HALL_SERIAL_RX_DMA_Stream_IRQn DMA1_Stream2_IRQn
|
||||
#define FLYSKY_HALL_SERIAL_TX_DMA_Stream_IRQn DMA1_Stream4_IRQn
|
||||
#define FLYSKY_HALL_DMA_Stream_RX DMA1_Stream2
|
||||
#define FLYSKY_HALL_DMA_Stream_TX DMA1_Stream4
|
||||
#define FLYSKY_HALL_DMA_TX_FLAG_TC DMA_IT_TCIF4
|
||||
|
||||
#define FLYSKY_HALL_RX_DMA_Stream_IRQHandler DMA1_Stream2_IRQHandler
|
||||
#define FLYSKY_HALL_TX_DMA_Stream_IRQHandler DMA1_Stream4_IRQHandler
|
||||
#endif
|
||||
#define FLYSKY_HALL_RX_DMA_Stream_IRQHandler DMA1_Stream2_IRQHandler
|
||||
#define FLYSKY_HALL_TX_DMA_Stream_IRQHandler DMA1_Stream4_IRQHandler
|
||||
|
||||
// Internal Module
|
||||
#define HARDWARE_INTERNAL_MODULE
|
||||
|
||||
@@ -68,7 +68,7 @@ const unsigned short CRC16Table[256]= {
|
||||
0x6e17,0x7e36,0x4e55,0x5e74,0x2e93,0x3eb2,0x0ed1,0x1ef0
|
||||
};
|
||||
|
||||
const uint8_t sticks_mapping[4] = { 0 /*STICK1*/, 1/*STICK2*/, 2/*STICK3*/, 3 /*STICK4*/};
|
||||
//const uint8_t sticks_mapping[4] = { 0 /*STICK1*/, 1/*STICK2*/, 2/*STICK3*/, 3 /*STICK4*/};
|
||||
|
||||
unsigned short calc_crc16(void *pBuffer,unsigned char BufferSize)
|
||||
{
|
||||
@@ -90,18 +90,12 @@ uint16_t get_hall_adc_value(uint8_t ch)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(FLYSKY_HALL_STICKS_REVERSE)
|
||||
ch = sticks_mapping[ch];
|
||||
|
||||
return MAX_ADC_CHANNEL_VALUE - hall_adc_values[ch];
|
||||
#else
|
||||
if (ch < 2)
|
||||
{
|
||||
return MAX_ADC_CHANNEL_VALUE - hall_adc_values[ch];
|
||||
}
|
||||
|
||||
return hall_adc_values[ch];
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -244,7 +244,6 @@ options_jumper_t16 = {
|
||||
"internalmulti": ("INTERNAL_MODULE_MULTI", "YES", "NO"),
|
||||
"bluetooth": ("BLUETOOTH", "YES", "NO"),
|
||||
"externalaccessmod": ("HARDWARE_EXTERNAL_ACCESS_MOD", "YES", "NO"),
|
||||
"flyskyhallsticks": ("FLYSKY_HALL_STICKS", "NO", "YES"),
|
||||
}
|
||||
|
||||
options_jumper_t18 = {
|
||||
@@ -258,7 +257,6 @@ options_jumper_t18 = {
|
||||
"flexr9m": ("MODULE_PROTOCOL_FLEX", "YES", None),
|
||||
"bluetooth": ("BLUETOOTH", "YES", "NO"),
|
||||
"externalaccessmod": ("HARDWARE_EXTERNAL_ACCESS_MOD", "YES", "NO"),
|
||||
"flyskyhallsticks": ("FLYSKY_HALL_STICKS", "NO", "YES"),
|
||||
}
|
||||
|
||||
options_radiomaster_tx12 = {
|
||||
@@ -296,5 +294,4 @@ options_radiomaster_tx16s = {
|
||||
"bluetooth": ("BLUETOOTH", "YES", "NO"),
|
||||
"internalgps": ("INTERNAL_GPS", "YES", "NO"),
|
||||
"externalaccessmod": ("HARDWARE_EXTERNAL_ACCESS_MOD", "YES", "NO"),
|
||||
"flyskyhallsticks": ("FLYSKY_HALL_STICKS", "NO", "YES"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,21 +126,12 @@ do
|
||||
t16)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON"
|
||||
;;
|
||||
t16-fs)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON -DFLYSKY_HALL_STICKS=ON"
|
||||
;;
|
||||
t18)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T18"
|
||||
;;
|
||||
t18-fs)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T18 -DFLYSKY_HALL_STICKS=ON"
|
||||
;;
|
||||
tx16s)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S"
|
||||
;;
|
||||
tx16s-fs)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S -DFLYSKY_HALL_STICKS=ON"
|
||||
;;
|
||||
nv14)
|
||||
BUILD_OPTIONS+="-DPCB=NV14"
|
||||
;;
|
||||
|
||||
@@ -31,26 +31,12 @@ boards = {
|
||||
"INTERNAL_MODULE_MULTI": "YES",
|
||||
"DEFAULT_MODE": "2",
|
||||
},
|
||||
"T16_FS": {
|
||||
"PCB": "X10",
|
||||
"PCBREV": "T16",
|
||||
"INTERNAL_MODULE_MULTI": "YES",
|
||||
"DEFAULT_MODE": "2",
|
||||
"FLYSKY_HALL_STICKS": "YES",
|
||||
},
|
||||
"T18": {
|
||||
"PCB": "X10",
|
||||
"PCBREV": "T18",
|
||||
"INTERNAL_MODULE_MULTI": "YES",
|
||||
"DEFAULT_MODE": "2",
|
||||
},
|
||||
"T18_FS": {
|
||||
"PCB": "X10",
|
||||
"PCBREV": "T18",
|
||||
"INTERNAL_MODULE_MULTI": "YES",
|
||||
"DEFAULT_MODE": "2",
|
||||
"FLYSKY_HALL_STICKS": "YES",
|
||||
},
|
||||
}
|
||||
|
||||
translations = [
|
||||
|
||||
@@ -14,23 +14,11 @@ boards = {
|
||||
"PCBREV": "TX16S",
|
||||
"DEFAULT_MODE": "1",
|
||||
},
|
||||
"TX16S_1_FS": {
|
||||
"PCB": "X10",
|
||||
"PCBREV": "TX16S",
|
||||
"DEFAULT_MODE": "1",
|
||||
"FLYSKY_HALL_STICKS": "YES",
|
||||
},
|
||||
"TX16S_2": {
|
||||
"PCB": "X10",
|
||||
"PCBREV": "TX16S",
|
||||
"DEFAULT_MODE": "2",
|
||||
},
|
||||
"TX16S_2_FS": {
|
||||
"PCB": "X10",
|
||||
"PCBREV": "TX16S",
|
||||
"DEFAULT_MODE": "2",
|
||||
"FLYSKY_HALL_STICKS": "YES",
|
||||
},
|
||||
"TX12_1": {
|
||||
"PCB": "X7",
|
||||
"PCBREV": "TX12",
|
||||
|
||||
@@ -124,21 +124,12 @@ do
|
||||
t16)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON"
|
||||
;;
|
||||
t16-fs)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON -DFLYSKY_HALL_STICKS=ON"
|
||||
;;
|
||||
t18)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T18"
|
||||
;;
|
||||
t18-fs)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T18 -DFLYSKY_HALL_STICKS=ON"
|
||||
;;
|
||||
tx16s)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S"
|
||||
;;
|
||||
tx16s-fs)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S -DFLYSKY_HALL_STICKS=ON"
|
||||
;;
|
||||
nv14)
|
||||
BUILD_OPTIONS+="-DPCB=NV14"
|
||||
;;
|
||||
|
||||
@@ -80,21 +80,12 @@ do
|
||||
t16)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON"
|
||||
;;
|
||||
t16-fs)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON -DFLYSKY_HALL_STICKS=ON"
|
||||
;;
|
||||
t18)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T18"
|
||||
;;
|
||||
t18-fs)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T18 -DFLYSKY_HALL_STICKS=ON"
|
||||
;;
|
||||
tx16s)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S -DINTERNAL_GPS=ON"
|
||||
;;
|
||||
tx16s-fs)
|
||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S -DFLYSKY_HALL_STICKS=ON"
|
||||
;;
|
||||
nv14)
|
||||
BUILD_OPTIONS+="-DPCB=NV14"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user