Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbst
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs
gui
openbst
Commits
2488d667
Commit
2488d667
authored
2 years ago
by
Claudio Scafuri
Browse files
Options
Downloads
Plain Diff
Merge branch 'qt5_python3' into 'master'
Qt5 python3 See merge request
!1
parents
c53185fb
c67f74bb
No related branches found
Branches containing commit
Tags
1.1.0
Tags containing commit
1 merge request
!1
Qt5 python3
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/bstController.py
+9
-9
9 additions, 9 deletions
src/bstController.py
src/openBST.py
+4
-4
4 additions, 4 deletions
src/openBST.py
src/openBSTGUI.py
+215
-228
215 additions, 228 deletions
src/openBSTGUI.py
with
228 additions
and
241 deletions
src/bstController.py
+
9
−
9
View file @
2488d667
...
...
@@ -14,7 +14,7 @@ class TangoDev(object):
try
:
self
.
dev
=
PyTango
.
DeviceProxy
(
self
.
_name
)
except
:
print
(
'
Cannot initialize %s device
'
%
self
.
_name
)
print
(
(
'
Cannot initialize %s device
'
%
self
.
_name
)
)
def
cmd_exec
(
self
,
comm
,
*
args
,
**
kwargs
):
if
self
.
dev
is
None
:
...
...
@@ -23,14 +23,14 @@ class TangoDev(object):
try
:
self
.
dev
.
command_inout
(
comm
,
args
[
0
])
except
Exception
as
error
:
print
(
'
Failed to execute command %s (with arguments) on device %s.
'
%
(
comm
,
self
.
dev
))
print
(
error
[
1
].
desc
)
print
(
(
'
Failed to execute command %s (with arguments) on device %s.
'
%
(
comm
,
self
.
dev
))
)
print
(
(
error
[
1
].
desc
)
)
else
:
try
:
self
.
dev
.
command_inout
(
comm
)
except
Exception
as
error
:
print
(
'
Failed to execute command %s on device %s.
'
%
(
comm
,
self
.
dev
))
print
(
error
[
1
].
desc
)
print
(
(
'
Failed to execute command %s on device %s.
'
%
(
comm
,
self
.
dev
))
)
print
(
(
error
[
1
].
desc
)
)
def
getAttrValue
(
self
,
attr
):
if
self
.
dev
is
None
:
...
...
@@ -58,7 +58,7 @@ class TangoDev(object):
try
:
temp
=
self
.
dev
.
write_attribute
(
attr
,
value
)
except
:
print
(
'
Cannot set %f for device %s
'
%
(
value
,
self
.
_name
))
print
(
(
'
Cannot set %f for device %s
'
%
(
value
,
self
.
_name
))
)
def
State
(
self
):
try
:
...
...
@@ -70,7 +70,7 @@ class TangoDev(object):
def
getProperty
(
self
,
propertyName
):
try
:
temp
=
self
.
dev
.
get_property
(
propertyName
)
if
propertyName
in
temp
.
keys
():
if
propertyName
in
list
(
temp
.
keys
()
)
:
return
float
(
temp
[
propertyName
][
0
])
else
:
return
None
...
...
@@ -208,7 +208,7 @@ class Trigger(TangoDev):
if
time_shift
:
self
.
setAttrValue
(
self
.
_attMaster
,
time_shift
)
else
:
print
(
'
Error trying to shift trigger reference for dev %s.
'
%
self
.
_name
)
print
(
(
'
Error trying to shift trigger reference for dev %s.
'
%
self
.
_name
)
)
class
BSTController
(
object
):
...
...
@@ -241,7 +241,7 @@ class BSTController(object):
self
.
fstatus
=
TangoDev
(
'
f/misc/fermistatus
'
)
#terfermistatus
self
.
terafermistatus
=
TangoDev
(
'
srv-t
f-srf
:20000/tf/mover1d/x_sdiag_tf.01
'
)
self
.
terafermistatus
=
TangoDev
(
'
srv-t
ango-tf-01
:20000/tf/mover1d/x_sdiag_tf.01
'
)
##############################
...
...
This diff is collapsed.
Click to expand it.
src/openBST.py
+
4
−
4
View file @
2488d667
#!/usr/bin/python
#!/usr/bin/python
3
import
sys
from
PyQt
4
import
Qt
Gui
,
QtCore
from
PyQt
5
import
Qt
Core
,
QtWidgets
import
openBSTGUI
import
bstController
class
MainWindow
(
Qt
Gui
.
QMainWindow
,
openBSTGUI
.
Ui_OpenBST
):
class
MainWindow
(
Qt
Widgets
.
QMainWindow
,
openBSTGUI
.
Ui_OpenBST
):
def
__init__
(
self
,
parent
=
None
):
super
(
MainWindow
,
self
).
__init__
(
parent
)
...
...
@@ -221,7 +221,7 @@ class Executor(QtCore.QThread):
# print("Running")
self
.
function
()
app
=
Qt
Gui
.
QApplication
(
sys
.
argv
)
app
=
Qt
Widgets
.
QApplication
(
sys
.
argv
)
main
=
MainWindow
()
main
.
show
()
sys
.
exit
(
app
.
exec_
())
This diff is collapsed.
Click to expand it.
src/openBSTGUI.py
+
215
−
228
View file @
2488d667
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment