Skip to content

Commit

Permalink
Merge pull request #3 from kiwigrid/bugfix/fix-reading-register
Browse files Browse the repository at this point in the history
Fixed endpoint for reading register
  • Loading branch information
MatijaMitic authored Dec 21, 2020
2 parents d0d2dc2 + 875ef88 commit 99d7c87
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ def slave_read(slave_id, block, address):
global sim
if slave_id not in sim.slaves:
return "Slave does not exist", 400
slave = sim.server.get_slave(slave_id)
value = slave.get_values(block, address, 1)
return str(value[0])

Expand Down

0 comments on commit 99d7c87

Please sign in to comment.