adafruit / Adafruit_CircuitPython_DisplayIO_Layout

A Circuitpython helper library for display element layout using displayio.
MIT License
10 stars 14 forks source link

Dial gauge can go past limits. #23

Closed kmatch98 closed 3 years ago

kmatch98 commented 3 years ago

Currently the dial gauge value can be set outside the range that is displayed. This causes the needle to go outside the range of motion defined by the sweep_angle

Recommend that the needle position be limited to the specified range. But also recommend to allow the value to be anything in case the user needs the dial to retain this set value, even if outside the min and max values.

So, only clip the needle position but allow value to be anything.

(Possible subclass extension: adding a “clip” indicator to a gauge, like in a VU meter, to show that the value is over range)