Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
scouting-demonstrator
SCONE
Commits
e76e32f0
Commit
e76e32f0
authored
Feb 01, 2021
by
Gaia Grosso
Browse files
correct error at line 87
parent
cef468e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.py
View file @
e76e32f0
...
...
@@ -80,11 +80,11 @@ def WriteProperty(device, location, offset, width, write_value, verbose=0):
print
(
"An error occured while executing C function write_bits."
)
return
-
1
# Readback as checkout
isReadcheck
=
ctypes
.
c_uint
(
reg
.
read_bits
(
device
,
location
,
ctypes
.
byref
(
read_value
),
ctypes
.
c_uint
(
verbose
)
)).
value
isReadcheck
=
ctypes
.
c_uint
(
cfunc
.
read_bits
(
device
,
location
,
ctypes
.
byref
(
read_value
),
ctypes
.
c_uint
(
verbose
)
)).
value
if
isReadcheck
==
-
1
:
print
(
"An error occured while executing C function read_bits"
)
return
-
1
if
read_value_new
==
output
:
if
isReadcheck
==
output
:
return
0
else
:
print
(
"Readback failed. Register not writable."
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment