make it possible to send board config messages

This commit is contained in:
Laura Klünder 2023-10-20 00:18:02 +02:00
parent e70bd7e0e2
commit e75896d44c
4 changed files with 66 additions and 45 deletions

View file

@ -101,6 +101,12 @@ class EnumFormat(SimpleFormat):
def get_c_parts(self):
return self.c_struct_name, ""
def fromjson(self, data):
return self.field_type[data]
def tojson(self, data):
return data.name
def get_c_definitions(self) -> dict[str, str]:
prefix = normalize_name(self.field_type.__name__).upper()
options = []