Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
total_control_app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Martin Drechsler
total_control_app
Commits
ff6e770d
Commit
ff6e770d
authored
Feb 28, 2019
by
Martin Drechsler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scale for some spinboxes added
parent
c5d39b95
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
8 deletions
+41
-8
myGUI.py
myGUI.py
+6
-3
myWidgets.py
myWidgets.py
+35
-1
wav_coherent.py
wav_coherent.py
+0
-4
No files found.
myGUI.py
View file @
ff6e770d
...
...
@@ -111,15 +111,16 @@ class GuiMainWindow(QMainWindow):
self
.
piezoA397
=
anal_control_signal
(
'piezoA397'
,
13
,
out_minimum
=
0
,
out_maximum
=
4
,
out_step
=
0.01
)
self
.
piezoB397
=
anal_control_signal
(
'piezoB397'
,
7
,
out_step
=
0.01
)
self
.
piezoA866
=
anal_control_signal
(
'piezoA866'
,
14
,
out_minimum
=
0
,
out_maximum
=
4
,
out_step
=
0.01
)
self
.
piezoB866
=
anal_control_signal
(
'piezoB866'
,
6
,
out_step
=
0.01
)
self
.
piezoA423
=
anal_control_signal
(
'piezoA423'
,
1
,
out_step
=
0.01
)
self
.
piezoB866
=
anal_control_signal
(
'piezoB866'
,
9
,
out_step
=
0.01
,
out_minimum
=
-
2
,
out_maximum
=
10
)
self
.
piezoA423
=
anal_control_signal
(
'piezoA423'
,
8
,
out_step
=
0.01
)
self
.
trapDCA
=
anal_control_signal
(
'DC A'
,
2
)
self
.
trapDCB
=
anal_control_signal
(
'DC B'
,
3
)
self
.
trapDCB
=
anal_control_signal
(
'DC B'
,
1
)
self
.
trapCompC
=
anal_control_signal
(
'Comp C'
,
4
)
self
.
trapCompD
=
anal_control_signal
(
'Comp D'
,
5
)
self
.
trapCompOven
=
anal_control_signal
(
'Comp Oven'
,
0
)
self
.
trapCompExYb
=
anal_control_signal
(
'Comp Ex Yb'
,
6
)
...
...
@@ -215,6 +216,8 @@ class GuiMainWindow(QMainWindow):
self
.
layout_trap_electrodes
.
addWidget
(
QtGui
.
QLabel
(
self
.
trapCompC
.
name
),
1
,
3
),
self
.
layout_trap_electrodes
.
addWidget
(
self
.
trapCompC
.
sb
,
1
,
4
)
self
.
layout_trap_electrodes
.
addWidget
(
QtGui
.
QLabel
(
self
.
trapCompD
.
name
),
2
,
3
),
self
.
layout_trap_electrodes
.
addWidget
(
self
.
trapCompD
.
sb
,
2
,
4
)
self
.
layout_trap_electrodes
.
addWidget
(
QtGui
.
QLabel
(
self
.
trapCompOven
.
name
),
1
,
5
),
self
.
layout_trap_electrodes
.
addWidget
(
self
.
trapCompOven
.
sb
,
1
,
6
)
self
.
layout_trap_electrodes
.
addWidget
(
QtGui
.
QLabel
(
self
.
trapCompExYb
.
name
),
2
,
5
),
self
.
layout_trap_electrodes
.
addWidget
(
self
.
trapCompExYb
.
sb
,
2
,
6
)
###########################################################
...
...
myWidgets.py
View file @
ff6e770d
...
...
@@ -40,6 +40,33 @@ class anal_control_signal(QWidget):
self
.
suffix
=
'V'
self
.
sb
=
pg
.
SpinBox
(
value
=
self
.
initial_value
,
bounds
=
[
self
.
min
,
self
.
max
],
step
=
self
.
step
,
siPrefix
=
self
.
siPrefix
,
suffix
=
self
.
suffix
)
# set button context menu policy
self
.
sb
.
setContextMenuPolicy
(
QtCore
.
Qt
.
CustomContextMenu
)
self
.
sb
.
customContextMenuRequested
.
connect
(
self
.
on_context_menu
)
# create context menu
self
.
popMenu
=
QtGui
.
QMenu
(
self
)
self
.
act_2_step
=
QtGui
.
QAction
(
'2 mV steo'
,
self
)
self
.
act_5_step
=
QtGui
.
QAction
(
'5 mV step'
,
self
)
self
.
act_10_step
=
QtGui
.
QAction
(
'10 mV step'
,
self
)
self
.
act_100_step
=
QtGui
.
QAction
(
'100 mV step'
,
self
)
self
.
popMenu
.
addAction
(
self
.
act_2_step
)
self
.
popMenu
.
addAction
(
self
.
act_5_step
)
self
.
popMenu
.
addAction
(
self
.
act_10_step
)
self
.
popMenu
.
addAction
(
self
.
act_100_step
)
self
.
act_2_step
.
triggered
.
connect
(
lambda
:
self
.
sb
.
setSingleStep
(
0.002
))
self
.
act_5_step
.
triggered
.
connect
(
lambda
:
self
.
sb
.
setSingleStep
(
0.005
))
self
.
act_10_step
.
triggered
.
connect
(
lambda
:
self
.
sb
.
setSingleStep
(
0.01
))
self
.
act_100_step
.
triggered
.
connect
(
lambda
:
self
.
sb
.
setSingleStep
(
0.1
))
try
:
self
.
AO
=
daq_AO
(
self
.
ch
)
except
:
...
...
@@ -79,6 +106,13 @@ class anal_control_signal(QWidget):
self
.
scan_feedfoward_step
=
0
self
.
scan_feedfoward_analogOut
=
None
def
on_context_menu
(
self
,
point
):
# show context menu
self
.
popMenu
.
exec_
(
self
.
sb
.
mapToGlobal
(
point
))
def
sb_analog_change
(
self
):
self
.
AO
.
set_out
(
self
.
sb
.
val
)
...
...
wav_coherent.py
View file @
ff6e770d
...
...
@@ -77,10 +77,6 @@ if __name__ == '__main__':
print
(
read_measurement
(
wavCoh
))
while
(
1
):
print
(
read_measurement
(
wavCoh
))
time
.
sleep
(
0.5
)
read_measurement_forever
(
wavCoh
)
# print(a[12:20])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment