khoih-prog / ESP32_ISR_Servo

This library enables you to use 1 Hardware Timer on ESP32-based board to control 16 or more servo motors. Now supporting ESP32, ESP32_S2, ESP32_S3, ESP32_C3-based boards. Tested OK with ESP32 core v2.0.5
MIT License
30 stars 9 forks source link

Fixed count >= min comparison for servo enable. #1

Closed raphweb closed 3 years ago

raphweb commented 3 years ago

Value of count could be smaller than min if min is not divided by TIMER_INTERVAL_MICRO. Then you cannot re-enable your servos. This PR fixes that.

khoih-prog commented 3 years ago

Hi Ralph,

Thanks for the PR which provides the bug fix not only for this ESP32_ISR_Servo library but also for its twin ESP8266_ISR_Servo Library.

I'm sorry I haven't touched and looked at those libraries for quite a long time as I don't know if anybody would use it. So happy that it's somehow still useful after long-time being neglected.

I'll merge it now and retouch within days to create a new release. Thanks.

Regards,

khoih-prog commented 3 years ago

Just published a new releases v1.1.0, with your contribution notes in Contributions and Thanks


Releases v1.1.0

  1. Fix bug. See Fixed count >= min comparison for servo enable
  2. Clean-up all compiler warnings possible.
  3. Add Table of Contents
  4. Add Version String
  5. Fix and Optimize old examples
nokolade commented 3 years ago

Glad to see this fixed - slowly became insane over the last hour failing to eliminate the idle drift of my 9G servo (hacked to continuously rotate). It's a pity platform.io still included 1.0.2 yesterday. Any chance to publish 1.1.0 to https://platformio.org/lib?

BTW great work on the interrupt stuff, my camera kept failing when using madhephaestus/ESP32Servo (sorry for any noobisms)

khoih-prog commented 3 years ago

Hi @nokolade

Thanks for using the library, finding it useful and your encouraging words.

For some unknown reason, PIO hasn't updated the khoih-prog's ESP32_ISR_Servo to the latest version, so I had to create a new khoih.prog's ESP32_ISR_Servo.

Please use the new one by changing the Author from khoih-prog to khoih.prog or to use the following command to install

$ pio lib install "khoih.prog/ESP32_ISR_Servo"

The similar issue also happens to many other libraries. Check Newer versions missing from platformIO #16