mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
Fix
This commit is contained in:
parent
1a81b4a81a
commit
26b4ea360e
@ -63,12 +63,18 @@ def property_to_string(property: DeviceProperty, devices: list[Device]) -> str:
|
||||
type = property.type
|
||||
if type == "value" or type == "int":
|
||||
return property.value
|
||||
elif type == "boolean":
|
||||
elif type == "boolean" or type == "bool":
|
||||
return "true"
|
||||
elif type == "text":
|
||||
return f"\"{property.value}\""
|
||||
elif type == "values":
|
||||
return "{ " + ",".join(property.value) + " }"
|
||||
value_list = list()
|
||||
for item in property.value:
|
||||
if isinstance(item, PropertyValue):
|
||||
value_list.append(property_to_string(DeviceProperty(name="", type=item.type, value=item.value), devices))
|
||||
else:
|
||||
value_list.append(str(item))
|
||||
return "{ " + ",".join(value_list) + " }"
|
||||
elif type == "phandle":
|
||||
return find_phandle(devices, property.value)
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user