Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyPCC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
LOFAR2.0
PyPCC
Commits
af97db25
Commit
af97db25
authored
3 years ago
by
Paulus Kruger
Browse files
Options
Downloads
Patches
Plain Diff
RCU init debug
parent
5bbc8fb5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!11
Pypcc2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/RCU.yaml
+1
-2
1 addition, 2 deletions
config/RCU.yaml
i2cserv/i2c_dev.py
+2
-2
2 additions, 2 deletions
i2cserv/i2c_dev.py
i2cserv/i2cthread.py
+7
-3
7 additions, 3 deletions
i2cserv/i2cthread.py
with
10 additions
and
7 deletions
config/RCU.yaml
+
1
−
2
View file @
af97db25
...
...
@@ -210,6 +210,7 @@ variables:
-
name
:
RCU_state
description
:
State of RCUs 0=unknown, 1=ready, 2=busy, 3= wait PPS, 4=error
driver
:
I2C_RCU
rw
:
variable
#server variable, not linked to IO
dtype
:
uint8
dim
:
1
...
...
@@ -360,9 +361,7 @@ methods:
# - IO3.GPIO1: Update
# - IO3.GPIO2: Update
-
IO3.CONF1
:
Update
-
RCU_mask
:
True
-
RCU_update
:
0
-
RCU_mask
:
False
-
RCU_state
:
1
-
name
:
RCU_on
...
...
This diff is collapsed.
Click to expand it.
i2cserv/i2c_dev.py
+
2
−
2
View file @
af97db25
...
...
@@ -94,11 +94,11 @@ class i2c_dev(hwdev):
if
len
(
mask
)
==
0
:
mask
=
[
True
]
*
len
(
data
);
if
len
(
data
)
!=
len
(
mask
):
logging
.
warn
(
"
Trying to set I2C OK with wrong mask length!
"
)
return
return
[]
for
x
,
m
in
enumerate
(
mask
):
if
m
:
self
.
I2Cmask
[
x
]
=
data
[
x
];
return
[
OPCUAset
(
self
.
I2Cmaskid
,
InstType
.
varSet
,
self
.
I2Cmask
.
copy
(),[])]
return
;
return
[
OPCUAset
(
varid
,
InstType
.
varSet
,
data
,
mask
)]
;
logging
.
info
(
str
((
"
Set Var
"
,
var1
[
'
name
'
],
data
,
mask
)))
oldmask
=
self
.
I2Cmask
.
copy
()
data
,
mask2
=
self
.
SetGetVarValueMask
(
var1
,
data
,
mask
);
...
...
This diff is collapsed.
Click to expand it.
i2cserv/i2cthread.py
+
7
−
3
View file @
af97db25
...
...
@@ -36,19 +36,23 @@ def runmethod(conf,Qout,methodid,mask):
for
key
,
value
in
inst
.
items
():
if
not
(
isinstance
(
value
,
list
)):
value
=
[
value
]
logging
.
info
(
str
((
"
Run instruction
"
,
key
,
value
,
mask
)));
if
mask
is
None
:
mask
=
[]
if
(
key
==
'
WAIT
'
):
sleep
(
value
[
0
]
/
1000.
)
continue
;
v1
=
conf
.
getvarid
(
key
)
if
v1
:
if
value
[
0
]
==
'
Update
'
:
mask
=
getvar
(
conf
,
Qout
,
v1
,
mask
)
#mask=
getvar
(
conf
,
Qout
,
v1
,
mask
)
else
:
mask
=
setvar
(
conf
,
Qout
,
v1
,
value
,
mask
)
#mask=
setvar
(
conf
,
Qout
,
v1
,
value
,
mask
)
continue
;
v1
=
conf
.
getmethodid
(
key
)
if
v1
:
mask
=
runmethod
(
conf
,
Qout
,
v1
,
mask
)
#mask=
runmethod
(
conf
,
Qout
,
v1
,
mask
)
continue
;
v1
=
conf
.
getdevreg
(
key
)
if
v1
:
...
...
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