Redstone Control

Redstone Control

51k Downloads

7 Segment display lacks negative sign element.

NoxyNixie opened this issue ยท 3 comments

commented

As you can see in the image below the negative number appears quite positive on the 7 segment display:

image

With all the number being signed 32bit values I think the 7 segment display should have a negative sign element showing up with negative numbers.

Awesome mod and thanks for all the work ;)

EDIT: I discovered the signed decimal encoding option but that seems even less useful:

image

commented

The unsigned decimal encoding (default) displays the 4 four least significant digits and ignores the sign as well as all higher digits. But it outputs the value divided by 10 000 so those can be displayed on another display to the left *.
The signed decimal encoding can only display numbers in range -1999 ... +1999. Numbers outside that range will display as overflow +1___ or underflow -1___.
To display large signed numbers, the leftmost display (last in the chain) should be signed and all the other ones unsigned.

*: In case the number is negative and rounds up to 0 after division by 10 000, it actually emits as -2^31 which is used to represent negative zero so the last (signed) display in the chain will correctly show the negative sign.

commented

Ah wow ... alright that works but that wasn't super obvious (I also think its undocumented). Wouldn't it be an idea to make the default mode support sign out of the box?

Thanks ;)

commented

I could swap the signed one to be default and name the unsigned one "extender" instead.
The problem is that these displays need to behave in a way that they show correctly without having any way of knowing, where they are placed within a potential chain of displays so options for versatility are a bit limited.