Skip to content

Commit

Permalink
Merge pull request #89 from luxonis/option/flash-mac-address
Browse files Browse the repository at this point in the history
Add flash_mac_address option
  • Loading branch information
Jakoma02 authored Jun 17, 2024
2 parents d10091f + 82c3879 commit 65729fa
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions boards_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,22 @@ class UsbConfig(BaseModel):
network: NetworkConfig = NetworkConfig()
usb: UsbConfig = UsbConfig()

class MacAddressGeneratingMethod(str, Enum):
last_serial_number_digits = "last_serial_number_digits"

class FlashMacAddressConfig(BaseModel):
generating_method: MacAddressGeneratingMethod
""" Method used to generate the MAC address. """

prefix: str
""" MAC address prefix to be used for all generated MAC addresses. """

prefix_bits: int
""" Number of bits to be used from the prefix. """

serial_number_digits: Optional[int]
""" Number of digits to be used from the serial number. """

class Options(BaseModel):
bootloader: BootloaderType
bootloader_config: Optional[BootloaderConfig] = None
Expand Down Expand Up @@ -165,6 +181,8 @@ class Options(BaseModel):
cameras: List[BasicCameraInfo] = []
"""List of cameras on board. (If specified this camera config is preferred over board_options for testing)"""

flash_mac_address: Optional[FlashMacAddressConfig] = None
""" Configuration for generating MAC addresses during flashing. """

class EepromData(BaseModel):
boardConf: Optional[str] = None
Expand Down

0 comments on commit 65729fa

Please sign in to comment.