Commit a17569fe authored by Gaia Grosso's avatar Gaia Grosso
Browse files

- at line 87 I replace isReadCheck with read_value.value: the variable which...

- at line 87 I replace isReadCheck with read_value.value: the variable which returns the read out is indeed read_value; isReadCheck just returns a label (0/-1) telling whether the reading was successful.
- at line 100 I change the argument type from str to int so that there is no need of an exception (the old merge request can be dismissed)
parent 8c9107d2
......@@ -84,7 +84,7 @@ def WriteProperty(device, location, offset, width, write_value, verbose=0):
if isReadcheck == -1:
print("An error occured while executing C function read_bits")
return -1
if isReadcheck == output:
if read_value.value == output:
return 0
else:
print("Readback failed. Register not writable.")
......@@ -97,7 +97,7 @@ if __name__ == '__main__':
parser.add_argument('-b','--board', type=str, help="scouting board", required=True)
parser.add_argument('-a','--action', type=str, help="control action", required=True, choices=actions)
parser.add_argument('-r','--register', type=str, help="control register", required=True)
parser.add_argument('-v','--value', type=str, help="new value", required=False)
parser.add_argument('-v','--value', type=int, help="new value", required=False)
parser.add_argument('-f','--filelog', type=str, help="logfile", required=False)
parser.add_argument('-d','--dump', type=int ,help="dump messages", required=False, default=0)
args = parser.parse_args()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment