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 592bd5d commit 6c76534
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ics_sim/Device.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +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
value += random.uniform(value, -1 * value) * self._sensors[tag]
return value
else:
Expand Down

0 comments on commit 6c76534

Please sign in to comment.