some more fixes to the c formats

This commit is contained in:
Laura Klünder 2024-03-29 18:01:35 +01:00
parent 5a074250e4
commit 299c77fb8b
2 changed files with 9 additions and 9 deletions

View file

@ -184,7 +184,7 @@ class ConfigUplinkMessage(discriminator_value(msg_type=MeshMessageType.CONFIG_UP
enabled: bool
ssid: Annotated[str, MaxLen(32)]
password: Annotated[str, MaxLen(64)]
channel: Annotated[PositiveInt, Le(15)]
channel: Annotated[NonNegativeInt, Le(15)]
udp: bool
ssl: bool
host: Annotated[str, MaxLen(64)]

View file

@ -59,9 +59,9 @@ class BoardSPIConfig(BaseModel):
"""
configuration for spi bus used for ETH or UWB
"""
gpio_miso: Annotated[PositiveInt, Lt(2**8)]
gpio_mosi: Annotated[PositiveInt, Lt(2**8)]
gpio_clk: Annotated[PositiveInt, Lt(2**8)]
gpio_miso: Annotated[NonNegativeInt, Lt(2**8)]
gpio_mosi: Annotated[NonNegativeInt, Lt(2**8)]
gpio_clk: Annotated[NonNegativeInt, Lt(2**8)]
class UWBConfig(BaseModel):
@ -69,11 +69,11 @@ class UWBConfig(BaseModel):
configuration for the connection to the UWB module
"""
enable: bool
gpio_cs: Annotated[PositiveInt, Lt(2**8)]
gpio_irq: Annotated[PositiveInt, Lt(2**8)]
gpio_rst: Annotated[PositiveInt, Lt(2**8)]
gpio_wakeup: Annotated[PositiveInt, Lt(2**8)]
gpio_exton: Annotated[PositiveInt, Lt(2**8)]
gpio_cs: Annotated[NonNegativeInt, Lt(2**8)]
gpio_irq: Annotated[NonNegativeInt, Lt(2**8)]
gpio_rst: Annotated[NonNegativeInt, Lt(2**8)]
gpio_wakeup: Annotated[NonNegativeInt, Lt(2**8)]
gpio_exton: Annotated[NonNegativeInt, Lt(2**8)]
class UplinkEthConfig(BaseModel):