fix(espnow): start ESP-NOW before the pattern library on boot
On the ESP32-C3 the radio tasks failed to start (Wifi Unknown Error 0x0101) on about every other cold boot once the link and beat modules were loaded. Bringing ESP-NOW up before the pattern library and the LED driver claim memory made 6 of 6 cold boots start cleanly. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
20d1af7177
commit
940d1d0a77
1 file changed
+4
-1
+4
-1
@@ -26,6 +26,10 @@ dg.load_from_settings(settings)
|
||||
print(settings)
|
||||
gc.collect()
|
||||
|
||||
# Bring Wi-Fi up before the pattern library and the LED driver claim memory: on the ESP32-C3 the radio
|
||||
# tasks otherwise fail to start on about every other cold boot (Wifi Unknown Error 0x0101)
|
||||
esp = init_espnow(settings)
|
||||
|
||||
presets = Presets(settings["led_pin"], settings["num_leds"])
|
||||
presets.load(settings)
|
||||
presets.b = settings.get("brightness", 255)
|
||||
@@ -34,7 +38,6 @@ gc.collect()
|
||||
|
||||
apply_startup_pattern(settings, presets)
|
||||
|
||||
esp = init_espnow(settings)
|
||||
print(network.WLAN(network.STA_IF).config("channel"))
|
||||
|
||||
hello = json.dumps({
|
||||
|
||||
Reference in new issue
Block a user