fix handling of unknown sea messages
This commit is contained in:
@ -229,10 +229,13 @@ class SeaClient(ProxyClient, Module):
|
||||
started_callback = None
|
||||
continue
|
||||
if flag != 'hdbevent':
|
||||
if obj != 'frappy_async_client':
|
||||
if obj not in ('frappy_async_client', 'get_all_param'):
|
||||
print('SKIP', msg)
|
||||
continue
|
||||
if data is None:
|
||||
if not data:
|
||||
continue
|
||||
if not isinstance(data, dict):
|
||||
print('what means %r' % msg)
|
||||
continue
|
||||
now = time.time()
|
||||
for path, value in data.items():
|
||||
@ -413,7 +416,7 @@ class SeaModule(Module):
|
||||
if result[0]['path'] != '':
|
||||
pass # TODO: check these cases
|
||||
result[0]['key'] = 'value'
|
||||
logger.info('PARAMS %s %r', name, result)
|
||||
# logger.info('PARAMS %s %r', name, result)
|
||||
base = descr['base']
|
||||
params = descr['params']
|
||||
extra_module_set = cfgdict.pop('extra_modules', ())
|
||||
@ -466,7 +469,7 @@ class SeaModule(Module):
|
||||
extra_modules[name + '.' + key] = sea_object, base, paramdesc
|
||||
continue # skip this parameter
|
||||
path2param[hdbpath] = (name, key)
|
||||
logger.info('PARAM %s %s %s', hdbpath, name, key)
|
||||
# logger.info('PARAM %s %s %s', hdbpath, name, key)
|
||||
attributes[key] = pobj
|
||||
# if hasattr(cls, 'read_' + key):
|
||||
# print('override %s.read_%s' % (cls.__name__, key))
|
||||
@ -601,4 +604,4 @@ class SeaDrivable(SeaModule, Drivable):
|
||||
self.target = value
|
||||
|
||||
def stop(self):
|
||||
self._iodev.query('%s is_running 0' % self.sea_object)
|
||||
self._iodev.query('%s is_running 0' % self.sea_object)
|
||||
|
Reference in New Issue
Block a user