Skip to content

Commit

Permalink
Commented out print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mfioren committed Jan 30, 2024
1 parent ee26ca7 commit 9f1b40b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions simulators/dbesm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _init_att(self):
return att

def parse(self, byte):
print(byte)
# print(byte)
if byte == self.tail:
msg = self.msg[:-1]
self.msg = ''
Expand All @@ -159,7 +159,7 @@ def _execute(self, msg):
:param msg: the received command, comprehensive of its header and tail.
"""
print(msg)
# print(msg)
args = [x.strip() for x in msg.split(' ')]
try:
device_code = list(self.devices.keys())[
Expand Down Expand Up @@ -470,20 +470,20 @@ def _set_dbeatt(self, params):
brd, a = zip(*self.atts_in_boards)
for board in selected_boards:
b_idx = selected_boards.index(board)
print(brd)
print(board["ATT"])
print(board["ATT"][a[out_idx[b_idx]]])
# print(brd)
# print(board["ATT"])
# print(board["ATT"][a[out_idx[b_idx]]])
if ((params[2] == '+3' or params[2] == '-3') and
not (0 <= (float(board["ATT"][a[out_idx[b_idx]]]) +
float(params[2])) <= 31.5)):
not (0 <= (float(board["ATT"][a[out_idx[b_idx]]])
+ float(params[2])) <= 31.5)):
retval += (f'ERR DBE {params[1]} BOARD '
f'{board["Address"]} value out of range\n')
elif (params[2] != '+3' and params[2] != '-3'
and float(params[2]) not in
list(numpy.arange(0, 32, 0.5))):
retval += (f'ERR DBE {params[1]} BOARD '
f'{board["Address"]} value out of range\n')
elif board["Status"] != 0:
elif ((board["Status"] != 0) or (board["Address"] not in brd)):
retval += (f'ERR DBE {params[1]} BOARD '
f'{board["Address"]} unreachable\n')
else:
Expand Down Expand Up @@ -514,11 +514,11 @@ def _get_dbeatt(self, params):
brd, a = zip(*self.atts_in_boards)
for board in selected_boards:
b_idx = selected_boards.index(board)
print(brd)
print(board["ATT"])
print(board["ATT"][a[out_idx[b_idx]]])
# print(brd)
# print(board["ATT"])
# print(board["ATT"][a[out_idx[b_idx]]])

if board["Status"] != 0:
if ((board["Status"] != 0) or (board["Address"] not in brd)):
retval += (f'ERR DBE {params[1]} BOARD '
f'{board["Address"]} unreachable\n')
else:
Expand Down

0 comments on commit 9f1b40b

Please sign in to comment.