aseba icon indicating copy to clipboard operation
aseba copied to clipboard

Hex and binary notation should be allowed for constants

Open motib opened this issue 11 years ago • 6 comments

First, it would be consistent with the use of literals in the language and second it is especially useful to define masks. Thanks Moti

motib avatar Sep 23 '13 12:09 motib

This is already possible using the 'const' keyword (only in the master branch for now, see issue #159). But I agree that studio should allow this.

vaussard avatar Sep 23 '13 12:09 vaussard

Working on a solution, should be ready soon. I need to code a multi-radix spin box.

vaussard avatar Sep 24 '13 07:09 vaussard

I don't really see the need for a "spin box" (I presume you mean choosing a value from a menu) for hex and binary. It would be sufficient to interpret typed-in values of the proper syntax as hex and binary.

motib avatar Sep 24 '13 07:09 motib

This is just an implementation detail, as behind-the-scene we already have a spin box (notice the two arrows when editing the value). So I am not changing the current interface, just adding new validations to the current field.

vaussard avatar Sep 24 '13 07:09 vaussard

I got a working solution, but it is uglier than I first thought. Will work on a better solution in the train, so please be patient :-)

vaussard avatar Sep 24 '13 11:09 vaussard

Hi Florian, This was just a minor "wish", not a show-stopping bug. Don't crash the train because of it :-).

While I'm writing ... I don't find the "spin box" helpful since the constant values I define are thresholds, motor speeds and deltas, and these are on the order of 10s or 100s. It's easier to type than to select from the pulldown.

Thanks Moti

motib avatar Sep 24 '13 11:09 motib