Display ESC telemetry as real RPM in the OSD
commit063f3829d4c9a0a8cc733c8dc129968673c68c71
authorBruce Luckcuck <github@etracer.net>
Tue, 24 Apr 2018 18:38:36 +0000 (24 14:38 -0400)
committerBruce Luckcuck <github@etracer.net>
Fri, 4 May 2018 11:51:16 +0000 (4 07:51 -0400)
tree76b00ca64e03d6c5161669acdc30c29ef6d2e26e
parent49f2308fd69fb48f5b9d210520b490dc99754f48
Display ESC telemetry as real RPM in the OSD
The telemetry data provides eRPM/100.  Added a `motor_poles` parameter (defaulting to 14) that is used to calculate the physical RPM.

RPM = (telemetry_rpm * 100) / (motor_poles / 2)

Most motors we commonly use are 14 poles, but the user can adjust if needed for their setup.

Also calculate actual RPM for DEBUG_ESC_SENSOR_RPM, but to fit with in int16 the log value will be RPM/10.
src/main/flight/mixer.c
src/main/flight/mixer.h
src/main/interface/settings.c
src/main/io/osd.c
src/main/sensors/esc_sensor.c