--- a/tests/linux/python_cwiid/hmi.wxg Mon Jan 19 08:39:36 2009 +0100
+++ b/tests/linux/python_cwiid/hmi.wxg Mon Jan 19 08:40:09 2009 +0100
@@ -1,5 +1,5 @@
-<!-- generated by wxGlade 0.6.3 on Sat Jan 17 03:40:12 2009 -->
+<!-- generated by wxGlade 0.6.3 on Mon Jan 19 09:26:45 2009 --> <application path="" name="" class="" option="0" language="python" top_window="frame_1" encoding="UTF-8" use_gettext="0" overwrite="0" use_new_namespace="1" for_version="2.8" is_template="0">
<object class="HMIFrame" name="frame_1" base="EditFrame">
@@ -7,8 +7,8 @@
<object class="wxGridSizer" name="grid_sizer_1" base="EditGridSizer">
<object class="sizeritem">
@@ -26,20 +26,12 @@
<object class="wxButton" name="button_1" base="EditButton">
- <label>Joystick</label>
+ <label>Connect Wiimote</label> <handler event="EVT_BUTTON">start_manu</handler>
- <object class="sizeritem">
- <object class="wxButton" name="button_1_copy" base="EditButton">
<object class="sizeritem">
@@ -63,87 +55,7 @@
<object class="wxSpinCtrl" name="spin_ctrl_X" base="EditSpinCtrl">
- <object class="sizeritem">
- <object class="wxGridSizer" name="grid_sizer_3" base="EditGridSizer">
- <object class="sizeritem">
- <object class="wxRadioButton" name="radio_btn_1" base="EditRadioButton">
- <object class="sizeritem">
- <object class="wxButton" name="button_3" base="EditButton">
- <object class="sizeritem">
- <object class="wxStaticBoxSizer" name="sizer_A" base="EditStaticBoxSizer">
- <orient>wxHORIZONTAL</orient>
- <object class="sizeritem">
- <object class="wxGridSizer" name="grid_sizer_2_copy" base="EditGridSizer">
- <object class="sizeritem">
- <object class="wxSpinCtrl" name="spin_ctrl_A" base="EditSpinCtrl">
- <object class="sizeritem">
- <object class="wxGridSizer" name="grid_sizer_3_copy_2" base="EditGridSizer">
- <object class="sizeritem">
- <object class="wxRadioButton" name="radio_btn_1_copy_2" base="EditRadioButton">
- <object class="sizeritem">
- <object class="wxButton" name="button_3_copy_2" base="EditButton">
@@ -188,210 +100,13 @@
<object class="wxSpinCtrl" name="spin_ctrl_Y" base="EditSpinCtrl">
- <object class="sizeritem">
- <object class="wxGridSizer" name="grid_sizer_3_copy" base="EditGridSizer">
- <object class="sizeritem">
- <object class="wxRadioButton" name="radio_btn_1_copy" base="EditRadioButton">
- <object class="sizeritem">
- <object class="wxButton" name="button_3_copy" base="EditButton">
- <object class="sizeritem">
- <object class="wxStaticBoxSizer" name="sizer_B" base="EditStaticBoxSizer">
- <orient>wxHORIZONTAL</orient>
- <object class="sizeritem">
- <object class="wxGridSizer" name="grid_sizer_2_copy_2" base="EditGridSizer">
- <object class="sizeritem">
- <object class="wxSpinCtrl" name="spin_ctrl_B" base="EditSpinCtrl">
- <object class="sizeritem">
- <object class="wxGridSizer" name="grid_sizer_3_copy_3" base="EditGridSizer">
- <object class="sizeritem">
- <object class="wxRadioButton" name="radio_btn_1_copy_3" base="EditRadioButton">
- <object class="sizeritem">
- <object class="wxButton" name="button_3_copy_3" base="EditButton">
- <object class="sizeritem">
- <object class="wxStaticBoxSizer" name="sizer_2" base="EditStaticBoxSizer">
- <orient>wxVERTICAL</orient>
- <label>Speed Control</label>
- <object class="sizeritem">
- <object class="wxStaticText" name="label_2" base="EditStaticText">
- <style>wxALIGN_CENTRE</style>
- <attribute>1</attribute>
- <label>Max Speed</label>
- <object class="sizeritem">
- <object class="wxSlider" name="slider_1_copy" base="EditSlider">
- <style>wxSL_HORIZONTAL|wxSL_AUTOTICKS|wxSL_LABELS</style>
- <object class="sizeritem">
- <object class="wxStaticText" name="label_2_copy" base="EditStaticText">
- <style>wxALIGN_CENTRE</style>
- <attribute>1</attribute>
- <label>Max Acceleration</label>
- <object class="sizeritem">
- <object class="wxSlider" name="slider_1" base="EditSlider">
- <style>wxSL_HORIZONTAL|wxSL_AUTOTICKS|wxSL_LABELS</style>
- <object class="sizeritem">
- <object class="wxStaticBoxSizer" name="sizer_Z" base="EditStaticBoxSizer">
- <orient>wxHORIZONTAL</orient>
- <object class="sizeritem">
- <object class="wxGridSizer" name="grid_sizer_2_copy_3" base="EditGridSizer">
- <object class="sizeritem">
- <object class="wxSpinCtrl" name="spin_ctrl_Z" base="EditSpinCtrl">
- <object class="sizeritem">
- <object class="wxGridSizer" name="grid_sizer_3_copy_1" base="EditGridSizer">
- <object class="sizeritem">
- <object class="wxRadioButton" name="radio_btn_1_copy_1" base="EditRadioButton">
- <object class="sizeritem">
- <object class="wxButton" name="button_3_copy_1" base="EditButton">
- <object class="sizeritem">
- <object class="wxButton" name="button_2" base="EditButton">
- <foreground>#ff0000</foreground>
- <stockitem>STOP</stockitem>
- <label>&Stop</label>
- <family>default</family>
- <weight>normal</weight>
- <underlined>0</underlined>
--- a/tests/linux/python_cwiid/plc.xml Mon Jan 19 08:39:36 2009 +0100
+++ b/tests/linux/python_cwiid/plc.xml Mon Jan 19 08:40:09 2009 +0100
@@ -8,7 +8,7 @@
creationDateTime="2008-12-14 16:21:19"/>
<contentHeader name="Beremiz Python Support Tests"
- modificationDateTime="2009-01-16 21:51:43">
+ modificationDateTime="2009-01-19 09:02:00"> <pageSize x="1024" y="1024"/>
@@ -58,9 +58,14 @@
- <variable name="Block1">
+ <variable name="pollX"> - <derived name="python_eval"/>
+ <derived name="python_poll"/> + <variable name="pollY"> + <derived name="python_poll"/> @@ -68,25 +73,25 @@
<inVariable localId="4" height="30" width="160">
- <position x="70" y="600"/>
+ <position x="25" y="285"/> <relPosition x="160" y="15"/>
<expression>'last_point[0]'</expression>
<block localId="5" width="125" height="80" typeName="python_poll" instanceName="py2">
- <position x="260" y="550"/>
+ <position x="215" y="235"/> <variable formalParameter="TRIG">
<relPosition x="0" y="35"/>
<connection refLocalId="25" formalParameter="OUT">
- <position x="260" y="585"/>
- <position x="245" y="585"/>
- <position x="245" y="520"/>
- <position x="920" y="520"/>
- <position x="920" y="470"/>
- <position x="870" y="470"/>
+ <position x="215" y="270"/> + <position x="200" y="270"/> + <position x="200" y="205"/> + <position x="875" y="205"/> + <position x="875" y="155"/> + <position x="825" y="155"/> @@ -94,8 +99,8 @@
<relPosition x="0" y="65"/>
<connection refLocalId="4">
- <position x="260" y="615"/>
- <position x="230" y="615"/>
+ <position x="215" y="300"/> + <position x="185" y="300"/> @@ -115,18 +120,18 @@
<block localId="8" width="125" height="80" typeName="python_poll" instanceName="py3">
- <position x="260" y="660"/>
+ <position x="215" y="480"/> <variable formalParameter="TRIG">
<relPosition x="0" y="35"/>
<connection refLocalId="25" formalParameter="OUT">
- <position x="260" y="695"/>
- <position x="245" y="695"/>
- <position x="245" y="520"/>
- <position x="920" y="520"/>
- <position x="920" y="470"/>
- <position x="870" y="470"/>
+ <position x="215" y="515"/> + <position x="200" y="515"/> + <position x="200" y="205"/> + <position x="875" y="205"/> + <position x="875" y="155"/> + <position x="825" y="155"/> @@ -134,8 +139,8 @@
<relPosition x="0" y="65"/>
<connection refLocalId="9">
- <position x="260" y="725"/>
- <position x="230" y="725"/>
+ <position x="215" y="545"/> + <position x="185" y="545"/> @@ -155,30 +160,30 @@
<inVariable localId="9" height="30" width="160">
- <position x="70" y="710"/>
+ <position x="25" y="530"/> <relPosition x="160" y="15"/>
<expression>'last_point[1]'</expression>
<inVariable localId="11" height="30" width="100">
- <position x="125" y="455"/>
+ <position x="80" y="140"/> <relPosition x="100" y="15"/>
<expression>'btA'</expression>
<block localId="12" width="125" height="80" typeName="python_poll" instanceName="py1">
- <position x="260" y="405"/>
+ <position x="215" y="90"/> <variable formalParameter="TRIG">
<relPosition x="0" y="35"/>
<connection refLocalId="41">
- <position x="260" y="440"/>
- <position x="235" y="440"/>
- <position x="235" y="435"/>
- <position x="225" y="435"/>
+ <position x="215" y="125"/> + <position x="190" y="125"/> + <position x="190" y="120"/> + <position x="180" y="120"/> @@ -186,8 +191,8 @@
<relPosition x="0" y="65"/>
<connection refLocalId="11">
- <position x="260" y="470"/>
- <position x="225" y="470"/>
+ <position x="215" y="155"/> + <position x="180" y="155"/> @@ -206,21 +211,21 @@
- <comment localId="16" height="90" width="680">
- <position x="50" y="25"/>
+ <comment localId="16" height="40" width="1005"> + <position x="15" y="25"/> -<![CDATA[This example test that, despite of 2T period clock stimulating TRIG pin of pyth_eval blocks, blocks keep executing one after the other, in respect of execution order.]]>
+<![CDATA[A simple test that reads Nunchuk stick position and put it in spinctrls, when A button is pressed.]]> <block localId="24" width="155" height="80" typeName="STRING_TO_UINT">
- <position x="505" y="405"/>
+ <position x="460" y="90"/> <variable formalParameter="EN">
<relPosition x="0" y="35"/>
<connection refLocalId="12" formalParameter="ACK">
- <position x="505" y="440"/>
- <position x="385" y="440"/>
+ <position x="460" y="125"/> + <position x="340" y="125"/> @@ -228,8 +233,8 @@
<relPosition x="0" y="65"/>
<connection refLocalId="12" formalParameter="RESULT">
- <position x="505" y="470"/>
- <position x="385" y="470"/>
+ <position x="460" y="155"/> + <position x="340" y="155"/> @@ -249,14 +254,14 @@
<block localId="25" width="135" height="45" typeName="UINT_TO_BOOL">
- <position x="735" y="440"/>
+ <position x="690" y="125"/> <variable formalParameter="IN">
<relPosition x="0" y="30"/>
<connection refLocalId="24" formalParameter="OUT">
- <position x="735" y="470"/>
- <position x="660" y="470"/>
+ <position x="690" y="155"/> + <position x="615" y="155"/> @@ -271,30 +276,320 @@
<inVariable localId="31" height="30" width="160">
- <position x="570" y="740"/>
+ <position x="565" y="385"/> <relPosition x="160" y="15"/>
- <expression>'\n")'</expression>
+ <expression>')'</expression> + <inVariable localId="35" height="30" width="340"> + <position x="385" y="345"/> + <relPosition x="340" y="15"/> + <expression>'HMIFrame.spin_ctrl_X.SetValue('</expression> + <inVariable localId="41" height="30" width="100"> + <position x="80" y="105"/> + <relPosition x="100" y="15"/> + <expression>BOOL#TRUE</expression> - <block localId="32" width="125" height="85" typeName="python_eval" instanceName="Block1">
- <position x="960" y="550"/>
+ <block localId="42" width="80" height="100" typeName="CONCAT"> + <position x="750" y="310"/> + <variable formalParameter="EN"> + <relPosition x="0" y="30"/> + <connection refLocalId="44" formalParameter="ENO"> + <position x="750" y="340"/> + <position x="740" y="340"/> + <position x="740" y="270"/> + <position x="715" y="270"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="50"/> + <connection refLocalId="35"> + <position x="750" y="360"/> + <position x="725" y="360"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="70"/> + <connection refLocalId="44" formalParameter="OUT"> + <position x="750" y="380"/> + <position x="735" y="380"/> + <position x="735" y="300"/> + <position x="715" y="300"/> + <variable formalParameter="IN3"> + <relPosition x="0" y="90"/> + <connection refLocalId="31"> + <position x="750" y="400"/> + <position x="725" y="400"/> + <variable formalParameter="ENO"> + <relPosition x="80" y="30"/> + <variable formalParameter="OUT"> + <relPosition x="80" y="50"/> + <block localId="43" width="145" height="80" typeName="STRING_TO_INT"> + <position x="380" y="235"/> + <variable formalParameter="EN"> + <relPosition x="0" y="35"/> + <connection refLocalId="5" formalParameter="ACK"> + <position x="380" y="270"/> + <position x="340" y="270"/> + <variable formalParameter="IN"> + <relPosition x="0" y="65"/> + <connection refLocalId="5" formalParameter="RESULT"> + <position x="380" y="300"/> + <position x="340" y="300"/> + <variable formalParameter="ENO"> + <relPosition x="145" y="35"/> + <variable formalParameter="OUT"> + <relPosition x="145" y="65"/> + <block localId="44" width="145" height="80" typeName="INT_TO_STRING"> + <position x="570" y="235"/> + <variable formalParameter="EN"> + <relPosition x="0" y="35"/> + <connection refLocalId="43" formalParameter="ENO"> + <position x="570" y="270"/> + <position x="525" y="270"/> + <variable formalParameter="IN"> + <relPosition x="0" y="65"/> + <connection refLocalId="43" formalParameter="OUT"> + <position x="570" y="300"/> + <position x="525" y="300"/> + <variable formalParameter="ENO"> + <relPosition x="145" y="35"/> + <variable formalParameter="OUT"> + <relPosition x="145" y="65"/> + <inVariable localId="47" height="30" width="160"> + <position x="565" y="630"/> + <relPosition x="160" y="15"/> + <expression>')'</expression> + <block localId="48" width="80" height="100" typeName="CONCAT"> + <position x="750" y="555"/> + <variable formalParameter="EN"> + <relPosition x="0" y="30"/> + <connection refLocalId="49" formalParameter="ENO"> + <position x="750" y="585"/> + <position x="740" y="585"/> + <position x="740" y="515"/> + <position x="715" y="515"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="50"/> + <connection refLocalId="51"> + <position x="750" y="605"/> + <position x="725" y="605"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="70"/> + <connection refLocalId="49" formalParameter="OUT"> + <position x="750" y="625"/> + <position x="735" y="625"/> + <position x="735" y="545"/> + <position x="715" y="545"/> + <variable formalParameter="IN3"> + <relPosition x="0" y="90"/> + <connection refLocalId="47"> + <position x="750" y="645"/> + <position x="725" y="645"/> + <variable formalParameter="ENO"> + <relPosition x="80" y="30"/> + <variable formalParameter="OUT"> + <relPosition x="80" y="50"/> + <block localId="49" width="145" height="80" typeName="INT_TO_STRING"> + <position x="570" y="480"/> + <variable formalParameter="EN"> + <relPosition x="0" y="35"/> + <connection refLocalId="50" formalParameter="ENO"> + <position x="570" y="515"/> + <position x="525" y="515"/> + <variable formalParameter="IN"> + <relPosition x="0" y="65"/> + <connection refLocalId="50" formalParameter="OUT"> + <position x="570" y="545"/> + <position x="525" y="545"/> + <variable formalParameter="ENO"> + <relPosition x="145" y="35"/> + <variable formalParameter="OUT"> + <relPosition x="145" y="65"/> + <block localId="50" width="145" height="80" typeName="STRING_TO_INT"> + <position x="380" y="480"/> + <variable formalParameter="EN"> + <relPosition x="0" y="35"/> + <connection refLocalId="8" formalParameter="ACK"> + <position x="380" y="515"/> + <position x="340" y="515"/> + <variable formalParameter="IN"> + <relPosition x="0" y="65"/> + <connection refLocalId="8" formalParameter="RESULT"> + <position x="380" y="545"/> + <position x="340" y="545"/> + <variable formalParameter="ENO"> + <relPosition x="145" y="35"/> + <variable formalParameter="OUT"> + <relPosition x="145" y="65"/> + <inVariable localId="51" height="30" width="340"> + <position x="385" y="590"/> + <relPosition x="340" y="15"/> + <expression>'HMIFrame.spin_ctrl_Y.SetValue('</expression> + <block localId="52" width="125" height="65" typeName="python_poll" instanceName="pollX"> + <position x="875" y="310"/> <variable formalParameter="TRIG">
- <relPosition x="0" y="35"/>
- <connection refLocalId="34" formalParameter="ENO">
- <position x="960" y="585"/>
- <position x="920" y="585"/>
+ <relPosition x="0" y="30"/> + <connection refLocalId="42" formalParameter="ENO"> + <position x="875" y="340"/> + <position x="830" y="340"/> <variable formalParameter="CODE">
- <relPosition x="0" y="70"/>
- <connection refLocalId="34" formalParameter="OUT">
- <position x="960" y="620"/>
- <position x="920" y="620"/>
+ <relPosition x="0" y="55"/> + <connection refLocalId="42" formalParameter="OUT"> + <position x="875" y="365"/> + <position x="855" y="365"/> + <position x="855" y="360"/> + <position x="830" y="360"/> @@ -303,144 +598,54 @@
<variable formalParameter="ACK">
- <relPosition x="125" y="35"/>
+ <relPosition x="125" y="30"/> <variable formalParameter="RESULT">
- <relPosition x="125" y="70"/>
+ <relPosition x="125" y="55"/> - <block localId="33" width="80" height="65" typeName="AND">
- <position x="455" y="555"/>
+ <block localId="53" width="125" height="65" typeName="python_poll" instanceName="pollY"> + <position x="875" y="555"/> - <variable formalParameter="IN1">
+ <variable formalParameter="TRIG"> <relPosition x="0" y="30"/>
- <connection refLocalId="5" formalParameter="ACK">
- <position x="455" y="585"/>
- <position x="385" y="585"/>
+ <connection refLocalId="48" formalParameter="ENO"> + <position x="875" y="585"/> + <position x="830" y="585"/> - <variable formalParameter="IN2">
+ <variable formalParameter="CODE"> <relPosition x="0" y="55"/>
- <connection refLocalId="8" formalParameter="ACK">
- <position x="455" y="610"/>
- <position x="435" y="610"/>
- <position x="435" y="695"/>
- <position x="385" y="695"/>
+ <connection refLocalId="48" formalParameter="OUT"> + <position x="875" y="610"/> + <position x="857" y="610"/> + <position x="857" y="605"/> + <position x="830" y="605"/> - <variable formalParameter="OUT">
+ <variable formalParameter="ACK"> - <relPosition x="80" y="30"/>
+ <relPosition x="125" y="30"/> + <variable formalParameter="RESULT"> + <relPosition x="125" y="55"/> - <block localId="34" width="80" height="225" typeName="CONCAT">
- <position x="840" y="550"/>
- <variable formalParameter="EN">
- <relPosition x="0" y="35"/>
- <connection refLocalId="33" formalParameter="OUT">
- <position x="840" y="585"/>
- <position x="535" y="585"/>
- <variable formalParameter="IN1">
- <relPosition x="0" y="70"/>
- <connection refLocalId="35">
- <position x="840" y="620"/>
- <position x="800" y="620"/>
- <variable formalParameter="IN2">
- <relPosition x="0" y="105"/>
- <connection refLocalId="5" formalParameter="RESULT">
- <position x="840" y="655"/>
- <position x="415" y="655"/>
- <position x="415" y="615"/>
- <position x="385" y="615"/>
- <variable formalParameter="IN3">
- <relPosition x="0" y="140"/>
- <connection refLocalId="36">
- <position x="840" y="690"/>
- <position x="640" y="690"/>
- <variable formalParameter="IN4">
- <relPosition x="0" y="175"/>
- <connection refLocalId="8" formalParameter="RESULT">
- <position x="840" y="725"/>
- <position x="385" y="725"/>
- <variable formalParameter="IN5">
- <relPosition x="0" y="205"/>
- <connection refLocalId="31">
- <position x="840" y="755"/>
- <position x="730" y="755"/>
- <variable formalParameter="ENO">
- <relPosition x="80" y="35"/>
- <variable formalParameter="OUT">
- <relPosition x="80" y="70"/>
- <inVariable localId="35" height="30" width="230">
- <position x="570" y="605"/>
- <relPosition x="230" y="15"/>
- <expression>'sys.stdout.write("x:'</expression>
- <inVariable localId="36" height="30" width="70">
- <position x="570" y="675"/>
- <relPosition x="70" y="15"/>
- <expression>', y:'</expression>
- <inVariable localId="41" height="30" width="100">
- <position x="125" y="420"/>
- <relPosition x="100" y="15"/>
- <expression>BOOL#TRUE</expression>