add possibility to set LED_CONFIG message
This commit is contained in:
parent
c5ac3ceb76
commit
e0961c16c1
5 changed files with 137 additions and 36 deletions
|
@ -138,14 +138,3 @@ class LedConfigFormat:
|
|||
else:
|
||||
raise ValueError
|
||||
return value, data[4:]
|
||||
|
||||
def from_json(self, value):
|
||||
if value is None:
|
||||
return None
|
||||
|
||||
type_ = value.pop('type')
|
||||
if type_ == 'serial':
|
||||
return SerialLedConfig(**value)
|
||||
elif type_ == 'multipin':
|
||||
return MultipinLedConfig(**value)
|
||||
raise ValueError
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue