Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLYWOO F745 motor mapping incorrect in iNav version 7 #10018

Open
wsiok opened this issue May 10, 2024 · 0 comments
Open

FLYWOO F745 motor mapping incorrect in iNav version 7 #10018

wsiok opened this issue May 10, 2024 · 0 comments

Comments

@wsiok
Copy link

wsiok commented May 10, 2024

Current Behavior

One of Motor mappings with the target FLYWOOF745 uses port E13.

Steps to Reproduce

  1. Flash the iNav version 7.

Expected behavior

The motors shall be mapped as follows according to the documentation. iNav 5 does it correctly.
https://flywoo.tawk.help/article/goku-f745-2-6s-16x16-stack
resource MOTOR 1 B00
resource MOTOR 2 B01
resource MOTOR 3 E09
resource MOTOR 4 E11

Suggested solution(s)

See the diff beneath


iNav version
7.1.1

  • FC Board name and vendor: FLYWOO F745

Workaround / fix:

diff --git a/src/main/target/FLYWOOF745/target.c b/src/main/target/FLYWOOF745/target.c
index 04c083ac9..85b572d54 100644
--- a/src/main/target/FLYWOOF745/target.c
+++ b/src/main/target/FLYWOOF745/target.c
@@ -30,26 +30,17 @@
 #include "drivers/pinio.h"
 
 timerHardware_t timerHardware[] = {
-// DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM,                      0, 1), // PPM,
-// DMA2_ST6
+    //DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM,                      0, 1), // PPM, DMA2_ST6
 
-#ifdef FLYWOOF745
-    DEF_TIM(TIM3, CH4, PB1,  TIM_USE_OUTPUT_AUTO, 0, 0),   // M1 , DMA1_ST2
-    DEF_TIM(TIM8, CH4, PC9,  TIM_USE_OUTPUT_AUTO, 0, 0),   // M2 , DMA2_ST7
-    DEF_TIM(TIM3, CH3, PB0,  TIM_USE_OUTPUT_AUTO, 0, 0),   // M3 , DMA1_ST7
-    DEF_TIM(TIM1, CH2, PE11, TIM_USE_OUTPUT_AUTO, 0, 1),  // M4 , DMA2_ST4
-    DEF_TIM(TIM1, CH1, PE9,  TIM_USE_OUTPUT_AUTO, 0, 2),   // M5 , DMA2_ST2
-#else /* FLYWOOF745NANO */
-    DEF_TIM(TIM3, CH3, PB0,  TIM_USE_OUTPUT_AUTO, 0, 0),   // M1 , DMA1_ST7
-    DEF_TIM(TIM3, CH4, PB1,  TIM_USE_OUTPUT_AUTO, 0, 0),   // M2 , DMA1_ST2
-    DEF_TIM(TIM1, CH1, PE9,  TIM_USE_OUTPUT_AUTO, 0, 2),   // M3 , DMA2_ST2
-    DEF_TIM(TIM1, CH2, PE11, TIM_USE_OUTPUT_AUTO, 0, 1),  // M4 , DMA2_ST4
-    DEF_TIM(TIM8, CH4, PC9,  TIM_USE_OUTPUT_AUTO, 0, 0),   // M5 , DMA2_ST7
-#endif
-    DEF_TIM(TIM5, CH4, PA3,  TIM_USE_OUTPUT_AUTO, 0, 0),  // M6 , DMA1_ST1
-    DEF_TIM(TIM3, CH1, PB4,  TIM_USE_OUTPUT_AUTO, 0, 0),  // M7 , DMA1_ST4
-    DEF_TIM(TIM3, CH2, PB5,  TIM_USE_OUTPUT_AUTO, 0, 0),  // M8 , DMA1_ST5
-    DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0),         // LED_STRIP, DMA1_ST0
+    DEF_TIM(TIM3, CH3, PB0,  TIM_USE_MOTOR,                    0, 0), // M1 , DMA1_ST7
+    DEF_TIM(TIM3, CH4, PB1,  TIM_USE_MOTOR,                    0, 0), // M2 , DMA1_ST2
+    DEF_TIM(TIM1, CH1, PE9,  TIM_USE_MOTOR,    0, 2), // M3 , DMA2_ST2
+    DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR,    0, 1), // M4 , DMA2_ST4
+    //DEF_TIM(TIM8, CH4, PC9,  TIM_USE_SERVO,    0, 0), // M5 , DMA2_ST7
+    //DEF_TIM(TIM5, CH4, PA3,  TIM_USE_SERVO,    0, 0), // M6 , DMA1_ST1
+    //DEF_TIM(TIM3, CH1, PB4,  TIM_USE_SERVO,    0, 0), // M7 , DMA1_ST4
+    //DEF_TIM(TIM3, CH2, PB5,  TIM_USE_SERVO,    0, 0), // M8 , DMA1_ST5
+    //DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED,                                               0, 0), // LED_STRIP, DMA1_ST0
 };
 
 const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant