From d8bb1e8b9742dd0b0d900cd692cfd3076dfd6817 Mon Sep 17 00:00:00 2001 From: jflyper Date: Sun, 27 Nov 2016 20:17:27 +0900 Subject: [PATCH 1/3] AIRBOT F4 S6_OUT is PA8 --- src/main/target/REVO/target.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/target/REVO/target.c b/src/main/target/REVO/target.c index 31a059a1d..7fdb925d9 100644 --- a/src/main/target/REVO/target.c +++ b/src/main/target/REVO/target.c @@ -39,6 +39,10 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // LED for REVOLT D1_ST0 #else DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR | TIM_USE_LED, 1, 0), // S5_OUT / LED for REVO D1_ST4 +#ifdef AIRBOTF4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 1, 0), // S6_OUT +#else DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 1, 0), // S6_OUT D1_ST2 #endif +#endif }; From 8aca20d02cc0735667b0920d7639f961076bf4dd Mon Sep 17 00:00:00 2001 From: jflyper Date: Mon, 5 Dec 2016 15:59:13 +0900 Subject: [PATCH 2/3] Trying to make nested ifdefs look nice --- src/main/target/REVO/target.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/target/REVO/target.c b/src/main/target/REVO/target.c index a4e90641a..36471cee3 100644 --- a/src/main/target/REVO/target.c +++ b/src/main/target/REVO/target.c @@ -43,10 +43,10 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 1, 1), // S3_OUT D1_ST6 DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 1, 0), // S4_OUT D1_ST1 DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR | TIM_USE_LED, 1, 0), // S5_OUT / LED for REVO D1_ST4 -# ifdef AIRBOTF4 + #ifdef AIRBOTF4 DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 1, 0), // S6_OUT -# else + #else DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 1, 0), // S6_OUT D1_ST2 -# endif + #endif #endif }; From 92ae5c96d34dede0f8cba1687c8ee6cdc249e83c Mon Sep 17 00:00:00 2001 From: jflyper Date: Thu, 8 Dec 2016 14:58:46 +0900 Subject: [PATCH 3/3] Fixed indentation for pre-processor directives --- src/main/target/REVO/target.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/target/REVO/target.c b/src/main/target/REVO/target.c index 36471cee3..2161d33b8 100644 --- a/src/main/target/REVO/target.c +++ b/src/main/target/REVO/target.c @@ -43,10 +43,10 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 1, 1), // S3_OUT D1_ST6 DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 1, 0), // S4_OUT D1_ST1 DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR | TIM_USE_LED, 1, 0), // S5_OUT / LED for REVO D1_ST4 - #ifdef AIRBOTF4 +#ifdef AIRBOTF4 DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 1, 0), // S6_OUT - #else +#else DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 1, 0), // S6_OUT D1_ST2 - #endif +#endif #endif };