Commit 328f9a67 authored by David Trachtenherz's avatar David Trachtenherz
Browse files

Area Input for Joystick

refs 490
parent d9566f8b
......@@ -14,22 +14,13 @@
<specifications xsi:type="org-fortiss-af3-component:CausalityComponentSpecification"/>
<specifications xsi:type="org-fortiss-af3-operatorpanel:OperatorPanelSpecification" id="89" name="Operator Panel" comment="">
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPLabel" id="778" name="LabelMode" comment="Mode">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="36" y="48"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="36" y="36"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="121" height="49"/>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPLabel" id="779" name="LabelStick" comment="Stick">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="48" y="84"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="48" y="108"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPITermInput" id="782" name="VerticalHorizontal" comment="Input as JoystickState(vertical, horizontal)">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="156" y="96"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="193" height="37"/>
<output>
<variable identifier="joystick"/>
<value xsi:type="org-fortiss-af3-expression-terms:Var" identifier="_this"/>
</output>
<type xsi:type="org-fortiss-af3-expression-types:TDouble"/>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPLabel" id="783" name="Label" comment="User Input/Output Panel">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="156"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="193" height="37"/>
......@@ -44,27 +35,56 @@
<type xsi:type="org-fortiss-af3-expression-types:TDefinedType" name="Mode"/>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPTextDisplay" id="785" name="ActualMode">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="156" y="168"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="156" y="228"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="193" height="37"/>
<reactions>
<itemInput xsi:type="org-fortiss-af3-expression-terms:Var" identifier="currentMode"/>
</reactions>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPLabel" id="786" name="LabelActualMode" comment="Actual Mode">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="12" y="156"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="12" y="204"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="145" height="72"/>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPLabel" id="787" name="LabelActualSpeed" comment="Actual Speed">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="12" y="204"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="12" y="252"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="145" height="72"/>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPTextDisplay" id="788" name="ActualSpeed">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="156" y="216"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="156" y="276"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="193" height="37"/>
<reactions>
<itemInput xsi:type="org-fortiss-af3-expression-terms:Var" identifier="actualVelocity"/>
</reactions>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPAreaInput" id="1532" name="Area Input" comment="joystick=JoystickState((_this_Y - 0.5) * 160, (_this_X - 0.5) * 32) // Speed: Y between -80 and 80, Wheel Angle: X between -16 and 16">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="156" y="96"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="109" height="109"/>
<output>
<variable identifier="joystick"/>
<value xsi:type="org-fortiss-af3-expression-terms:FunctionCall">
<function xsi:type="org-fortiss-af3-expression-terms:UserdefinedFunction" id="1535" name="JoystickState"/>
<arguments xsi:type="org-fortiss-af3-expression-terms:FunctionCall">
<function xsi:type="org-fortiss-af3-expression-terms:PredefinedFunction" operator="Multiply"/>
<arguments xsi:type="org-fortiss-af3-expression-terms:FunctionCall">
<function xsi:type="org-fortiss-af3-expression-terms:PredefinedFunction" operator="Subtract"/>
<arguments xsi:type="org-fortiss-af3-expression-terms:Var" identifier="_this_Y"/>
<arguments xsi:type="org-fortiss-af3-expression-terms:DoubleConst" value="0.5"/>
</arguments>
<arguments xsi:type="org-fortiss-af3-expression-terms:IntConst" value="160"/>
</arguments>
<arguments xsi:type="org-fortiss-af3-expression-terms:FunctionCall">
<function xsi:type="org-fortiss-af3-expression-terms:PredefinedFunction" operator="Multiply"/>
<arguments xsi:type="org-fortiss-af3-expression-terms:FunctionCall">
<function xsi:type="org-fortiss-af3-expression-terms:PredefinedFunction" operator="Subtract"/>
<arguments xsi:type="org-fortiss-af3-expression-terms:Var" identifier="_this_X"/>
<arguments xsi:type="org-fortiss-af3-expression-terms:DoubleConst" value="0.5"/>
</arguments>
<arguments xsi:type="org-fortiss-af3-expression-terms:IntConst" value="32"/>
</arguments>
</value>
</output>
<type xsi:type="org-fortiss-af3-expression-types:TDouble"/>
</containedElements>
</specifications>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="67" name="mode" comment="" outgoing="//@rootElements.1/@containedElements.0/@connections.0">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
......@@ -7372,6 +7392,8 @@
<configurations id="781" name="UserPanel" comment="" idReference="46"/>
<configurations id="933" name="FLControl" comment="" idReference="625"/>
<configurations id="1334" name="Component Architecture" comment="" idReference="42"/>
<configurations id="1536" name="WheelMotorPhysicsPanel" comment="" idReference="49"/>
<configurations id="1537" name="VehiclePanel" comment="" idReference="47"/>
</rootElements>
<rootElements xsi:type="org-fortiss-af3-platform:PlatformArchitecture" id="1485" name="eCar-Platform" comment="" referencedBy="//@rootElements.5/@platformArchitectureReference">
<containedElements xsi:type="org-fortiss-af3-platform-generic:GenericExecutionUnit" id="1486" name="CentralControlBoard" comment="Freescale MPC 5554 Evaluation Board">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment