Skip to content

Commit 308d9d1

Browse files
committed
pncconf -fix vcp page adjustments and gladevcp sample.
1 parent f24f47b commit 308d9d1

2 files changed

Lines changed: 363 additions & 303 deletions

File tree

src/emc/usr_intf/pncconf/tests.py

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,13 @@ def display_gladevcp_panel(self):
179179
options = "-t %s"% (vcptheme)
180180
print(options)
181181
halrun = os.popen("cd %s\nhalrun -Is > /dev/null"%(folder), "w" )
182+
print(folder)
182183
if debug:
183184
halrun.write("echo\n")
184185
halrun.write("loadusr -Wn displaytest gladevcp -g %(size)s%(pos)s -c displaytest %(option)s gvcp-panel.ui\n" %{
185186
'size':size,'pos':pos,'option':options})
186187
if self.w.spindlespeedbar.get_active():
187-
halrun.write("setp displaytest.spindle-speed 500\n")
188+
halrun.write("setp displaytest.spindle-speed {}\n".format(self.w.maxspeeddisplay.get_value()/2))
188189
if self.w.zerox.get_active():
189190
halrun.write("setp displaytest.zero-x-active true\n")
190191
if self.w.zeroy.get_active():
@@ -206,16 +207,21 @@ def gladevcptestpanel(self,w):
206207
directory = "/tmp/"
207208
filename = os.path.join(directory, "gvcp-panel.ui")
208209
file = open(filename, "w")
209-
print(("""<?xml version="1.0"?>
210+
print(("""
211+
<?xml version="1.0" encoding="UTF-8"?>
212+
<!-- Generated with glade 3.38.2 -->
210213
<interface>
211-
<!-- interface-requires gladevcp 0.0 -->
212214
<requires lib="gtk+" version="3.0"/>
213-
<!-- interface-naming-policy project-wide -->
215+
<requires lib="gladevcp" version="0.0"/>
214216
<object class="GtkWindow" id="window1">
215-
<property name="width_request">100</property>
217+
<property name="width-request">100</property>
218+
<property name="can-focus">False</property>
216219
<child>
217220
<object class="GtkVBox" id="vbox1">
218-
<property name="visible">True</property>"""), file=file)
221+
<property name="visible">True</property>
222+
<property name="can-focus">False</property>
223+
"""), file=file)
224+
219225
if self.w.spindlespeedbar.get_active():
220226
print(("""
221227
<child>
@@ -237,7 +243,9 @@ def gladevcptestpanel(self,w):
237243
<property name="expand">False</property>
238244
<property name="position">0</property>
239245
</packing>
240-
</child>""" ), file=file)
246+
</child>
247+
""" ), file=file)
248+
241249
if self.w.spindleatspeed.get_active():
242250
print(("""
243251
<child>
@@ -259,8 +267,9 @@ def gladevcptestpanel(self,w):
259267
<object class="HAL_LED" id="spindle-at-speed-led">
260268
<property name="visible">True</property>
261269
<property name="led_shape">2</property>
262-
<property name="on_color">green</property>
270+
<property name="on_color">lightgreen</property>
263271
<property name="led_size">5</property>
272+
<property name="led-blink-rate">0</property>
264273
</object>
265274
<packing>
266275
<property name="expand">False</property>
@@ -279,8 +288,7 @@ def gladevcptestpanel(self,w):
279288
<child>
280289
<object class="HAL_Table" id="button-box-active">
281290
<property name="visible">True</property>
282-
<property name="n_rows">5</property>
283-
<property name="homogeneous">False</property>"""), file=file)
291+
"""), file=file)
284292
if self.w.autotouchz.get_active():
285293
print(("""
286294
<child>
@@ -301,7 +309,6 @@ def gladevcptestpanel(self,w):
301309
</object>
302310
<packing>
303311
<property name="top_attach">4</property>
304-
<property name="bottom_attach">5</property>
305312
</packing>
306313
</child>"""), file=file)
307314
if self.w.zeroa.get_active():
@@ -323,7 +330,6 @@ def gladevcptestpanel(self,w):
323330
</object>
324331
<packing>
325332
<property name="top_attach">3</property>
326-
<property name="bottom_attach">4</property>
327333
</packing>
328334
</child>"""), file=file)
329335
if self.w.zeroz.get_active():
@@ -345,7 +351,6 @@ def gladevcptestpanel(self,w):
345351
</object>
346352
<packing>
347353
<property name="top_attach">2</property>
348-
<property name="bottom_attach">3</property>
349354
</packing>
350355
</child>"""), file=file)
351356
if self.w.zeroy.get_active():
@@ -367,7 +372,6 @@ def gladevcptestpanel(self,w):
367372
</object>
368373
<packing>
369374
<property name="top_attach">1</property>
370-
<property name="bottom_attach">2</property>
371375
</packing>
372376
</child>"""), file=file)
373377
if self.w.zerox.get_active():
@@ -387,7 +391,12 @@ def gladevcptestpanel(self,w):
387391
</packing>
388392
</child>
389393
</object>
390-
</child>"""), file=file)
394+
<packing>
395+
<property name="left-attach">0</property>
396+
<property name="top-attach">0</property>
397+
</packing>
398+
</child>
399+
"""), file=file)
391400
print(("""
392401
</object>
393402
<packing>

0 commit comments

Comments
 (0)