frappy_psi.sea: fix buf, revert change of updateEvent to udpateItem
this is not possible in ProxyClient
This commit is contained in:
parent
f382a01d86
commit
edf5a5568b
@ -161,7 +161,7 @@ class SeaClient(ProxyClient, Module):
|
|||||||
self.objects.add(obj)
|
self.objects.add(obj)
|
||||||
for k, v in module.path2param.items():
|
for k, v in module.path2param.items():
|
||||||
self.path2param.setdefault(k, []).extend(v)
|
self.path2param.setdefault(k, []).extend(v)
|
||||||
self.register_callback(module.name, module.updateItem)
|
self.register_callback(module.name, module.updateEvent)
|
||||||
|
|
||||||
def _connect(self):
|
def _connect(self):
|
||||||
try:
|
try:
|
||||||
@ -663,12 +663,12 @@ class SeaModule(Module):
|
|||||||
result = Module.__new__(newcls)
|
result = Module.__new__(newcls)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def updateItem(self, module, parameter, item):
|
def updateEvent(self, module, parameter, value, timestamp, readerror):
|
||||||
upd = getattr(self, 'update_' + parameter, None)
|
upd = getattr(self, 'update_' + parameter, None)
|
||||||
if upd:
|
if upd:
|
||||||
upd(*item)
|
upd(value, timestamp, readerror)
|
||||||
return
|
return
|
||||||
self.announceUpdate(parameter, *item)
|
self.announceUpdate(parameter, value, readerror, timestamp)
|
||||||
|
|
||||||
def initModule(self):
|
def initModule(self):
|
||||||
self.io.register_obj(self, self.sea_object)
|
self.io.register_obj(self, self.sea_object)
|
||||||
@ -778,10 +778,10 @@ class SeaDrivable(SeaReadable, Drivable):
|
|||||||
return IDLE, f'started, but not running'
|
return IDLE, f'started, but not running'
|
||||||
return IDLE, ''
|
return IDLE, ''
|
||||||
|
|
||||||
def update_target(self, module, parameter, item):
|
def update_target(self, module, parameter, value, timestamp, readerror):
|
||||||
# TODO: check if this is needed
|
# TODO: check if this is needed
|
||||||
if item.value is not None:
|
if value is not None:
|
||||||
self.target = item.value
|
self.target = value
|
||||||
|
|
||||||
@Command()
|
@Command()
|
||||||
def stop(self):
|
def stop(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user