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

Adding additional MOTOR pin mappings for defaults #12364

Merged
merged 1 commit into from
Feb 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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