Closed Patronics closed 1 month ago
As an additional test, I edited this line https://github.com/betaflight/betaflight-configurator/blob/9816ea5ce06a0a21cd17d0402bb8e474df506095/src/js/tabs/motors.js#L394 to self.numberOfValidOutputs = 8;
in src/js/tabs/motors.js and with that tweak the motor test in the configurator behaves properly. So the logic for determining the number of motors in a custom mixer seems to be the part that is specifically broken (though spinning any motors when none are believed to be present, and then not stopping them on command is also a terrifying bug).
I'm happy to do any additional tests or report values from the web inspector when running the PWA configurator, let me know if there's anything else I can do to help.
To update with the outcome of my testing and fix in the above PR, I found that the FC.MOTOR_DATA array is being checked for an entry set to zero to mark the end of a valid list of entries, but since the array is always of size 8, if the entire array is full (when 8 motors are configured), there's no 9th entry to contain a zero, so it returns a motor count of 0 instead of 8. The above PR resolves that by setting the motor count to the array's length if all entries are valid.
Fixed in #4213
Describe the bug
When configuring a custom layout of motors for an octocopter, the motor test interface is nonfunctional, as soon as motor test mode is enabled, some motors will often (but not always, as sometimes they remain unmoving) spin at full speed, even when all sliders are still set to zero. Furthermore, the motors don't respond to any of the sliders, and only the master slider isn't greyed out, reporting "R: NaN" as its speed. When turning off the test mode there is no effect, the motors continue spinning until battery power is removed or the controller reboots.
To Reproduce
configure an octocopter with the following mixer:
and attempt to test the motors from the motors tab of the betaflight configurator. Observe the erratic behavior described above.
Expected behavior
The interface continues to allow safe and reliable testing of the motors, just as it does in the OCTO FLAT + configuration.
Configurator version
10.10.0
Flight controller configuration
Add any other context about the problem that you think might be relevant here
When manually testing the motors in the CLI using the commands of the form
motor 1 1200
, the motors do behave as expected.