OpenRoberta / openroberta-lab

The programming environment »Open Roberta Lab« by Fraunhofer IAIS enables children and adolescents to program robots. A variety of different programming blocks are provided to program motors and sensors of the robot. Open Roberta Lab uses an approach of graphical programming so that beginners can seamlessly start coding. As a cloud-based application, the platform can be used without prior installation of specific software but runs in any popular browser, independent of operating system and device.
Apache License 2.0
125 stars 121 forks source link

Refactor AST class `LightAction` #1523

Closed RaghuvirShirodkar closed 1 year ago

RaghuvirShirodkar commented 1 year ago

The AST class LightAction is currently responsible for the following blockly blocks:

These blocks themselves are defined on the basis of their characteristics, for instance, not all blocks have field SWITCH_COLOR. This has led to conditional statements in the AST class itself, something that we would like to avoid.

The idea is to:

An extension of this idea would be to update blockly block robActions_led_off, so that in essence, all LED blocks are neatly refactored.

The goal is therefore to use these new blocks moving forward, while still allowing old programs to be run in the latest version of the lab.

bjost2s commented 1 year ago

fixed with: 0382e9615add65c6c1a392a6c6adbbcf95f23759 09c2c71689e791735dceb430f9302b321054304f 7216de988d6db3e6f2ea8aaa4cb42144758eba31 935c02610e01baff401a9b289cb841a144107627 8feb56d0966aa33f949bd50f2e069642baa1880b 538824d5df5ca73e3c6717e28bad3111f3ff4656