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 @@
<modelElementClass
modelElementClass="org.fortiss.af3.platform.raspberry.model.brick.UIDUnit">
</modelElementClass>
<modelElementClass
modelElementClass="org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterDownstreamInput">
</modelElementClass>
<modelElementClass
modelElementClass="org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterUpstreamOutput">
</modelElementClass>
</editPartFactory>
</extension>
<extension
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
handler="org.fortiss.af3.platform.raspberry.ui.handler.PWMActuatorHandler">
<modelElementClass
......
RaspberryPiEditPartFactory.java f0997ba41908982c13eaeddf10d83a74d52dc570 YELLOW
RaspberryPiEditPartFactory.java d0429302194e3669d3dfa0ac62847618b0d28436 YELLOW
......@@ -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.CameraDistanceRight;
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.motorcontrol.MotorControlInput;
import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlOutput;
......@@ -71,7 +73,9 @@ public class RaspberryPiEditPartFactory implements IEditPartFactory {
model instanceof MotorControlOutput || model instanceof CameraDistanceLeft ||
model instanceof CameraDistanceRight || model instanceof CameraYawAngle ||
model instanceof CameraDetectionStateLeft ||
model instanceof CameraDetectionStateRight) {
model instanceof CameraDetectionStateRight ||
model instanceof ControlCenterUpstreamOutput ||
model instanceof ControlCenterDownstreamInput) {
return new StickyPlatformConnectorUnitEditPart((PlatformConnectorUnit)model);
}
return null;
......
......@@ -3,6 +3,8 @@ CameraInputHandler.java fd5eb60cc1b56cb8f3662c2207dc0ba37e20cb5f YELLOW
CanBusHandler.java 5d4dbf229daec81e5eecc4ebfb8f8bc2680f2992 YELLOW
CanConnectorHandler.java 3eb2adf8ec6336269d66395025b7ac2050876a79 YELLOW
ConsoleOutputHandler.java 364124b954ab0429425e9de71dbe0f7a99e499f9 YELLOW
ControlCenterDownstreamInputHandler.java 5bea85b5228110c87728c0503348bc1e2d3ed370 YELLOW
ControlCenterUpstreamOutputHandler.java 27e8ecb75d11c1dd128572a6bae05ab811a5f67d YELLOW
GamepadReceiverHandler.java ff81c9f3e941ba8a2b880b3982f63f71f698569b YELLOW
IconModelElementHandlerBase.java 1ebc38a537ec2c87fb7b031df5ddd53f10072af2 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
ActuatorPWMPropertySection.java 8a299c2096332c452dab56b703fb773c4b686667 YELLOW
BoundedIntPositiveZeroValidator.java b788927873db6f8f17f1affe45dc9877b8ec40aa YELLOW
RaspberryPiExecutionUnitPropertySection.java b045a64d71975fe006699fd28833aa6a08fed1ec YELLOW
RaspberryPiExecutionUnitPropertySection.java c296a2ba6edfaf361f3062897df3656aac2bcde2 YELLOW
UIDUnitPropertySection.java 93f1dfea011f61f42e284593169905b9c60abb22 YELLOW
......@@ -49,6 +49,10 @@ public class RaspberryPiExecutionUnitPropertySection extends PropertySectionBase
private Text cameraServerAddressText;
/** The camera server IP port widget. */
private Text cameraServerPortText;
/** The control center server IP address widget. */
private Text ccAddressText;
/** The control center server IP port widget. */
private Text ccPortText;
/** {@inheritDoc} */
@Override
......@@ -62,6 +66,8 @@ public class RaspberryPiExecutionUnitPropertySection extends PropertySectionBase
ipAddressText = createDecoratedText("Unit IP Address");
cameraServerAddressText = createDecoratedText("Camera Server IP Address");
cameraServerPortText = createDecoratedText("Camera Server IP Port");
ccAddressText = createDecoratedText("Control Center IP Address");
ccPortText = createDecoratedText("Control Center IP Port");
}
/** {@inheritDoc} */
......@@ -105,5 +111,15 @@ public class RaspberryPiExecutionUnitPropertySection extends PropertySectionBase
observeValue(unit,
RaspberryPiModelPackage.Literals.RASPBERRY_PI__CAMERA_SERVER_PORT);
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
......@@ -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.impl,
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.impl,
org.fortiss.af3.platform.raspberry.model.gamepad.util,
......
CanBusCompositor.java 04d8d8b5276fe06dfd1222b54de90ead680d4b6c YELLOW
CanToRaspberryCompositor.java 269e6b0dcfbbb5d0da72e199704e768f50651073 YELLOW
RaspberryPiCompositor.java 64e7a786367efbec47ee9af65cebaf98fed2db3f YELLOW
RaspberryPiCompositor.java c54e0128e71e3ba9e3f7222bfd8f65c420dfd303 YELLOW
RaspberryToCanCompositor.java 2552acc59eb5a7381c60b3c40d32978c96f409b0 YELLOW
......@@ -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.CameraDistanceRight;
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.motorcontrol.MotorControlInput;
import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlOutput;
......@@ -84,7 +86,8 @@ public class RaspberryPiCompositor extends
RumbleMagnitudeWeak.class, MotorControlInput.class,
MotorControlOutput.class, CameraDistanceLeft.class,
CameraDistanceRight.class, CameraYawAngle.class,
CameraDetectionStateLeft.class, CameraDetectionStateRight.class);
CameraDetectionStateLeft.class, CameraDetectionStateRight.class,
ControlCenterDownstreamInput.class, ControlCenterUpstreamOutput.class);
if(container != null) {
final boolean instanceOfAny = isInstanceOfAny(container, RaspberryPi.class);
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