public Hashtable createSensors() {
final SimpleFRCBotSimulated me = this;
Hashtable res = new Hashtable();
// Create sensor objects
res.put(SimpleFRCIO.ARM_DOWN_BUTTON, new Sensor(Boolean.class) {
protected Object retrieveValue() {
return me.armPosition <= me.lowSensor;
}
});
res.put(SimpleFRCIO.ARM_UP_BUTTON, new Sensor(Boolean.class) {
protected Object retrieveValue() {
return me.armPosition >= me.highSensor;
}
});
res.put(SimpleFRCIO.MOTION_STATE, new Sensor(String.class) {
protected Object retrieveValue() {
if (me.lowSensor == me.armPosition) {
return "At low limit";
} else if (me.highSensor == me.armPosition) {
return "At high limit";