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
55090d60
Commit
55090d60
authored
2 years ago
by
Paulus Kruger
Browse files
Options
Downloads
Patches
Plain Diff
update from LCU
parent
92f4f245
No related branches found
No related tags found
No related merge requests found
Pipeline
#35387
passed
2 years ago
Stage: image
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bin/sync.sh
+3
-0
3 additions, 0 deletions
bin/sync.sh
bin/sync_all.sh
+3
-0
3 additions, 0 deletions
bin/sync_all.sh
install.sh
+10
-0
10 additions, 0 deletions
install.sh
pypcc/i2cserv/i2c_array.py
+22
-3
22 additions, 3 deletions
pypcc/i2cserv/i2c_array.py
with
38 additions
and
3 deletions
bin/sync.sh
0 → 100755
+
3
−
0
View file @
55090d60
#!/bin/bash
rsync
-avzh
~/pypcc pi@10.99.0.
$1
:.
ssh pi@10.99.0.
$1
"cd pypcc;sh install.sh"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
bin/sync_all.sh
0 → 100755
+
3
−
0
View file @
55090d60
#!/bin/bash
./sync.sh 100
./sync.sh 101
This diff is collapsed.
Click to expand it.
install.sh
0 → 100755
+
10
−
0
View file @
55090d60
#!/bin/bash
sudo
systemctl stop recvtr.service
sudo
systemctl stop apscttr.service
sudo
systemctl stop apsputr.service
sudo
systemctl stop unb2tr.service
sudo
python3 setup.py
install
sudo
systemctl start recvtr.service
sudo
systemctl start apscttr.service
sudo
systemctl start apsputr.service
sudo
systemctl start unb2tr.service
This diff is collapsed.
Click to expand it.
pypcc/i2cserv/i2c_array.py
+
22
−
3
View file @
55090d60
...
...
@@ -144,8 +144,9 @@ class i2c_array(i2c_dev):
if
not
(
len
(
mask
)
==
Step
*
self
.
N
):
print
(
"
Check mask length!
"
,
len
(
mask
),
Step
,
self
.
N
);
return
;
else
:
for
x
,
enanbled
in
enumerate
(
self
.
enablemask
):
else
:
if
not
(
var1
.
get
(
'
check_value
'
)):
for
x
,
enanbled
in
enumerate
(
self
.
enablemask
):
if
enanbled
:
continue
;
for
y
in
range
(
Step
):
mask
[
x
*
Step
+
y
]
=
False
;
# mask[x*Step:(x+1)*Step]=False;
...
...
@@ -186,8 +187,8 @@ class i2c_array(i2c_dev):
res
=
self
.
GetVarValue
(
devreg
,
width
,
bitoffset
,[],
mode
=
3
)
#wait if needed
# for Vari in range(Step):
# else:
for
RCUi
in
self
.
RCUorder
:
# for Vari in range(Step):
for
RCUi
in
self
.
RCUorder
:
if
not
(
mask
[
RCUi
*
Step
+
Vari
]):
continue
i0
=
(
RCUi
*
Step
+
Vari
)
*
Step2
i1
=
(
RCUi
*
Step
+
(
Vari
+
1
))
*
Step2
...
...
@@ -209,6 +210,24 @@ class i2c_array(i2c_dev):
continue
;
self
.
I2Cmask
[
RCUi
]
=
0
;
value1
[
i0
:
i1
]
=
value2
if
var1
.
get
(
'
check_value
'
):
check_val
=
var1
.
get
(
'
check_value
'
)
Ncheck
=
len
(
check_val
);
if
Ncheck
>
Step2
:
Ncheck
=
Step2
;
for
Vari
in
range
(
Step
):
for
RCUi
in
self
.
RCUorder
:
if
not
(
mask
[
RCUi
*
Step
+
Vari
]):
continue
i0
=
(
RCUi
*
Step
+
Vari
)
*
Step2
i1
=
(
RCUi
*
Step
+
(
Vari
+
1
))
*
Step2
if
value1
[
i0
]
is
None
:
#print(RCUi,'None')
self
.
enablemask
[
RCUi
]
=
False
;
continue
;
for
x
in
range
(
Ncheck
):
#print(RCUi,ord(check_val[x]),value1[i0+x])
if
ord
(
check_val
[
x
])
!=
value1
[
i0
+
x
]:
self
.
enablemask
[
RCUi
]
=
False
;
logging
.
warn
(
str
((
"
Identify RCUs:
"
,
check_val
,
self
.
enablemask
)))
return
value1
,
mask
def
getstorearray
(
self
,
devreg
,
N
=
1
):
...
...
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