Skip to content

Commit

Permalink
Fix handling of custom configuration with 8 motors, enabling motor te…
Browse files Browse the repository at this point in the history
…sting on octocopters (betaflight#4213)

* Fix handling of custom configuration with 8 motors
Resolves issue betaflight#4212

* minor optimization since same check is done in for loop above

* Formatting tweak for comment

Co-authored-by: Mark Haslinghuis <[email protected]>

* substitute in equivalent but cleaner logic

---------

Co-authored-by: Mark Haslinghuis <[email protected]>
  • Loading branch information
2 people authored and demvlad committed Nov 14, 2024
1 parent 0d6daf2 commit 3fd1d17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/tabs/motors.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ motors.initialize = async function (callback) {
MSP.promise(MSPCodes.MSP_MOTOR).then(() => {
const mixer = FC.MIXER_CONFIG.mixer;
const motorCount = mixerList[mixer - 1].motors;
// initialize for models with zero motors
self.numberOfValidOutputs = motorCount;
// initialize with firmware supplied motor_count
self.numberOfValidOutputs = FC.MOTOR_CONFIG.motor_count;

for (let i = 0; i < FC.MOTOR_DATA.length; i++) {
if (FC.MOTOR_DATA[i] === 0) {
Expand Down

0 comments on commit 3fd1d17

Please sign in to comment.