DexterInd / GoPiGo3

The GoPiGo3 is a Raspberry Pi Robot!
https://gopigo.io
Other
98 stars 85 forks source link

PiGPIO no longer leaking resources #308

Closed CleoQc closed 2 years ago

CleoQc commented 2 years ago

A call to pigpio.stop() is required, otherwise in multithreaded environments, or if a gopigo program is run multiple times one after the other, we end up with a pigpio complaint and the robot stops running.

Here's the pigpio error message that is taken care of with this PR:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Can't connect to pigpio at localhost(8888)

Can't create callback thread.
Perhaps too many simultaneous pigpio connections.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%