-
Notifications
You must be signed in to change notification settings - Fork 13
Home
Every student is invited to provide input for next generation!
Check out the junit examples for more information.
For your solution you have to use the "CaDSEV3RobotStudentImplementation". It provides a basic interface for your control inputs. You could choose between "REAL" and "SIMULATION" by using the "CaDSEV3RobotType" enum. First you have to create the singleton instance by calling:
CaDSEV3RobotStudentImplementation.createInstance(type, statusListener, feedbackListener);
- type is the CaDSEV3RobotType enum
- statusListener is your implementation of the interface ICaDSEV3RobotStatusListener.
- feedbackListener is your implementation of the interface ICaDSEV3RobotFeedBackListener.
Through the listener objects you receive robot status messages and you get feedback for your calls. Notice, you could only create one instance, after that you get the same instance, with the settings that were provided at the first time, at any other time. Get the instance by calling:
CaDSEV3RobotStudentImplementation.getInstance();
To start the GUI create a GUI instance by using the following constructor:
CaDSRobotGUISwing(ICaDSRMIConsumer consumer, IIDLCaDSEV3RMIMoveGripper gripper, IIDLCaDSEV3RMIMoveVertical vertical, IIDLCaDSEV3RMIMoveHorizontal horizontal, IIDLCaDSEV3RMIUltraSonic ultraSonic)
To start the GUI and the refresh Thread use the following command:
gui = new CaDSRobotGUISwing(consumer, gripper, vertical, horizontal, ultraSonic);
gui.startGUIRefresh(refreshRate);
refreshRate has to be provided in ms and has to be higher then 99 ms. If you want to stop the refresh call:
gui.stopGUIRefresh();
If you want that the display of the brick shows only the information that the system itself provides, follow the following steps:
- use the buttons on the mindstorm to navigate(left and right button) to the menu entry "system" and press enter(dark grey button in the middle).
- now find the menu entry "suspend display" and press enter. Now the display should be clear if no other program is running on the mindstorm. If a program is running, you should see the current status values of the system.
- to return to menu press enter and down(button under enter) at the same time. Now you should see the mindstorm menu again.