flyte / mqtt-io

Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring.
MIT License
468 stars 157 forks source link

Update ads1x15.py #329

Closed maxthebuch closed 9 months ago

maxthebuch commented 1 year ago

Avoids race condition when reading a channel

skvsn commented 10 months ago

I'm using ads1115 on my RPI4 and if I configure more that one channel - mqtt-io seems to crash after some time. When running with only one channel - everything works perfectly. So hopefully this will fix this problem. Another way of achieving this could be by setting max_workers=1 on this module's ThreadPoolExecutor object

skvsn commented 10 months ago

I tested this version with all 4 channels enabled - it is running fine for more than day now and not crashing as before. Would be great if this fix could be included in the main branch of mqtt-io

mschlenstedt commented 9 months ago

@flyte Happy New Year ;-)

Any time to include this PR and make a new version? Would be great, since this is really an important Bugfix when using an ads1x15