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

ArduinoBrickValidatorVisitor needs revision #289

Closed VinArt closed 4 years ago

VinArt commented 5 years ago

ArduinoBrickValidatorVisitor has a method override for checkSensorPort. This is however more fully implemented in the super class, so it becomes unclear why this method is overridden. Another thing is that for the sensors mentioned in the method (INFRARED_SENSING and GYRO_SENSING) there seems to be no way to hit their respective case statement since configuration blocks for them would be either null when not used and will have different component type when used.

  1. Check that sensors from ArduinoBrickValidatorVisitor and AbstractBrickValidatorVisitor with their respective configuration blocks are not hitting the case clauses in switch ( usedConfigurationBlock.getComponentType() )
  2. Check whether configuration blocks at all can have types mentioned in checkSensorPort method
  3. Remove dead code if needed.
Ramanjs commented 4 years ago

please see #503

boonto commented 4 years ago

Resolved by GCI student.