Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adafruit_python_pca9685 and adafruit_circuitpython_pca9685 conflict #1108

Closed
quebeh opened this issue Mar 2, 2023 · 2 comments
Closed

adafruit_python_pca9685 and adafruit_circuitpython_pca9685 conflict #1108

quebeh opened this issue Mar 2, 2023 · 2 comments

Comments

@quebeh
Copy link

quebeh commented Mar 2, 2023

Hey guys, i want to use the newer adafruit_circuitpython_pca9685 library for other utilities. But it seems like donkeycar is using the old, deprecated library adafruit_python_pca9685.

Is there any replacement for donkeycar.parts.actuator.PWMThrottle (ESC module) that uses the new library?
I have tried to download the old one's source code, but it seems like having both the modules having its own instances of PCA9685 objects will reduce the efficiency.

Any help is appreciated
Thank you

@Ezward
Copy link
Contributor

Ezward commented Mar 2, 2023

We have no plans to change that library, but we are definitely open to accepting a PR.

The old PCA9685 class is being deprecated in favor of PulseController which takes a PwmPin which can source Pwm from GPIO or PCA9685. That is what PWMSteering and PWMThrottle use to source the PWM signal. So there is no need to touch those; you want to change the implementation of the PCA9685 pwm pin at PwmPinPCA9685.

"both the modules having its own instances of PCA9685 objects will reduce the efficiency"

You are correct that the PwmPinPCA9685 implementation does use one PCA9685 instance per pin via the factory method pca9685. I don't think this is an issue but you are free to change that implementation detail if you decide to open a PR.

@quebeh
Copy link
Author

quebeh commented Mar 3, 2023

Alright. Thank you very much. I'll get a better understanding of the pins.py code and possibly make a pull request.

@quebeh quebeh closed this as completed Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants