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
c67f74bb
Commit
c67f74bb
authored
2 years ago
by
Claudio Scafuri
Browse files
Options
Downloads
Patches
Plain Diff
python3
parent
22c5bb66
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
Qt5 python3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/bstController.py
+8
-8
8 additions, 8 deletions
src/bstController.py
src/openBST.py
+1
-1
1 addition, 1 deletion
src/openBST.py
with
9 additions
and
9 deletions
src/bstController.py
+
8
−
8
View file @
c67f74bb
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
src/openBST.py
+
1
−
1
View file @
c67f74bb
#!/usr/bin/python
#!/usr/bin/python
3
import
sys
from
PyQt5
import
QtCore
,
QtWidgets
import
openBSTGUI
...
...
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