refactor(led-driver): transport layout, fixed tcp port, server_ip settings

Made-with: Cursor
This commit is contained in:
pi
2026-04-05 20:59:30 +12:00
parent 7bfdcd9bee
commit 7e3aca491c
2 changed files with 58 additions and 60 deletions

View File

@@ -21,11 +21,12 @@ class Settings(dict):
self["debug"] = False
self["default"] = "on"
self["brightness"] = 32
# STA + TCP to led-controller (Pi): leave wifi_ssid empty for ESP-NOW-only (channel 1).
self["wifi_ssid"] = ""
self["wifi_password"] = ""
self["controller_host"] = ""
self["controller_port"] = 8765
self["transport_type"] = "espnow"
self["wifi_channel"] = 1
# Wi-Fi + TCP to Pi: leave ssid empty for ESP-NOW-only.
self["ssid"] = ""
self["password"] = ""
self["server_ip"] = ""
def save(self):
try:
@@ -47,7 +48,6 @@ class Settings(dict):
self.set_defaults()
self.save()
def get_color_order(self, color_order):
"""Convert color order string to tuple of hex string indices."""
color_orders = {