board: fix LightsManager init call for Freenove ESP32-S3 - #1
Conversation
Fixes a TypeError during boot on the Freenove ESP32-S3 board (AKA Hosyond ES3C28P) where LightsManager.init() was called with the deprecated num_leds keyword argument. This was preventing MPOS from initializing.
There was a problem hiding this comment.
Code Review
This pull request updates the NeoPixel initialization flow in freenove_esp32s3_display.py by separating the pin initialization and setting the number of LEDs. The reviewer noted that this change causes a regression where the LED is no longer cleared on boot, and suggested explicitly calling clear() and write() to ensure the LED is turned off on startup.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| LightsManager.init(neopixel_pin=42) | ||
| LightsManager.set_led_num(1) |
There was a problem hiding this comment.
With the new initialization flow, LightsManager.set_led_num(1) initializes the NeoPixel with clear_on_init=False. This means the NeoPixel is no longer cleared (turned off) on boot, which is a regression from the previous behavior where init cleared the LEDs. To ensure the LED is turned off on startup, we should explicitly call clear() and write().
| LightsManager.init(neopixel_pin=42) | |
| LightsManager.set_led_num(1) | |
| LightsManager.init(neopixel_pin=42) | |
| LightsManager.set_led_num(1) | |
| LightsManager.clear() | |
| LightsManager.write() |
Fixes a TypeError during boot on the Freenove ESP32-S3 board (AKA Hosyond ES3C28P) where LightsManager.init() was called with the deprecated num_leds keyword argument. This was preventing MPOS from initializing.