diff --git a/script/local.py b/script/local.py index 36875d8..b69a1b0 100644 --- a/script/local.py +++ b/script/local.py @@ -10,7 +10,7 @@ from ch.psi.pshell.modbus import ModbusTCP run("RobotSC") #run("RobotModbus") - +run("onewire") diff --git a/script/test/onewire.py b/script/test/onewire.py index ab50474..5141067 100644 --- a/script/test/onewire.py +++ b/script/test/onewire.py @@ -60,12 +60,17 @@ class Esera(TcpDevice): raise def doUpdate(self): - #if not self.self.complete: - # if len(take()) == 30: - # self.complete = True - # self.start() - print "OK" - #self.req_data() + if not self.complete: + init = True + for det in self.detectors: + if det.id == None: + init = False + break + if init: + self.complete = True + self.start() + + self.req_data() #def onByte(self, rx): # print rx