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
af8e2b0c
Commit
af8e2b0c
authored
Nov 12, 2018
by
Martin Drechsler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scan parameters freeze during scan, othertwise the scan bar doesnt do the job properly
parent
12410442
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
myWidgets.py
myWidgets.py
+9
-7
No files found.
myWidgets.py
View file @
af8e2b0c
...
@@ -116,26 +116,30 @@ class anal_control_signal(QWidget):
...
@@ -116,26 +116,30 @@ class anal_control_signal(QWidget):
self
.
scan_button
.
setText
(
'Start scan'
)
self
.
scan_button
.
setText
(
'Start scan'
)
self
.
scan_button
.
setStyleSheet
(
'background-color: None'
)
self
.
scan_button
.
setStyleSheet
(
'background-color: None'
)
self
.
PbarTimer
.
stop
()
self
.
PbarTimer
.
stop
()
self
.
sb
.
setValue
(
self
.
scan_step
)
self
.
sb
.
setEnabled
(
True
)
self
.
sb
.
setEnabled
(
True
)
self
.
scan_sb_start
.
setEnabled
(
True
)
self
.
scan_sb_stop
.
setEnabled
(
True
)
else
:
else
:
dt
=
5.0e-3
dt
=
5.0e-3
first_value
=
float
(
self
.
s
can_step
)
first_value
=
float
(
self
.
s
b
.
val
)
self
.
scan_array
=
scanFunctions
.
create_scan_array
(
self
.
scan_sb_start
.
val
,
self
.
scan_sb_stop
.
val
,
self
.
scan_sb_period
.
val
,
first_value
,
dt
)
self
.
scan_array
=
scanFunctions
.
create_scan_array
(
self
.
scan_sb_start
.
val
,
self
.
scan_sb_stop
.
val
,
self
.
scan_sb_period
.
val
,
first_value
,
dt
)
self
.
scan_array_gen
=
scanFunctions
.
yield_scan_array
(
self
.
scan_array
)
self
.
scan_array_gen
=
scanFunctions
.
yield_scan_array
(
self
.
scan_array
)
if
self
.
scan_step
>
float
(
self
.
scan_sb_stop
.
val
)
or
self
.
scan_step
<
float
(
self
.
scan_sb_start
.
val
):
if
first_value
>
float
(
self
.
scan_sb_stop
.
val
)
or
first_value
<
float
(
self
.
scan_sb_start
.
val
):
details
=
'Remember remember the fifth of November.'
+
'
\n
'
+
'Also remember that scan starts from the value of the corresponding spin box'
details
=
'Remember remember the fifth of November.'
+
'
\n
'
+
'Also remember that scan starts from the value of the corresponding spin box'
show_warning
(
'Scan can not start outside scan range and scan start should be lower than scan stop'
,
details_text
=
details
)
show_warning
(
'Scan can not start outside scan range and scan start should be lower than scan stop'
,
details_text
=
details
)
elif
len
(
self
.
scan_array
)
<
5
:
elif
len
(
self
.
scan_array
)
<
5
:
show_warning
(
'
%
i steps are too few, you need at least 5 steps'
%
(
len
(
self
.
scan_array
))
)
show_warning
(
'
%
i steps are too few, you need at least 5 steps'
%
(
len
(
self
.
scan_array
))
)
else
:
else
:
self
.
sb
.
setEnabled
(
False
)
self
.
sb
.
setEnabled
(
False
)
self
.
scan_sb_start
.
setEnabled
(
False
)
self
.
scan_sb_stop
.
setEnabled
(
False
)
self
.
scan_button
.
setStyleSheet
(
"background-color: green"
)
self
.
scan_button
.
setStyleSheet
(
"background-color: green"
)
self
.
PbarTimer
.
start
(
dt
*
1e3
)
self
.
PbarTimer
.
start
(
dt
*
1e3
)
self
.
ScanTimer
.
start
(
dt
*
1e3
)
self
.
ScanTimer
.
start
(
dt
*
1e3
)
...
@@ -199,10 +203,8 @@ class burleighWM(QWidget):
...
@@ -199,10 +203,8 @@ class burleighWM(QWidget):
wavemeter_ok
=
False
wavemeter_ok
=
False
try
:
try
:
tn
=
telnetlib
.
Telnet
(
host
=
"wannanosaurus"
,
port
=
1234
,
timeout
=
1
)
tn
=
telnetlib
.
Telnet
(
host
=
"wannanosaurus"
,
port
=
1234
,
timeout
=
1
)
if
tn
.
sock_avail
():
wavemeter_ok
=
True
wavemeter_ok
=
True
else
:
show_warning
(
'Wannanosaurus seems connected but WM might be off.'
)
except
:
except
:
show_warning
(
'Wannanosaurus not connected'
)
show_warning
(
'Wannanosaurus not connected'
)
...
...
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