Page 1 of 1

Signed/Unsigned int property

Posted: Mon Sep 21, 2020 6:10 pm
by mnf
A minor visual bug...

Add an signed or unsigned int property to panel - this is shown as Z or Z+ - however the property is actually 32 bit. So should be shown as L or L+. I had to test whether the variable was 32 bit (which I needed) or 16bit....

Martin

Re: Signed/Unsigned int property

Posted: Mon Sep 21, 2020 6:29 pm
by kersing
Have you tested on hardware or in simulation?

Re: Signed/Unsigned int property

Posted: Mon Sep 21, 2020 6:38 pm
by mnf
Tested on hardware (Arduino mega) - result was 32 bit.

Martin

Re: Signed/Unsigned int property

Posted: Tue Sep 22, 2020 2:37 pm
by LeighM
Could you give an example?
A Flowcode project to demonstrate the issue?
Thanks

Re: Signed/Unsigned int property

Posted: Tue Sep 22, 2020 6:03 pm
by mnf
bits.jpg
bits.jpg (37.86 KiB) Viewed 5190 times
How many bits does 'test' have Z implies 16....

Another visual glitch - component groups lose their description if the window is resized using the maximize/minimize button - though they recover if resizing by dragging the window. How many is lost depends on how small the window goes...
comps.jpg
comps.jpg (10.91 KiB) Viewed 5190 times
Martin

Re: Signed/Unsigned int property

Posted: Tue Sep 22, 2020 7:48 pm
by kersing
Hi Martin,

That screenshot is in Flowcode, not on hardware... I agree it would be better to limit the size for values to 16 bit on display, but I am still curious what happens if you use this variable on hardware. My money is on it being 16 bit...

Best regards,

Jac

Re: Signed/Unsigned int property

Posted: Tue Sep 22, 2020 8:04 pm
by mnf
Yes - the problem is in FC...

The actual value is 32 bit (on hardware) which is correct - it's just the mismatch of using Z for 16 bit values in variables and 32bit values in properties..

Martin

Re: Signed/Unsigned int property

Posted: Thu Sep 24, 2020 5:09 pm
by Benj
Yes you're correct the icon appears to be wrong there.

Interestingly the constants does it a bit better but still not 100% correct. An int is shown as a long and a byte as an int.
Consts.jpg
Consts.jpg (6.49 KiB) Viewed 5176 times
Maybe we can default to the Long icons rather than the Int icons for the signed/unsigned integer property types?