From 68584a7262e2a941f6eb04184fb786d21da1da60 Mon Sep 17 00:00:00 2001 From: Kilrah Date: Mon, 20 Apr 2020 14:26:57 +0200 Subject: [PATCH] No extra switches on TX16S --- radio/src/targets/horus/hal.h | 7 +++++-- radio/src/targets/horus/keys_driver.cpp | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/radio/src/targets/horus/hal.h b/radio/src/targets/horus/hal.h index 636e6c9e3..14d2d27ed 100644 --- a/radio/src/targets/horus/hal.h +++ b/radio/src/targets/horus/hal.h @@ -131,7 +131,10 @@ #define SWITCHES_GPIO_REG_H GPIOG->IDR #define SWITCHES_GPIO_PIN_H GPIO_Pin_7 // PG.07 -#if defined(PCBX10) +#if defined(RADIO_TX16S) + #define STORAGE_SWITCH_I + #define STORAGE_SWITCH_J +#elif defined(PCBX10) // Gimbal switch left #define STORAGE_SWITCH_I #define HARDWARE_SWITCH_I @@ -244,7 +247,7 @@ #if defined(RADIO_TX16S) #define KEYS_GPIOA_PINS (GPIO_Pin_6) #define KEYS_GPIOC_PINS (GPIO_Pin_4 | GPIO_Pin_13) - #define KEYS_GPIOH_PINS (GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_14 | GPIO_Pin_15) + #define KEYS_GPIOH_PINS (GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12) #else #define KEYS_GPIOH_PINS (GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_14 | GPIO_Pin_15) #endif diff --git a/radio/src/targets/horus/keys_driver.cpp b/radio/src/targets/horus/keys_driver.cpp index 7433ee58f..b19b406ae 100755 --- a/radio/src/targets/horus/keys_driver.cpp +++ b/radio/src/targets/horus/keys_driver.cpp @@ -184,8 +184,10 @@ uint32_t switchState(uint8_t index) ADD_2POS_CASE(F); ADD_3POS_CASE(G, 6); ADD_2POS_CASE(H); +#if !defined(RADIO_TX16S) ADD_2POS_CASE(I); ADD_2POS_CASE(J); +#endif #endif default: break;