davidjsherman / inirobot-scratch-thymioII

Link Scratch 2 and the Thymio-II robot
7 stars 2 forks source link

tilt isn't reported correctly #1

Closed davidjsherman closed 9 years ago

davidjsherman commented 9 years ago

The tilt reporter isn't being read by Scratch. It is probably a mismatch between Scratch's rule for building polled variable names, and the tricky naming convention we use in the bytecode. The asebahttp /poll request correctly reports tilt as e.g. tilt/right/left (as well as tilt.right/left).

In general we need a smarter way to map the user-friendly parameter values presented in Scratch, to the actual variable names that are used in the bytecode. We will need this better solution for internationalization.

davidjsherman commented 9 years ago

Fixed by using hybrid reporter names e.g. tilt.right_left. The Scratch extension manager escapes backslashes in variable parameters, and apparently doesn't remember to remove them.

On a related note, internationalization is handled by a custom .po file.