Skip to content
Snippets Groups Projects
Commit 2e619cb1 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

Added UI for control center elements.

parent 5e6d8fe4
No related branches found
No related tags found
No related merge requests found
Showing
with 237 additions and 66 deletions
...@@ -72,10 +72,28 @@ ...@@ -72,10 +72,28 @@
<modelElementClass <modelElementClass
modelElementClass="org.fortiss.af3.platform.raspberry.model.brick.UIDUnit"> modelElementClass="org.fortiss.af3.platform.raspberry.model.brick.UIDUnit">
</modelElementClass> </modelElementClass>
<modelElementClass
modelElementClass="org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterDownstreamInput">
</modelElementClass>
<modelElementClass
modelElementClass="org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterUpstreamOutput">
</modelElementClass>
</editPartFactory> </editPartFactory>
</extension> </extension>
<extension <extension
point="org.fortiss.tooling.kernel.ui.modelElementHandler"> point="org.fortiss.tooling.kernel.ui.modelElementHandler">
<modelElementHandler
handler="org.fortiss.af3.platform.raspberry.ui.handler.ControlCenterDownstreamInputHandler">
<modelElementClass
modelElementClass="org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterDownstreamInput">
</modelElementClass>
</modelElementHandler>
<modelElementHandler
handler="org.fortiss.af3.platform.raspberry.ui.handler.ControlCenterUpstreamOutputHandler">
<modelElementClass
modelElementClass="org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterUpstreamOutput">
</modelElementClass>
</modelElementHandler>
<modelElementHandler <modelElementHandler
handler="org.fortiss.af3.platform.raspberry.ui.handler.PWMActuatorHandler"> handler="org.fortiss.af3.platform.raspberry.ui.handler.PWMActuatorHandler">
<modelElementClass <modelElementClass
......
RaspberryPiEditPartFactory.java f0997ba41908982c13eaeddf10d83a74d52dc570 YELLOW RaspberryPiEditPartFactory.java d0429302194e3669d3dfa0ac62847618b0d28436 YELLOW
...@@ -29,6 +29,8 @@ import org.fortiss.af3.platform.raspberry.model.camera.CameraDetectionStateRight ...@@ -29,6 +29,8 @@ import org.fortiss.af3.platform.raspberry.model.camera.CameraDetectionStateRight
import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceLeft; import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceLeft;
import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceRight; import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceRight;
import org.fortiss.af3.platform.raspberry.model.camera.CameraYawAngle; import org.fortiss.af3.platform.raspberry.model.camera.CameraYawAngle;
import org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterDownstreamInput;
import org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterUpstreamOutput;
import org.fortiss.af3.platform.raspberry.model.gamepad.GamepadReceiverBase; import org.fortiss.af3.platform.raspberry.model.gamepad.GamepadReceiverBase;
import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlInput; import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlInput;
import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlOutput; import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlOutput;
...@@ -71,7 +73,9 @@ public class RaspberryPiEditPartFactory implements IEditPartFactory { ...@@ -71,7 +73,9 @@ public class RaspberryPiEditPartFactory implements IEditPartFactory {
model instanceof MotorControlOutput || model instanceof CameraDistanceLeft || model instanceof MotorControlOutput || model instanceof CameraDistanceLeft ||
model instanceof CameraDistanceRight || model instanceof CameraYawAngle || model instanceof CameraDistanceRight || model instanceof CameraYawAngle ||
model instanceof CameraDetectionStateLeft || model instanceof CameraDetectionStateLeft ||
model instanceof CameraDetectionStateRight) { model instanceof CameraDetectionStateRight ||
model instanceof ControlCenterUpstreamOutput ||
model instanceof ControlCenterDownstreamInput) {
return new StickyPlatformConnectorUnitEditPart((PlatformConnectorUnit)model); return new StickyPlatformConnectorUnitEditPart((PlatformConnectorUnit)model);
} }
return null; return null;
......
...@@ -3,6 +3,8 @@ CameraInputHandler.java fd5eb60cc1b56cb8f3662c2207dc0ba37e20cb5f YELLOW ...@@ -3,6 +3,8 @@ CameraInputHandler.java fd5eb60cc1b56cb8f3662c2207dc0ba37e20cb5f YELLOW
CanBusHandler.java 5d4dbf229daec81e5eecc4ebfb8f8bc2680f2992 YELLOW CanBusHandler.java 5d4dbf229daec81e5eecc4ebfb8f8bc2680f2992 YELLOW
CanConnectorHandler.java 3eb2adf8ec6336269d66395025b7ac2050876a79 YELLOW CanConnectorHandler.java 3eb2adf8ec6336269d66395025b7ac2050876a79 YELLOW
ConsoleOutputHandler.java 364124b954ab0429425e9de71dbe0f7a99e499f9 YELLOW ConsoleOutputHandler.java 364124b954ab0429425e9de71dbe0f7a99e499f9 YELLOW
ControlCenterDownstreamInputHandler.java 5bea85b5228110c87728c0503348bc1e2d3ed370 YELLOW
ControlCenterUpstreamOutputHandler.java 27e8ecb75d11c1dd128572a6bae05ab811a5f67d YELLOW
GamepadReceiverHandler.java ff81c9f3e941ba8a2b880b3982f63f71f698569b YELLOW GamepadReceiverHandler.java ff81c9f3e941ba8a2b880b3982f63f71f698569b YELLOW
IconModelElementHandlerBase.java 1ebc38a537ec2c87fb7b031df5ddd53f10072af2 YELLOW IconModelElementHandlerBase.java 1ebc38a537ec2c87fb7b031df5ddd53f10072af2 YELLOW
MotorControlInputHandler.java b5d0f0627c7c14c1ed4cc1e36a761e938a5a4c9e YELLOW MotorControlInputHandler.java b5d0f0627c7c14c1ed4cc1e36a761e938a5a4c9e YELLOW
......
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui.handler;
import org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterDownstreamInput;
/** {@link IconModelElementHandlerBase} for {@link ControlCenterDownstreamInput}s. */
public class ControlCenterDownstreamInputHandler extends
IconModelElementHandlerBase<ControlCenterDownstreamInput> {
/** Constructor. */
public ControlCenterDownstreamInputHandler() {
super("icons/unknown.png");
}
}
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui.handler;
import org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterUpstreamOutput;
/** {@link IconModelElementHandlerBase} for {@link ControlCenterUpstreamOutput}s. */
public class ControlCenterUpstreamOutputHandler extends
IconModelElementHandlerBase<ControlCenterUpstreamOutput> {
/** Constructor. */
public ControlCenterUpstreamOutputHandler() {
super("icons/unknown.png");
}
}
ActuatorDigitsPropertySection.java c7cc5c1c4a9ef4077b2f4e3cdbae4928596df1ae YELLOW ActuatorDigitsPropertySection.java c7cc5c1c4a9ef4077b2f4e3cdbae4928596df1ae YELLOW
ActuatorPWMPropertySection.java 8a299c2096332c452dab56b703fb773c4b686667 YELLOW ActuatorPWMPropertySection.java 8a299c2096332c452dab56b703fb773c4b686667 YELLOW
BoundedIntPositiveZeroValidator.java b788927873db6f8f17f1affe45dc9877b8ec40aa YELLOW BoundedIntPositiveZeroValidator.java b788927873db6f8f17f1affe45dc9877b8ec40aa YELLOW
RaspberryPiExecutionUnitPropertySection.java b045a64d71975fe006699fd28833aa6a08fed1ec YELLOW RaspberryPiExecutionUnitPropertySection.java c296a2ba6edfaf361f3062897df3656aac2bcde2 YELLOW
UIDUnitPropertySection.java 93f1dfea011f61f42e284593169905b9c60abb22 YELLOW UIDUnitPropertySection.java 93f1dfea011f61f42e284593169905b9c60abb22 YELLOW
...@@ -49,6 +49,10 @@ public class RaspberryPiExecutionUnitPropertySection extends PropertySectionBase ...@@ -49,6 +49,10 @@ public class RaspberryPiExecutionUnitPropertySection extends PropertySectionBase
private Text cameraServerAddressText; private Text cameraServerAddressText;
/** The camera server IP port widget. */ /** The camera server IP port widget. */
private Text cameraServerPortText; private Text cameraServerPortText;
/** The control center server IP address widget. */
private Text ccAddressText;
/** The control center server IP port widget. */
private Text ccPortText;
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
...@@ -62,6 +66,8 @@ public class RaspberryPiExecutionUnitPropertySection extends PropertySectionBase ...@@ -62,6 +66,8 @@ public class RaspberryPiExecutionUnitPropertySection extends PropertySectionBase
ipAddressText = createDecoratedText("Unit IP Address"); ipAddressText = createDecoratedText("Unit IP Address");
cameraServerAddressText = createDecoratedText("Camera Server IP Address"); cameraServerAddressText = createDecoratedText("Camera Server IP Address");
cameraServerPortText = createDecoratedText("Camera Server IP Port"); cameraServerPortText = createDecoratedText("Camera Server IP Port");
ccAddressText = createDecoratedText("Control Center IP Address");
ccPortText = createDecoratedText("Control Center IP Port");
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
...@@ -105,5 +111,15 @@ public class RaspberryPiExecutionUnitPropertySection extends PropertySectionBase ...@@ -105,5 +111,15 @@ public class RaspberryPiExecutionUnitPropertySection extends PropertySectionBase
observeValue(unit, observeValue(unit,
RaspberryPiModelPackage.Literals.RASPBERRY_PI__CAMERA_SERVER_PORT); RaspberryPiModelPackage.Literals.RASPBERRY_PI__CAMERA_SERVER_PORT);
dbc.bindValue(observeText(cameraServerPortText, SWT.Modify), modelObservable); dbc.bindValue(observeText(cameraServerPortText, SWT.Modify), modelObservable);
modelObservable =
observeValue(unit,
RaspberryPiModelPackage.Literals.RASPBERRY_PI__CONTROLCENTER_SERVER_ADDRESS);
dbc.bindValue(observeText(ccAddressText, SWT.Modify), modelObservable);
modelObservable =
observeValue(unit,
RaspberryPiModelPackage.Literals.RASPBERRY_PI__CONTROLCENTER_SERVER_PORT);
dbc.bindValue(observeText(ccPortText, SWT.Modify), modelObservable);
} }
} }
ProtoypeProvider.java e718d04dddfc52ce41ea66ff98696e2aa1b5ea3f YELLOW ProtoypeProvider.java 914f35ea0411791ea345f5e274038d28e2a2ee62 YELLOW
...@@ -15,6 +15,63 @@ ...@@ -15,6 +15,63 @@
+--------------------------------------------------------------------------*/ +--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui.prototype; package org.fortiss.af3.platform.raspberry.ui.prototype;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createAccelerationXSensor;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createAccelerationYSensor;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createAccelerationZSensor;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createActuatorDigits;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createAngularVelocityXSensor;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createAngularVelocityYSensor;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createAngularVelocityZSensor;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createButton1;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createButton2;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createButton3;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createButton4;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createButtonL1;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createButtonL2;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createButtonR1;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createButtonR2;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createCameraDetectionStateLeft;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createCameraDetectionStateRight;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createCameraDistanceLeft;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createCameraDistanceRight;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createCameraYawAngle;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createControlCenterDownstreamInput;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createControlCenterUpstreamOutput;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createLEDButtonBActuator;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createLEDButtonGActuator;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createLEDButtonRActuator;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createLaserRangeSensor;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createLeftStickX;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createLeftStickY;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createMotorControlInput;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createMotorControlOutput;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRightStickX;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRightStickY;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleButtonA;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleButtonB;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleButtonHome;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleButtonL1;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleButtonL3;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleButtonR1;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleButtonR3;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleButtonSelect;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleButtonStart;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleButtonX;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleButtonY;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleDPadDown;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleDPadLeft;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleDPadRight;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleDPadUp;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleL2Position;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleLeftStickX;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleLeftStickY;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleMagnitudeStrong;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleMagnitudeWeak;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleR2Position;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleRightStickX;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleRightStickY;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createRumbleSimpleRumbleFeaturePosition;
import static org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory.createUltraSonicSensor;
import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_HEIGHT; import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_HEIGHT;
import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_WIDTH; import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_WIDTH;
import static org.fortiss.tooling.base.ui.utils.LayoutDataUIUtils.setConnectorPosition; import static org.fortiss.tooling.base.ui.utils.LayoutDataUIUtils.setConnectorPosition;
...@@ -44,6 +101,8 @@ import org.fortiss.af3.platform.raspberry.model.camera.CameraDetectionStateRight ...@@ -44,6 +101,8 @@ import org.fortiss.af3.platform.raspberry.model.camera.CameraDetectionStateRight
import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceLeft; import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceLeft;
import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceRight; import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceRight;
import org.fortiss.af3.platform.raspberry.model.camera.CameraYawAngle; import org.fortiss.af3.platform.raspberry.model.camera.CameraYawAngle;
import org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterDownstreamInput;
import org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterUpstreamOutput;
import org.fortiss.af3.platform.raspberry.model.gamepad.Button1; import org.fortiss.af3.platform.raspberry.model.gamepad.Button1;
import org.fortiss.af3.platform.raspberry.model.gamepad.Button2; import org.fortiss.af3.platform.raspberry.model.gamepad.Button2;
import org.fortiss.af3.platform.raspberry.model.gamepad.Button3; import org.fortiss.af3.platform.raspberry.model.gamepad.Button3;
...@@ -94,6 +153,8 @@ public class ProtoypeProvider extends PrototypeProviderBase { ...@@ -94,6 +153,8 @@ public class ProtoypeProvider extends PrototypeProviderBase {
protected final static String MOTOR_CONTROL = "Motor Control"; protected final static String MOTOR_CONTROL = "Motor Control";
/** Category for camera server elements. */ /** Category for camera server elements. */
protected final static String CAMERA_SERVER = "Camera Server"; protected final static String CAMERA_SERVER = "Camera Server";
/** Category for control center elements. */
protected final static String CONTROL_CENTER = "Control Center";
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
...@@ -106,6 +167,7 @@ public class ProtoypeProvider extends PrototypeProviderBase { ...@@ -106,6 +167,7 @@ public class ProtoypeProvider extends PrototypeProviderBase {
registerPrototypeCategory(prototypeCategory, BRICK); registerPrototypeCategory(prototypeCategory, BRICK);
registerPrototypeCategory(prototypeCategory, MOTOR_CONTROL); registerPrototypeCategory(prototypeCategory, MOTOR_CONTROL);
registerPrototypeCategory(prototypeCategory, CAMERA_SERVER); registerPrototypeCategory(prototypeCategory, CAMERA_SERVER);
registerPrototypeCategory(prototypeCategory, CONTROL_CENTER);
CanBus bus = RaspberryModelElementFactory.createCanBus(); CanBus bus = RaspberryModelElementFactory.createCanBus();
setNodeBounds(bus, setNodeBounds(bus,
...@@ -132,64 +194,78 @@ public class ProtoypeProvider extends PrototypeProviderBase { ...@@ -132,64 +194,78 @@ public class ProtoypeProvider extends PrototypeProviderBase {
registerMotorControlElements(); registerMotorControlElements();
registerCameraElements(); registerCameraElements();
registerGamepadElements(); registerGamepadElements();
registerControlCenterElements();
}
/** Register elements for control center. */
private void registerControlCenterElements() {
ControlCenterDownstreamInput input = createControlCenterDownstreamInput();
setNodePosition(input, 0, 0);
setConnectorPosition(input, 0, 0);
registerPrototype("CC Input", input, CONTROL_CENTER);
ControlCenterUpstreamOutput output = createControlCenterUpstreamOutput();
setNodePosition(output, 0, 0);
setConnectorPosition(output, 0, 0);
registerPrototype("CC Output", output, CONTROL_CENTER);
} }
/** Register brick actuators and sensors. */ /** Register brick actuators and sensors. */
private void registerBrickElements() { private void registerBrickElements() {
ActuatorDigits digits = RaspberryModelElementFactory.createActuatorDigits(); ActuatorDigits digits = createActuatorDigits();
setNodePosition(digits, 0, 0); setNodePosition(digits, 0, 0);
setConnectorPosition(digits, 0, 0); setConnectorPosition(digits, 0, 0);
registerPrototype("Segment_Digits", digits, BRICK); registerPrototype("Segment_Digits", digits, BRICK);
LEDButtonRActuator ledRButton = RaspberryModelElementFactory.createLEDButtonRActuator(); LEDButtonRActuator ledRButton = createLEDButtonRActuator();
setNodePosition(ledRButton, 0, 0); setNodePosition(ledRButton, 0, 0);
setConnectorPosition(ledRButton, 0, 0); setConnectorPosition(ledRButton, 0, 0);
registerPrototype("LED_Button_red", ledRButton, BRICK); registerPrototype("LED_Button_red", ledRButton, BRICK);
LEDButtonGActuator ledGButton = RaspberryModelElementFactory.createLEDButtonGActuator(); LEDButtonGActuator ledGButton = createLEDButtonGActuator();
setNodePosition(ledGButton, 0, 0); setNodePosition(ledGButton, 0, 0);
setConnectorPosition(ledGButton, 0, 0); setConnectorPosition(ledGButton, 0, 0);
registerPrototype("LED_Button_green", ledGButton, BRICK); registerPrototype("LED_Button_green", ledGButton, BRICK);
LEDButtonBActuator ledBButton = RaspberryModelElementFactory.createLEDButtonBActuator(); LEDButtonBActuator ledBButton = createLEDButtonBActuator();
setNodePosition(ledBButton, 0, 0); setNodePosition(ledBButton, 0, 0);
setConnectorPosition(ledBButton, 0, 0); setConnectorPosition(ledBButton, 0, 0);
registerPrototype("LED_Button_blue", ledBButton, BRICK); registerPrototype("LED_Button_blue", ledBButton, BRICK);
UltraSonicSensor uss = RaspberryModelElementFactory.createUltraSonicSensor(); UltraSonicSensor uss = createUltraSonicSensor();
setNodePosition(uss, 0, 0); setNodePosition(uss, 0, 0);
setConnectorPosition(uss, 0, 0); setConnectorPosition(uss, 0, 0);
registerPrototype(uss.getName(), uss, BRICK); registerPrototype(uss.getName(), uss, BRICK);
LaserRangeSensor lsr = RaspberryModelElementFactory.createLaserRangeSensor(); LaserRangeSensor lsr = createLaserRangeSensor();
setNodePosition(lsr, 0, 0); setNodePosition(lsr, 0, 0);
setConnectorPosition(lsr, 0, 0); setConnectorPosition(lsr, 0, 0);
registerPrototype(lsr.getName(), lsr, BRICK); registerPrototype(lsr.getName(), lsr, BRICK);
AccelerationXSensor accX = RaspberryModelElementFactory.createAccelerationXSensor(); AccelerationXSensor accX = createAccelerationXSensor();
setNodePosition(accX, 0, 0); setNodePosition(accX, 0, 0);
setConnectorPosition(accX, 0, 0); setConnectorPosition(accX, 0, 0);
registerPrototype(accX.getName(), accX, BRICK); registerPrototype(accX.getName(), accX, BRICK);
AccelerationYSensor accY = RaspberryModelElementFactory.createAccelerationYSensor(); AccelerationYSensor accY = createAccelerationYSensor();
setNodePosition(accY, 0, 0); setNodePosition(accY, 0, 0);
setConnectorPosition(accY, 0, 0); setConnectorPosition(accY, 0, 0);
registerPrototype(accY.getName(), accY, BRICK); registerPrototype(accY.getName(), accY, BRICK);
AccelerationZSensor accZ = RaspberryModelElementFactory.createAccelerationZSensor(); AccelerationZSensor accZ = createAccelerationZSensor();
setNodePosition(accZ, 0, 0); setNodePosition(accZ, 0, 0);
setConnectorPosition(accZ, 0, 0); setConnectorPosition(accZ, 0, 0);
registerPrototype(accZ.getName(), accZ, BRICK); registerPrototype(accZ.getName(), accZ, BRICK);
AngularVelocityXSensor avX = RaspberryModelElementFactory.createAngularVelocityXSensor(); AngularVelocityXSensor avX = createAngularVelocityXSensor();
setNodePosition(avX, 0, 0); setNodePosition(avX, 0, 0);
setConnectorPosition(avX, 0, 0); setConnectorPosition(avX, 0, 0);
registerPrototype(avX.getName(), avX, BRICK); registerPrototype(avX.getName(), avX, BRICK);
AngularVelocityYSensor avY = RaspberryModelElementFactory.createAngularVelocityYSensor(); AngularVelocityYSensor avY = createAngularVelocityYSensor();
setNodePosition(avY, 0, 0); setNodePosition(avY, 0, 0);
setConnectorPosition(avY, 0, 0); setConnectorPosition(avY, 0, 0);
registerPrototype(avY.getName(), avY, BRICK); registerPrototype(avY.getName(), avY, BRICK);
AngularVelocityZSensor avZ = RaspberryModelElementFactory.createAngularVelocityZSensor(); AngularVelocityZSensor avZ = createAngularVelocityZSensor();
setNodePosition(avZ, 0, 0); setNodePosition(avZ, 0, 0);
setConnectorPosition(avZ, 0, 0); setConnectorPosition(avZ, 0, 0);
registerPrototype(avZ.getName(), avZ, BRICK); registerPrototype(avZ.getName(), avZ, BRICK);
...@@ -198,7 +274,7 @@ public class ProtoypeProvider extends PrototypeProviderBase { ...@@ -198,7 +274,7 @@ public class ProtoypeProvider extends PrototypeProviderBase {
/** Register rumblepad elements. */ /** Register rumblepad elements. */
private void registerRumblepadElements() { private void registerRumblepadElements() {
org.fortiss.af3.platform.raspberry.model.rumblepad.Left_StickX_Position rplsx = org.fortiss.af3.platform.raspberry.model.rumblepad.Left_StickX_Position rplsx =
RaspberryModelElementFactory.createRumbleLeftStickX(); createRumbleLeftStickX();
setNodePosition(rplsx, 0, 0); setNodePosition(rplsx, 0, 0);
setConnectorPosition(rplsx, 0, 0); setConnectorPosition(rplsx, 0, 0);
registerPrototype(rplsx.getName(), rplsx, RUMBLEPAD); registerPrototype(rplsx.getName(), rplsx, RUMBLEPAD);
...@@ -209,75 +285,72 @@ public class ProtoypeProvider extends PrototypeProviderBase { ...@@ -209,75 +285,72 @@ public class ProtoypeProvider extends PrototypeProviderBase {
/** Register rumblepad buttons. */ /** Register rumblepad buttons. */
private void registerRumblepadButtons() { private void registerRumblepadButtons() {
org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonL1 rpl1 = org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonL1 rpl1 = createRumbleButtonL1();
RaspberryModelElementFactory.createRumbleButtonL1();
setNodePosition(rpl1, 0, 0); setNodePosition(rpl1, 0, 0);
setConnectorPosition(rpl1, 0, 0); setConnectorPosition(rpl1, 0, 0);
registerPrototype(rpl1.getName(), rpl1, RUMBLEPAD); registerPrototype(rpl1.getName(), rpl1, RUMBLEPAD);
org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonR1 rpr1 = org.fortiss.af3.platform.raspberry.model.rumblepad.ButtonR1 rpr1 = createRumbleButtonR1();
RaspberryModelElementFactory.createRumbleButtonR1();
setNodePosition(rpr1, 0, 0); setNodePosition(rpr1, 0, 0);
setConnectorPosition(rpr1, 0, 0); setConnectorPosition(rpr1, 0, 0);
registerPrototype(rpr1.getName(), rpr1, RUMBLEPAD); registerPrototype(rpr1.getName(), rpr1, RUMBLEPAD);
L2_Position rpl2 = RaspberryModelElementFactory.createRumbleL2Position(); L2_Position rpl2 = createRumbleL2Position();
setNodePosition(rpl2, 0, 0); setNodePosition(rpl2, 0, 0);
setConnectorPosition(rpl2, 0, 0); setConnectorPosition(rpl2, 0, 0);
registerPrototype(rpl2.getName(), rpl2, RUMBLEPAD); registerPrototype(rpl2.getName(), rpl2, RUMBLEPAD);
R2_Position rpr2 = RaspberryModelElementFactory.createRumbleR2Position(); R2_Position rpr2 = createRumbleR2Position();
setNodePosition(rpr2, 0, 0); setNodePosition(rpr2, 0, 0);
setConnectorPosition(rpr2, 0, 0); setConnectorPosition(rpr2, 0, 0);
registerPrototype(rpr2.getName(), rpr2, RUMBLEPAD); registerPrototype(rpr2.getName(), rpr2, RUMBLEPAD);
ButtonA rpba = RaspberryModelElementFactory.createRumbleButtonA(); ButtonA rpba = createRumbleButtonA();
setNodePosition(rpba, 0, 0); setNodePosition(rpba, 0, 0);
setConnectorPosition(rpba, 0, 0); setConnectorPosition(rpba, 0, 0);
registerPrototype(rpba.getName(), rpba, RUMBLEPAD); registerPrototype(rpba.getName(), rpba, RUMBLEPAD);
ButtonB rpbb = RaspberryModelElementFactory.createRumbleButtonB(); ButtonB rpbb = createRumbleButtonB();
setNodePosition(rpbb, 0, 0); setNodePosition(rpbb, 0, 0);
setConnectorPosition(rpbb, 0, 0); setConnectorPosition(rpbb, 0, 0);
registerPrototype(rpbb.getName(), rpbb, RUMBLEPAD); registerPrototype(rpbb.getName(), rpbb, RUMBLEPAD);
ButtonX rpbx = RaspberryModelElementFactory.createRumbleButtonX(); ButtonX rpbx = createRumbleButtonX();
setNodePosition(rpbx, 0, 0); setNodePosition(rpbx, 0, 0);
setConnectorPosition(rpbx, 0, 0); setConnectorPosition(rpbx, 0, 0);
registerPrototype(rpbx.getName(), rpbx, RUMBLEPAD); registerPrototype(rpbx.getName(), rpbx, RUMBLEPAD);
ButtonY rpby = RaspberryModelElementFactory.createRumbleButtonY(); ButtonY rpby = createRumbleButtonY();
setNodePosition(rpby, 0, 0); setNodePosition(rpby, 0, 0);
setConnectorPosition(rpby, 0, 0); setConnectorPosition(rpby, 0, 0);
registerPrototype(rpby.getName(), rpby, RUMBLEPAD); registerPrototype(rpby.getName(), rpby, RUMBLEPAD);
ButtonStart rpbst = RaspberryModelElementFactory.createRumbleButtonStart(); ButtonStart rpbst = createRumbleButtonStart();
setNodePosition(rpbst, 0, 0); setNodePosition(rpbst, 0, 0);
setConnectorPosition(rpbst, 0, 0); setConnectorPosition(rpbst, 0, 0);
registerPrototype(rpbst.getName(), rpbst, RUMBLEPAD); registerPrototype(rpbst.getName(), rpbst, RUMBLEPAD);
ButtonSelect rpbse = RaspberryModelElementFactory.createRumbleButtonSelect(); ButtonSelect rpbse = createRumbleButtonSelect();
setNodePosition(rpbse, 0, 0); setNodePosition(rpbse, 0, 0);
setConnectorPosition(rpbse, 0, 0); setConnectorPosition(rpbse, 0, 0);
registerPrototype(rpbse.getName(), rpbse, RUMBLEPAD); registerPrototype(rpbse.getName(), rpbse, RUMBLEPAD);
ButtonHome rpbh = RaspberryModelElementFactory.createRumbleButtonHome(); ButtonHome rpbh = createRumbleButtonHome();
setNodePosition(rpbh, 0, 0); setNodePosition(rpbh, 0, 0);
setConnectorPosition(rpbh, 0, 0); setConnectorPosition(rpbh, 0, 0);
registerPrototype(rpbh.getName(), rpbh, RUMBLEPAD); registerPrototype(rpbh.getName(), rpbh, RUMBLEPAD);
SimpleRumbleFeature srf = SimpleRumbleFeature srf = createRumbleSimpleRumbleFeaturePosition();
RaspberryModelElementFactory.createRumbleSimpleRumbleFeaturePosition();
setNodePosition(srf, 0, 0); setNodePosition(srf, 0, 0);
setConnectorPosition(srf, 0, 0); setConnectorPosition(srf, 0, 0);
registerPrototype(srf.getName(), srf, RUMBLEPAD); registerPrototype(srf.getName(), srf, RUMBLEPAD);
RumbleMagnitudeStrong rms = RaspberryModelElementFactory.createRumbleMagnitudeStrong(); RumbleMagnitudeStrong rms = createRumbleMagnitudeStrong();
setNodePosition(rms, 0, 0); setNodePosition(rms, 0, 0);
setConnectorPosition(rms, 0, 0); setConnectorPosition(rms, 0, 0);
registerPrototype(rms.getName(), rms, RUMBLEPAD); registerPrototype(rms.getName(), rms, RUMBLEPAD);
RumbleMagnitudeWeak rmw = RaspberryModelElementFactory.createRumbleMagnitudeWeak(); RumbleMagnitudeWeak rmw = createRumbleMagnitudeWeak();
setNodePosition(rmw, 0, 0); setNodePosition(rmw, 0, 0);
setConnectorPosition(rmw, 0, 0); setConnectorPosition(rmw, 0, 0);
registerPrototype(rmw.getName(), rmw, RUMBLEPAD); registerPrototype(rmw.getName(), rmw, RUMBLEPAD);
...@@ -286,49 +359,49 @@ public class ProtoypeProvider extends PrototypeProviderBase { ...@@ -286,49 +359,49 @@ public class ProtoypeProvider extends PrototypeProviderBase {
/** Register rumblepad sticks and D-pad. */ /** Register rumblepad sticks and D-pad. */
private void registerRumblepadSticks() { private void registerRumblepadSticks() {
org.fortiss.af3.platform.raspberry.model.rumblepad.Left_StickY_Position rplsy = org.fortiss.af3.platform.raspberry.model.rumblepad.Left_StickY_Position rplsy =
RaspberryModelElementFactory.createRumbleLeftStickY(); createRumbleLeftStickY();
setNodePosition(rplsy, 0, 0); setNodePosition(rplsy, 0, 0);
setConnectorPosition(rplsy, 0, 0); setConnectorPosition(rplsy, 0, 0);
registerPrototype(rplsy.getName(), rplsy, RUMBLEPAD); registerPrototype(rplsy.getName(), rplsy, RUMBLEPAD);
org.fortiss.af3.platform.raspberry.model.rumblepad.Right_StickX_Position rprsx = org.fortiss.af3.platform.raspberry.model.rumblepad.Right_StickX_Position rprsx =
RaspberryModelElementFactory.createRumbleRightStickX(); createRumbleRightStickX();
setNodePosition(rprsx, 0, 0); setNodePosition(rprsx, 0, 0);
setConnectorPosition(rprsx, 0, 0); setConnectorPosition(rprsx, 0, 0);
registerPrototype(rprsx.getName(), rprsx, RUMBLEPAD); registerPrototype(rprsx.getName(), rprsx, RUMBLEPAD);
org.fortiss.af3.platform.raspberry.model.rumblepad.Right_StickY_Position rprsy = org.fortiss.af3.platform.raspberry.model.rumblepad.Right_StickY_Position rprsy =
RaspberryModelElementFactory.createRumbleRightStickY(); createRumbleRightStickY();
setNodePosition(rprsy, 0, 0); setNodePosition(rprsy, 0, 0);
setConnectorPosition(rprsy, 0, 0); setConnectorPosition(rprsy, 0, 0);
registerPrototype(rprsy.getName(), rprsy, RUMBLEPAD); registerPrototype(rprsy.getName(), rprsy, RUMBLEPAD);
DPadUp rpdpu = RaspberryModelElementFactory.createRumbleDPadUp(); DPadUp rpdpu = createRumbleDPadUp();
setNodePosition(rpdpu, 0, 0); setNodePosition(rpdpu, 0, 0);
setConnectorPosition(rpdpu, 0, 0); setConnectorPosition(rpdpu, 0, 0);
registerPrototype(rpdpu.getName(), rpdpu, RUMBLEPAD); registerPrototype(rpdpu.getName(), rpdpu, RUMBLEPAD);
DPadDown rpdpd = RaspberryModelElementFactory.createRumbleDPadDown(); DPadDown rpdpd = createRumbleDPadDown();
setNodePosition(rpdpd, 0, 0); setNodePosition(rpdpd, 0, 0);
setConnectorPosition(rpdpd, 0, 0); setConnectorPosition(rpdpd, 0, 0);
registerPrototype(rpdpd.getName(), rpdpd, RUMBLEPAD); registerPrototype(rpdpd.getName(), rpdpd, RUMBLEPAD);
DPadLeft rpdpl = RaspberryModelElementFactory.createRumbleDPadLeft(); DPadLeft rpdpl = createRumbleDPadLeft();
setNodePosition(rpdpl, 0, 0); setNodePosition(rpdpl, 0, 0);
setConnectorPosition(rpdpl, 0, 0); setConnectorPosition(rpdpl, 0, 0);
registerPrototype(rpdpl.getName(), rpdpl, RUMBLEPAD); registerPrototype(rpdpl.getName(), rpdpl, RUMBLEPAD);
DPadRight rpdpr = RaspberryModelElementFactory.createRumbleDPadRight(); DPadRight rpdpr = createRumbleDPadRight();
setNodePosition(rpdpr, 0, 0); setNodePosition(rpdpr, 0, 0);
setConnectorPosition(rpdpr, 0, 0); setConnectorPosition(rpdpr, 0, 0);
registerPrototype(rpdpr.getName(), rpdpr, RUMBLEPAD); registerPrototype(rpdpr.getName(), rpdpr, RUMBLEPAD);
ButtonL3 rpl3 = RaspberryModelElementFactory.createRumbleButtonL3(); ButtonL3 rpl3 = createRumbleButtonL3();
setNodePosition(rpl3, 0, 0); setNodePosition(rpl3, 0, 0);
setConnectorPosition(rpl3, 0, 0); setConnectorPosition(rpl3, 0, 0);
registerPrototype(rpl3.getName(), rpl3, RUMBLEPAD); registerPrototype(rpl3.getName(), rpl3, RUMBLEPAD);
ButtonR3 rpr3 = RaspberryModelElementFactory.createRumbleButtonR3(); ButtonR3 rpr3 = createRumbleButtonR3();
setNodePosition(rpr3, 0, 0); setNodePosition(rpr3, 0, 0);
setConnectorPosition(rpr3, 0, 0); setConnectorPosition(rpr3, 0, 0);
registerPrototype(rpr3.getName(), rpr3, RUMBLEPAD); registerPrototype(rpr3.getName(), rpr3, RUMBLEPAD);
...@@ -336,12 +409,12 @@ public class ProtoypeProvider extends PrototypeProviderBase { ...@@ -336,12 +409,12 @@ public class ProtoypeProvider extends PrototypeProviderBase {
/** Register motor controller elements. */ /** Register motor controller elements. */
private void registerMotorControlElements() { private void registerMotorControlElements() {
MotorControlInput mci = RaspberryModelElementFactory.createMotorControlInput(); MotorControlInput mci = createMotorControlInput();
setNodePosition(mci, 0, 0); setNodePosition(mci, 0, 0);
setConnectorPosition(mci, 0, 0); setConnectorPosition(mci, 0, 0);
registerPrototype(mci.getName(), mci, MOTOR_CONTROL); registerPrototype(mci.getName(), mci, MOTOR_CONTROL);
MotorControlOutput mco = RaspberryModelElementFactory.createMotorControlOutput(); MotorControlOutput mco = createMotorControlOutput();
setNodePosition(mco, 0, 0); setNodePosition(mco, 0, 0);
setConnectorPosition(mco, 0, 0); setConnectorPosition(mco, 0, 0);
registerPrototype(mco.getName(), mco, MOTOR_CONTROL); registerPrototype(mco.getName(), mco, MOTOR_CONTROL);
...@@ -349,29 +422,27 @@ public class ProtoypeProvider extends PrototypeProviderBase { ...@@ -349,29 +422,27 @@ public class ProtoypeProvider extends PrototypeProviderBase {
/** Register camera elements. */ /** Register camera elements. */
private void registerCameraElements() { private void registerCameraElements() {
CameraDistanceLeft cdl = RaspberryModelElementFactory.createCameraDistanceLeft(); CameraDistanceLeft cdl = createCameraDistanceLeft();
setNodePosition(cdl, 0, 0); setNodePosition(cdl, 0, 0);
setConnectorPosition(cdl, 0, 0); setConnectorPosition(cdl, 0, 0);
registerPrototype(cdl.getName(), cdl, CAMERA_SERVER); registerPrototype(cdl.getName(), cdl, CAMERA_SERVER);
CameraDistanceRight cdr = RaspberryModelElementFactory.createCameraDistanceRight(); CameraDistanceRight cdr = createCameraDistanceRight();
setNodePosition(cdr, 0, 0); setNodePosition(cdr, 0, 0);
setConnectorPosition(cdr, 0, 0); setConnectorPosition(cdr, 0, 0);
registerPrototype(cdr.getName(), cdr, CAMERA_SERVER); registerPrototype(cdr.getName(), cdr, CAMERA_SERVER);
CameraDetectionStateLeft cdsl = CameraDetectionStateLeft cdsl = createCameraDetectionStateLeft();
RaspberryModelElementFactory.createCameraDetectionStateLeft();
setNodePosition(cdsl, 0, 0); setNodePosition(cdsl, 0, 0);
setConnectorPosition(cdsl, 0, 0); setConnectorPosition(cdsl, 0, 0);
registerPrototype(cdsl.getName(), cdsl, CAMERA_SERVER); registerPrototype(cdsl.getName(), cdsl, CAMERA_SERVER);
CameraDetectionStateRight cdsr = CameraDetectionStateRight cdsr = createCameraDetectionStateRight();
RaspberryModelElementFactory.createCameraDetectionStateRight();
setNodePosition(cdsr, 0, 0); setNodePosition(cdsr, 0, 0);
setConnectorPosition(cdsr, 0, 0); setConnectorPosition(cdsr, 0, 0);
registerPrototype(cdsr.getName(), cdsr, CAMERA_SERVER); registerPrototype(cdsr.getName(), cdsr, CAMERA_SERVER);
CameraYawAngle cya = RaspberryModelElementFactory.createCameraYawAngle(); CameraYawAngle cya = createCameraYawAngle();
setNodePosition(cya, 0, 0); setNodePosition(cya, 0, 0);
setConnectorPosition(cya, 0, 0); setConnectorPosition(cya, 0, 0);
registerPrototype(cya.getName(), cya, CAMERA_SERVER); registerPrototype(cya.getName(), cya, CAMERA_SERVER);
...@@ -379,62 +450,62 @@ public class ProtoypeProvider extends PrototypeProviderBase { ...@@ -379,62 +450,62 @@ public class ProtoypeProvider extends PrototypeProviderBase {
/** Register gamepad elements. */ /** Register gamepad elements. */
private void registerGamepadElements() { private void registerGamepadElements() {
Button1 button1 = RaspberryModelElementFactory.createButton1(); Button1 button1 = createButton1();
setNodePosition(button1, 0, 0); setNodePosition(button1, 0, 0);
setConnectorPosition(button1, 0, 0); setConnectorPosition(button1, 0, 0);
registerPrototype(button1.getName(), button1, GAMEPAD); registerPrototype(button1.getName(), button1, GAMEPAD);
Button2 button2 = RaspberryModelElementFactory.createButton2(); Button2 button2 = createButton2();
setNodePosition(button2, 0, 0); setNodePosition(button2, 0, 0);
setConnectorPosition(button2, 0, 0); setConnectorPosition(button2, 0, 0);
registerPrototype(button2.getName(), button2, GAMEPAD); registerPrototype(button2.getName(), button2, GAMEPAD);
Button3 button3 = RaspberryModelElementFactory.createButton3(); Button3 button3 = createButton3();
setNodePosition(button3, 0, 0); setNodePosition(button3, 0, 0);
setConnectorPosition(button3, 0, 0); setConnectorPosition(button3, 0, 0);
registerPrototype(button3.getName(), button3, GAMEPAD); registerPrototype(button3.getName(), button3, GAMEPAD);
Button4 button4 = RaspberryModelElementFactory.createButton4(); Button4 button4 = createButton4();
setNodePosition(button4, 0, 0); setNodePosition(button4, 0, 0);
setConnectorPosition(button4, 0, 0); setConnectorPosition(button4, 0, 0);
registerPrototype(button4.getName(), button4, GAMEPAD); registerPrototype(button4.getName(), button4, GAMEPAD);
ButtonL1 buttonL1 = RaspberryModelElementFactory.createButtonL1(); ButtonL1 buttonL1 = createButtonL1();
setNodePosition(buttonL1, 0, 0); setNodePosition(buttonL1, 0, 0);
setConnectorPosition(buttonL1, 0, 0); setConnectorPosition(buttonL1, 0, 0);
registerPrototype(buttonL1.getName(), buttonL1, GAMEPAD); registerPrototype(buttonL1.getName(), buttonL1, GAMEPAD);
ButtonL2 buttonL2 = RaspberryModelElementFactory.createButtonL2(); ButtonL2 buttonL2 = createButtonL2();
setNodePosition(buttonL2, 0, 0); setNodePosition(buttonL2, 0, 0);
setConnectorPosition(buttonL2, 0, 0); setConnectorPosition(buttonL2, 0, 0);
registerPrototype(buttonL2.getName(), buttonL2, GAMEPAD); registerPrototype(buttonL2.getName(), buttonL2, GAMEPAD);
ButtonR1 buttonR1 = RaspberryModelElementFactory.createButtonR1(); ButtonR1 buttonR1 = createButtonR1();
setNodePosition(buttonR1, 0, 0); setNodePosition(buttonR1, 0, 0);
setConnectorPosition(buttonR1, 0, 0); setConnectorPosition(buttonR1, 0, 0);
registerPrototype(buttonR1.getName(), buttonR1, GAMEPAD); registerPrototype(buttonR1.getName(), buttonR1, GAMEPAD);
ButtonR2 buttonR2 = RaspberryModelElementFactory.createButtonR2(); ButtonR2 buttonR2 = createButtonR2();
setNodePosition(buttonR2, 0, 0); setNodePosition(buttonR2, 0, 0);
setConnectorPosition(buttonR2, 0, 0); setConnectorPosition(buttonR2, 0, 0);
registerPrototype(buttonR2.getName(), buttonR2, GAMEPAD); registerPrototype(buttonR2.getName(), buttonR2, GAMEPAD);
Left_StickX_Position Left_StickX = RaspberryModelElementFactory.createLeftStickX(); Left_StickX_Position Left_StickX = createLeftStickX();
setNodePosition(Left_StickX, 0, 0); setNodePosition(Left_StickX, 0, 0);
setConnectorPosition(Left_StickX, 0, 0); setConnectorPosition(Left_StickX, 0, 0);
registerPrototype(Left_StickX.getName(), Left_StickX, GAMEPAD); registerPrototype(Left_StickX.getName(), Left_StickX, GAMEPAD);
Left_StickY_Position Left_StickY = RaspberryModelElementFactory.createLeftStickY(); Left_StickY_Position Left_StickY = createLeftStickY();
setNodePosition(Left_StickY, 0, 0); setNodePosition(Left_StickY, 0, 0);
setConnectorPosition(Left_StickY, 0, 0); setConnectorPosition(Left_StickY, 0, 0);
registerPrototype(Left_StickY.getName(), Left_StickY, GAMEPAD); registerPrototype(Left_StickY.getName(), Left_StickY, GAMEPAD);
Right_StickX_Position Right_StickX = RaspberryModelElementFactory.createRightStickX(); Right_StickX_Position Right_StickX = createRightStickX();
setNodePosition(Right_StickX, 0, 0); setNodePosition(Right_StickX, 0, 0);
setConnectorPosition(Right_StickX, 0, 0); setConnectorPosition(Right_StickX, 0, 0);
registerPrototype(Right_StickX.getName(), Right_StickX, GAMEPAD); registerPrototype(Right_StickX.getName(), Right_StickX, GAMEPAD);
Right_StickY_Position Right_StickY = RaspberryModelElementFactory.createRightStickY(); Right_StickY_Position Right_StickY = createRightStickY();
setNodePosition(Right_StickY, 0, 0); setNodePosition(Right_StickY, 0, 0);
setConnectorPosition(Right_StickY, 0, 0); setConnectorPosition(Right_StickY, 0, 0);
registerPrototype(Right_StickY.getName(), Right_StickY, GAMEPAD); registerPrototype(Right_StickY.getName(), Right_StickY, GAMEPAD);
......
...@@ -14,6 +14,9 @@ Export-Package: org.fortiss.af3.platform.raspberry.model, ...@@ -14,6 +14,9 @@ Export-Package: org.fortiss.af3.platform.raspberry.model,
org.fortiss.af3.platform.raspberry.model.camera, org.fortiss.af3.platform.raspberry.model.camera,
org.fortiss.af3.platform.raspberry.model.camera.impl, org.fortiss.af3.platform.raspberry.model.camera.impl,
org.fortiss.af3.platform.raspberry.model.camera.util, org.fortiss.af3.platform.raspberry.model.camera.util,
org.fortiss.af3.platform.raspberry.model.controlcenter,
org.fortiss.af3.platform.raspberry.model.controlcenter.impl,
org.fortiss.af3.platform.raspberry.model.controlcenter.util,
org.fortiss.af3.platform.raspberry.model.gamepad, org.fortiss.af3.platform.raspberry.model.gamepad,
org.fortiss.af3.platform.raspberry.model.gamepad.impl, org.fortiss.af3.platform.raspberry.model.gamepad.impl,
org.fortiss.af3.platform.raspberry.model.gamepad.util, org.fortiss.af3.platform.raspberry.model.gamepad.util,
......
CanBusCompositor.java 04d8d8b5276fe06dfd1222b54de90ead680d4b6c YELLOW CanBusCompositor.java 04d8d8b5276fe06dfd1222b54de90ead680d4b6c YELLOW
CanToRaspberryCompositor.java 269e6b0dcfbbb5d0da72e199704e768f50651073 YELLOW CanToRaspberryCompositor.java 269e6b0dcfbbb5d0da72e199704e768f50651073 YELLOW
RaspberryPiCompositor.java 64e7a786367efbec47ee9af65cebaf98fed2db3f YELLOW RaspberryPiCompositor.java c54e0128e71e3ba9e3f7222bfd8f65c420dfd303 YELLOW
RaspberryToCanCompositor.java 2552acc59eb5a7381c60b3c40d32978c96f409b0 YELLOW RaspberryToCanCompositor.java 2552acc59eb5a7381c60b3c40d32978c96f409b0 YELLOW
...@@ -41,6 +41,8 @@ import org.fortiss.af3.platform.raspberry.model.camera.CameraDetectionStateRight ...@@ -41,6 +41,8 @@ import org.fortiss.af3.platform.raspberry.model.camera.CameraDetectionStateRight
import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceLeft; import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceLeft;
import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceRight; import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceRight;
import org.fortiss.af3.platform.raspberry.model.camera.CameraYawAngle; import org.fortiss.af3.platform.raspberry.model.camera.CameraYawAngle;
import org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterDownstreamInput;
import org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterUpstreamOutput;
import org.fortiss.af3.platform.raspberry.model.gamepad.GamepadReceiverBase; import org.fortiss.af3.platform.raspberry.model.gamepad.GamepadReceiverBase;
import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlInput; import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlInput;
import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlOutput; import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlOutput;
...@@ -84,7 +86,8 @@ public class RaspberryPiCompositor extends ...@@ -84,7 +86,8 @@ public class RaspberryPiCompositor extends
RumbleMagnitudeWeak.class, MotorControlInput.class, RumbleMagnitudeWeak.class, MotorControlInput.class,
MotorControlOutput.class, CameraDistanceLeft.class, MotorControlOutput.class, CameraDistanceLeft.class,
CameraDistanceRight.class, CameraYawAngle.class, CameraDistanceRight.class, CameraYawAngle.class,
CameraDetectionStateLeft.class, CameraDetectionStateRight.class); CameraDetectionStateLeft.class, CameraDetectionStateRight.class,
ControlCenterDownstreamInput.class, ControlCenterUpstreamOutput.class);
if(container != null) { if(container != null) {
final boolean instanceOfAny = isInstanceOfAny(container, RaspberryPi.class); final boolean instanceOfAny = isInstanceOfAny(container, RaspberryPi.class);
return instanceOfAny && instanceOfAny2; return instanceOfAny && instanceOfAny2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment