slaclab / pabv_control

BSD 3-Clause "New" or "Revised" License
2 stars 5 forks source link

Fix division by zeros #15

Closed mwittgen closed 4 years ago

mwittgen commented 4 years ago

For the pyinstaller bundle this will result in a program crash. @marty-pmr, @slacrherbst, @bungernut Can division by zero handled by setting rates to zero or the display show Nan or blank?

bungernut commented 4 years ago

More context would be good, permalink line? I would say any of your options is fine

mwittgen commented 4 years ago

https://github.com/slaclab/pabv_control/blob/f4e3325ee95e67712d412a8e6a295fc070bb6c22/python_client/ambu_control.py#L53 This one already fixed: https://github.com/slaclab/pabv_control/blob/f4e3325ee95e67712d412a8e6a295fc070bb6c22/python_client/ambu_control.py#L184 I think there is not much else left at first glance. Just wanted to check that to fix applied last week setting the rate to zero is what we want.

mwittgen commented 4 years ago

Fixed, pulled into devel branch.