refactor motor idle, rename dshot_idle_value to motor_idle (#13936)
commit5ffeea6ab14a1ae921f5c2be66f652e250b0195c
authorctzsnooze <chris.thompson@sydney.edu.au>
Tue, 8 Oct 2024 16:31:08 +0000 (9 03:31 +1100)
committerGitHub <noreply@github.com>
Tue, 8 Oct 2024 16:31:08 +0000 (8 18:31 +0200)
tree74c56dbd4b39b9c266a308c447b46d6965ca8187
parent10d5963d24a76a61fddd6c2845ea361de252de42
refactor motor idle, rename dshot_idle_value to motor_idle (#13936)

* use idleOffset, simplify idle : check PWM idle

* remove get for dshot idle and calculate it once only

* fixes from reviews, thanks

* use motor_idle for CLI name

* use motorConfig->motorIdle not idleOffset

* rename dshotmotorIdle variable to motorIdlePercent

* small comment improvement
17 files changed:
src/main/blackbox/blackbox.c
src/main/cli/settings.c
src/main/cms/cms_menu_misc.c
src/main/config/config.c
src/main/config/config.h
src/main/drivers/dshot.c
src/main/drivers/motor.c
src/main/drivers/motor.h
src/main/fc/parameter_names.h
src/main/flight/mixer_init.c
src/main/flight/mixer_init.h
src/main/msp/msp.c
src/main/pg/motor.c
src/main/pg/motor.h
src/test/unit/flight_failsafe_unittest.cc
src/test/unit/motor_output_unittest.cc
src/test/unit/pg_unittest.cc