-
Notifications
You must be signed in to change notification settings - Fork 2
Read me if you don't want to use reflection
The scripting part of the app uses reflection in order to discover and invoke methods without having to do any configuration. This allows you to implement the robot side of the code and "forget it." You don't need manually add methods to be able to execute them. In the GUI you can simply type the class name and the method, and you can the requested method will be executed on the robot with no additional configuration.
The ability to not use reflection is not currently possible in the current implementation of the robot side library!
The ability to execute code without using reflection is planned to return in the future!
Inside your robot code you will now need to edit this file.
If you want, you can remove everything that's inside the if (reflection)
parts of the code. It's probably better to just leave this code there in case you want to go back. It will not run anyways since reflection
should always be false.
You can then go to this part of the code and add all the methods you want to run into the switch statement. The argument array will be an array of Strings that you will need to parse yourself on the robot side. Inside the switch statement you can do whatever you want. Just return false to stop the autonomous execution (something went wrong) and return nothing to continue (if everything went as expected).