slaclab / pydm

Python Display Manager
http://slaclab.github.io/pydm/
Other
111 stars 76 forks source link

ENH: display negative values in byteindicator widget #1088

Open nstelter-slac opened 1 week ago

nstelter-slac commented 1 week ago

display negative numbers as follows:

if have 8-bit indicator with 0 shift, -1 is the same as 255, -2 = 254, ....

this can be done by just displaying the bits of a negative number as its represented in 2's complement.

also update byte-indicator example to now how 8 bits and can display negative values.

try this out by running 'pydm byte_indicator.ui' with './pydm-testing-ioc'