Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezade authored and alirezade committed Jan 10, 2024
1 parent 6c76534 commit 64b3e6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ics_sim/Device.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def add_sensor(self, tag, fault):
def read(self, tag):
if tag in self._sensors.keys():
value = self._get(tag)
if value is None:
print(f"The tag: {tag} recieved null value from databse. return -1!")
return -1
# if value is None:
# print(f"The tag: {tag} recieved null value from databse. return -1!")
# return -1
value += random.uniform(value, -1 * value) * self._sensors[tag]
return value
else:
Expand Down Expand Up @@ -423,7 +423,7 @@ def __init__(self, name, tags, plcs, loop=SpeedConfig.DEFAULT_PLC_PERIOD_MS):

def _before_start(self):
DcsComponent._before_start(self)
self._set_clear_scr(True)
self._set_clear_scr(False) # todo: return it back to false

def _logic(self):
self._display()
Expand Down

0 comments on commit 64b3e6f

Please sign in to comment.