Implemented dynamic sleepmask configuration command.

This commit is contained in:
Jakob Friedl
2025-09-19 10:11:20 +02:00
parent 971bb6c8df
commit 3173122878
4 changed files with 65 additions and 29 deletions

View File

@@ -12,16 +12,13 @@ type
protocol: int32
protocols: seq[string]
proc getProtocols(): seq[string] =
for p in Protocol.low .. Protocol.high:
result.add($p)
proc ListenerModal*(): ListenerModalComponent =
result = new ListenerModalComponent
zeroMem(addr result.address[0], 256)
result.port = DEFAULT_PORT
result.protocol = 0
result.protocols = getProtocols()
for p in Protocol.low .. Protocol.high:
result.protocols.add($p)
proc resetModalValues(component: ListenerModalComponent) =
zeroMem(addr component.address[0], 256)