Merge with latest 2.3

This commit is contained in:
Bertrand Songis
2019-12-13 12:30:02 +01:00
52 changed files with 10502 additions and 7011 deletions
+18 -7
View File
@@ -333,12 +333,16 @@ enum EnumSwitchesPositions
SW_SH1,
SW_SH2,
#endif
#if defined(PCBX9DP) && PCBREV >= 2019
#if defined(RADIO_X9DP2019)
SW_SI0,
SW_SI1,
SW_SI2,
#endif
#if defined(PCBX7)
#if defined(PCBX7ACCESS)
SW_SI0,
SW_SI1,
SW_SI2,
#elif defined(PCBX7)
SW_SI0,
SW_SI1,
SW_SI2,
@@ -396,6 +400,11 @@ enum EnumSwitchesPositions
#define STORAGE_NUM_SWITCHES NUM_SWITCHES
#define DEFAULT_SWITCH_CONFIG (SWITCH_2POS << 10) + (SWITCH_2POS << 8) + (SWITCH_3POS << 6) + (SWITCH_3POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0)
#define DEFAULT_POTS_CONFIG (POT_WITHOUT_DETENT << 0) + (POT_WITHOUT_DETENT << 2); // S1 = pot without detent, S2 = pot with detent
#elif defined(PCBX7ACCESS)
#define NUM_SWITCHES 7
#define STORAGE_NUM_SWITCHES 8
#define DEFAULT_SWITCH_CONFIG (SWITCH_TOGGLE << 10) + (SWITCH_2POS << 8) + (SWITCH_3POS << 6) + (SWITCH_3POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0)
#define DEFAULT_POTS_CONFIG (POT_WITHOUT_DETENT << 0) + (POT_WITH_DETENT << 2); // S1 = pot without detent, S2 = pot with detent
#elif defined(PCBX7)
#define NUM_SWITCHES 8
#define STORAGE_NUM_SWITCHES NUM_SWITCHES
@@ -417,7 +426,7 @@ enum EnumSwitchesPositions
#define DEFAULT_SWITCH_CONFIG (SWITCH_TOGGLE << 14) + (SWITCH_3POS << 12) + (SWITCH_2POS << 10) + (SWITCH_3POS << 8) + (SWITCH_3POS << 6) + (SWITCH_3POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0)
#define DEFAULT_POTS_CONFIG (POT_WITH_DETENT << 0) + (POT_WITH_DETENT << 2);
#define DEFAULT_SLIDERS_CONFIG (SLIDER_WITH_DETENT << 3) + (SLIDER_WITH_DETENT << 2) + (SLIDER_WITH_DETENT << 3) + (SLIDER_WITH_DETENT << 2) + (SLIDER_WITH_DETENT << 1) + (SLIDER_WITH_DETENT << 0)
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019)
#define NUM_SWITCHES 9
#define STORAGE_NUM_SWITCHES NUM_SWITCHES
#define DEFAULT_SWITCH_CONFIG (SWITCH_TOGGLE << 16) + (SWITCH_TOGGLE << 14) + (SWITCH_3POS << 12) + (SWITCH_2POS << 10) + (SWITCH_3POS << 8) + (SWITCH_3POS << 6) + (SWITCH_3POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0);
@@ -607,7 +616,7 @@ extern uint16_t adcValues[NUM_ANALOGS];
#define BATT_SCALE 123
#elif defined(PCBX9LITE)
#define BATT_SCALE 117
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019)
#define BATT_SCALE 117
#else
#define BATT_SCALE 150
@@ -689,7 +698,9 @@ extern uint32_t telemetryErrors;
void telemetryPortInvertedInit(uint32_t baudrate);
// PCBREV driver
#if defined(PCBX7)
#if defined(PCBX7ACCESS)
#define HAS_SPORT_UPDATE_CONNECTOR() true
#elif defined(PCBX7)
#define IS_PCBREV_40() (GPIO_ReadInputDataBit(PCBREV_GPIO, PCBREV_GPIO_PIN) == Bit_SET)
#define HAS_SPORT_UPDATE_CONNECTOR() IS_PCBREV_40()
#elif defined(SPORT_UPDATE_PWR_GPIO)
@@ -785,11 +796,11 @@ void bluetoothInit(uint32_t baudrate, bool enable);
void bluetoothWriteWakeup();
uint8_t bluetoothIsWriting();
void bluetoothDisable();
#if defined(PCBX9LITES)
#if defined(PCBX9LITES) || defined(PCBX7ACCESS)
#define IS_BLUETOOTH_CHIP_PRESENT() (true)
#elif defined(PCBX9LITE)
#define IS_BLUETOOTH_CHIP_PRESENT() (false)
#elif (defined(PCBX7) || defined(PCBXLITE)) && !defined(SIMU)
#elif defined(BLUETOOTH_PROBE) && !defined(SIMU)
extern volatile uint8_t btChipPresent;
#define IS_BLUETOOTH_CHIP_PRESENT() (btChipPresent)
#else