Skip to content

board: fix LightsManager init call for Freenove ESP32-S3 - #1

Merged
scott-macg merged 1 commit into
mainfrom
scott-macg-patch-1
Jul 16, 2026
Merged

board: fix LightsManager init call for Freenove ESP32-S3#1
scott-macg merged 1 commit into
mainfrom
scott-macg-patch-1

Conversation

@scott-macg

Copy link
Copy Markdown
Owner

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.

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.
@scott-macg
scott-macg merged commit eac6743 into main Jul 16, 2026
6 of 7 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +217 to +218
LightsManager.init(neopixel_pin=42)
LightsManager.set_led_num(1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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().

Suggested change
LightsManager.init(neopixel_pin=42)
LightsManager.set_led_num(1)
LightsManager.init(neopixel_pin=42)
LightsManager.set_led_num(1)
LightsManager.clear()
LightsManager.write()

@scott-macg
scott-macg deleted the scott-macg-patch-1 branch July 22, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant