bird-sanctuary / bluejay

:bird: Digital ESC firmware for controlling brushless motors in multirotors
GNU General Public License v3.0
312 stars 36 forks source link

Dithering re-work/analysis #127

Closed stylesuxx closed 7 months ago

stylesuxx commented 1 year ago

Dithering is relatively CPU intense and does not seem to have too big of an impact. We should evaluate the current implementation since it does not seem to be optimal.

stylesuxx commented 1 year ago

I looked a bit into the current dithering implementation:

It seems that dithering is invoked in t1, when the DShot frame is decoded, so dithering is only applied on a per DSHOT frame base, not per PWM cycle. This somehow does not make sense to me. What would make sense to me is to apply dithering every PWM cycle. The current implementation seems to offset the calculated PWM value until the next DSHOT frame arrives.

@damosvil could you by any chance shed some light on this? Am I missing something here?

damosvil commented 1 year ago

No, you didn't miss anything. This is a substandard dithering implementation. Also this is no 11bit dithering as announced.

stylesuxx commented 7 months ago

Remove dithering - closing issue.