aseba
aseba copied to clipboard
Hex and binary notation should be allowed for constants
First, it would be consistent with the use of literals in the language and second it is especially useful to define masks. Thanks Moti
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.
Working on a solution, should be ready soon. I need to code a multi-radix spin box.
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.
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.
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 :-)
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