Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
anselm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vaclab
anselm
Commits
b81f360f
Commit
b81f360f
authored
6 years ago
by
Wact B. Prot
Browse files
Options
Downloads
Patches
Plain Diff
merge
parent
c8fbfb28
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
anselm.py
+0
-50
0 additions, 50 deletions
anselm.py
anselm/worker.py
+1
-1
1 addition, 1 deletion
anselm/worker.py
with
1 addition
and
51 deletions
anselm.py
+
0
−
50
View file @
b81f360f
...
@@ -244,55 +244,6 @@ class Anselm(System):
...
@@ -244,55 +244,6 @@ class Anselm(System):
self
.
aset
(
'
calid
'
,
line
,
cal_id
)
self
.
aset
(
'
calid
'
,
line
,
cal_id
)
self
.
log
.
info
(
"
select calibration id {}
"
.
format
(
cal_id
))
self
.
log
.
info
(
"
select calibration id {}
"
.
format
(
cal_id
))
<<<<<<<
HEAD
auxobj_combo
=
self
.
make_task_combo
(
doc_id
=
doc_id
,
line
=
line
)
self
.
add_widget_to_grid
(
widget
=
auxobj_combo
,
line
=
line
,
col
=
4
)
self
.
draw_grid
()
def
add_widget_to_grid
(
self
,
widget
,
line
,
col
):
#old_widget_item = self.grid.itemAtPosition (line, col)
#old_widget = old_widget_item.widget()
self
.
grid
.
addWidget
(
widget
,
line
,
col
)
def
make_combo
(
self
,
item_list
,
first_item
=
'
select
'
):
combo
=
QComboBox
(
self
.
win
)
if
first_item
:
combo
.
addItem
(
first_item
)
for
item
in
item_list
:
combo
.
addItem
(
item
)
return
combo
def
get_line_key
(
self
,
line
):
return
'
line_{}
'
.
format
(
line
)
def
run_device
(
self
,
line
):
line_key
=
self
.
get_line_key
(
line
)
task
=
None
self
.
log
.
info
(
"
start device at line {}
"
.
format
(
line
))
if
line_key
in
self
.
state
:
if
'
task
'
in
self
.
state
[
line_key
]:
task
=
self
.
state
.
get
(
line_key
).
get
(
'
task
'
)
else
:
self
.
log
.
error
(
"
no task selected at line {}
"
.
format
(
line
))
if
task
:
self
.
log
.
debug
(
"
task is: {}
"
.
format
(
task
))
Thread
(
target
=
self
.
worker
.
run
,
args
=
(
task
,
line
,
self
.
result_callback
)).
start
()
def
result_callback
(
self
,
line
,
results
):
self
.
log
.
info
(
'
result: {} at line {}
'
.
format
(
results
,
line
))
text
=
""
for
_
,
result
in
enumerate
(
results
):
text
=
"
{} {} {}
"
.
format
(
text
,
result
.
get
(
'
Value
'
),
result
.
get
(
'
Unit
'
))
print
(
text
)
=======
def
fullscale_selected
(
self
,
combo
,
line
):
def
fullscale_selected
(
self
,
combo
,
line
):
fs
=
combo
.
currentText
()
fs
=
combo
.
currentText
()
self
.
aset
(
'
fullscale
'
,
line
,
fs
)
self
.
aset
(
'
fullscale
'
,
line
,
fs
)
...
@@ -302,7 +253,6 @@ class Anselm(System):
...
@@ -302,7 +253,6 @@ class Anselm(System):
dut
=
combo
.
currentText
()
dut
=
combo
.
currentText
()
self
.
aset
(
'
dut_branch
'
,
line
,
dut
)
self
.
aset
(
'
dut_branch
'
,
line
,
dut
)
self
.
log
.
info
(
"
device at line {} attached to {}
"
.
format
(
line
,
dut
))
self
.
log
.
info
(
"
device at line {} attached to {}
"
.
format
(
line
,
dut
))
>>>>>>>
fd96be8c9f82651cda1fe7464b8422534e2aac32
def
std_selected
(
self
,
combo
):
def
std_selected
(
self
,
combo
):
standard
=
combo
.
currentText
()
standard
=
combo
.
currentText
()
...
...
This diff is collapsed.
Click to expand it.
anselm/worker.py
+
1
−
1
View file @
b81f360f
...
@@ -11,7 +11,7 @@ class Worker(System):
...
@@ -11,7 +11,7 @@ class Worker(System):
super
().
__init__
()
super
().
__init__
()
relay_dict
=
self
.
config
.
get
(
'
relay
'
)
relay_dict
=
self
.
config
.
get
(
'
relay
'
)
self
.
relay_dict
=
relay_dict
self
.
relay_dict
=
relay_dict
self
.
relay_url
=
"
http://{}:{}
"
.
format
(
relay_dict
.
get
(
'
host
'
),
relay_dict
.
get
(
'
port
'
)
self
.
relay_url
=
"
http://{}:{}
"
.
format
(
relay_dict
.
get
(
'
host
'
),
relay_dict
.
get
(
'
port
'
)
)
self
.
headers
=
{
'
content-type
'
:
'
application/json
'
}
self
.
headers
=
{
'
content-type
'
:
'
application/json
'
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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