Skip to content

Commit b49b304

Browse files
committed
qtvcp -cam_align panel: allow selection of camera number
and some basic error handling of the camera number
1 parent e1c1007 commit b49b304

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

share/qtvcp/panels/cam_align/cam_align_handler.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,14 @@ def __init__(self, halcomp,widgets,paths):
4040
# the HAL pins are built but HAL is not set ready
4141
def initialized__(self):
4242
if self.w.PREFS_:
43-
print 'Using preference file:',self.w.PREFS_.fn
43+
print('Using preference file:',self.w.PREFS_.fn)
44+
if self.w.USEROPTIONS_ is not None:
45+
try:
46+
num = int(self.w.USEROPTIONS_[0])
47+
except:
48+
print('Error with cam_align camera selection - not a number - using 0')
49+
num = 0
50+
self.w.camview._camNum = num
4451

4552
########################
4653
# callbacks from STATUS #

0 commit comments

Comments
 (0)