Add support for radiomaster TX12 (#8080)

* Add tx12 support
This commit is contained in:
3djc
2020-11-14 11:48:46 +01:00
committed by GitHub
parent da0da4b9c9
commit e1e67a9d8c
74 changed files with 893 additions and 120 deletions
@@ -44,6 +44,8 @@
const int8_t adcDirection[NUM_ANALOGS] = {1,-1,1,-1, 1,1,-1, 1,1, 1, 1};
#elif defined(PCBX9D)
const int8_t adcDirection[NUM_ANALOGS] = {1,-1,1,-1, 1,1,0, 1,1, 1, 1};
#elif defined(RADIO_TX12)
const int8_t adcDirection[NUM_ANALOGS] = {-1,1,-1,1, -1,-1, 1, 1};
#elif defined(PCBX7)
const int8_t adcDirection[NUM_ANALOGS] = {-1,1,-1,1, 1,1, 1, 1};
#elif defined(PCBX9LITE)
@@ -96,7 +96,7 @@ if(PCB STREQUAL X12S OR PCB STREQUAL X10 OR PCB STREQUAL X9E OR (PCB STREQUAL X9
)
endif()
if(PCB STREQUAL X7 OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES)
if(BLUETOOTH)
set(BOOTLOADER_SRC
${BOOTLOADER_SRC}
../../../../../targets/common/arm/stm32/bluetooth_driver.cpp
@@ -247,7 +247,7 @@ int main()
backlightInit();
backlightEnable();
#if defined(PCBX7) || defined(PCBXLITE)
#if defined(BLUETOOTH)
// we shutdown the bluetooth module now to be sure it will be detected on firmware start
bluetoothInit(BLUETOOTH_DEFAULT_BAUDRATE, false);
#endif
@@ -71,7 +71,7 @@ void rotaryEncoderInit()
void rotaryEncoderCheck()
{
#if defined(RADIO_FAMILY_T16) && !defined(RADIO_T18)
#if (defined(RADIO_FAMILY_T16) && !defined(RADIO_T18)) || defined(RADIO_TX12)
static uint8_t state = 0;
uint8_t pins = ROTARY_ENCODER_POSITION();