2021-01-12, 08:13 AM (This post was last modified: 2021-01-12, 08:20 AM by kaa39518.)
latest version moto.ino
I connected the oscilloscope to the PMW. Filling 25%, and does not depend on the settings servo.speed.max, servo.speed.min.
In the 22-APR-2020 version of moto.ino, everything is perfectly adjustable from almost 0 to 100%
(2021-01-13, 08:00 AM)kaa39518 Wrote: I experimented today.
When set #define DIV_CLOCK 4 works correctly.
Setting #define DIV_CLOCK 2 or #define DIV_CLOCK 1 does not work correctly.
Thanks for checking this out. This would have been my first try last weekend, but I did not have an isolated arduino at my disposal. With your positive test outcome it's opportune to take my pypilot back home to the workbench to do the upgrade.
@Sean why was DIV_CLOCK changed, and what would be the impact of changing it back? Would you accept a pull request for a change that forces DIV_CLOCK to 4 when pwm_style == 2? So it won't affect the other styles and preserves your work?
div clock changed because at 8mhz I get better performance.
The best fix won't need to fix the clock but will instead look at all the cases where div_clock is used specific for pwm_style==2 and correct it. I will try to take a look tonight, i think I have enough information to probably find the problem even without using actual hardware.