Skip to content

Commit

Permalink
Adding additional MOTOR pin mappings for defaults (betaflight#12364)
Browse files Browse the repository at this point in the history
  • Loading branch information
blckmn authored and davidbitton committed Feb 5, 2024
1 parent 7ea9ce4 commit ba2296e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/main/pg/motor.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,18 @@ void pgResetFn_motorConfig(motorConfig_t *motorConfig)
#ifdef MOTOR4_PIN
motorConfig->dev.ioTags[3] = IO_TAG(MOTOR4_PIN);
#endif
/*
NOTE as we predominantly build for quads, the default motor pin defines is 4,
add more if a specific configuration ever requires it.
*/
#ifdef MOTOR5_PIN
motorConfig->dev.ioTags[4] = IO_TAG(MOTOR5_PIN);
#endif
#ifdef MOTOR6_PIN
motorConfig->dev.ioTags[5] = IO_TAG(MOTOR6_PIN);
#endif
#ifdef MOTOR7_PIN
motorConfig->dev.ioTags[6] = IO_TAG(MOTOR7_PIN);
#endif
#ifdef MOTOR8_PIN
motorConfig->dev.ioTags[7] = IO_TAG(MOTOR8_PIN);
#endif
#endif

motorConfig->motorPoleCount = 14; // Most brushes motors that we use are 14 poles
Expand Down

0 comments on commit ba2296e

Please sign in to comment.