Skip to content

Commit

Permalink
fix laser-controller
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanminet committed Jun 16, 2017
1 parent 74c96cf commit 324f2c4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/laser-controller/test.py
Expand Up @@ -17,12 +17,12 @@ def stop(self):
pass

@command()
def get_power(self):
return self.client.recv_uint32()
def get_measured_power(self):
return self.client.recv_float()

@command()
def get_current(self):
return self.client.recv_uint32()
def get_measured_current(self):
return self.client.recv_float()

@command()
def set_current(self, current):
Expand All @@ -31,10 +31,10 @@ def set_current(self, current):

if __name__=="__main__":
host = os.getenv('HOST','192.168.1.100')
client = connect(host, 'laser_controller')
client = connect(host, 'laser-controller')
laser = Laser(client)

laser.start()
for i in range(40):
laser.set_current(i)
print(laser.get_current, laser.get_power())
print(laser.get_measured_current(), laser.get_measured_power())

0 comments on commit 324f2c4

Please sign in to comment.