Dan-in-CA / sip_plugins

Plugins for SIP
28 stars 50 forks source link

Fix /0 error #55

Closed IMHarris closed 2 years ago

IMHarris commented 2 years ago

Hi Dan,

This fixes a possible /0 error. Hoping it's the /0 you're seeing.

Dan-in-CA commented 2 years ago

Merged the update. Still seeing the error;

Exception in thread FlowLoop: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/home/pi/SIP/plugins/flow.py", line 309, in run self.fn() File "/home/pi/SIP/plugins/flow.py", line 351, in main_loop volume_footer.val = f'{round((all_pulses - fw.start_pulses) / ls.pulses_per_measure, 1):,}' ZeroDivisionError: division by zero

Dan-in-CA commented 2 years ago

When I put flowhelpers.py in the plugins folder it showed up as a plugin itself under plugin manager. I tried putting it in the SIP folder and it seems to work from there.