fivesixzero / CircuitPython_HX711

A CircuitPython driver for the HX711 load cell amplifer and ADC
MIT License
5 stars 1 forks source link

Conditional inside gain setter is always true #6

Open ali1234 opened 1 year ago

ali1234 commented 1 year ago

https://github.com/fivesixzero/CircuitPython_HX711/blob/4efc13f5e69f482d9b43936077e19e5fbeb7f285/hx711/__init__.py#L183

This accepts any int or float because of the or.

It should be if gain >= 1 and gain <= 3: