Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 14, 2026

The ESP32LEDMatrixManager was setting channel_index = "led" (lowercase), causing it to fail case-sensitive comparisons for "LED" in ESP32LEDLaserManager.py and breaking LED channel recognition.

Changes

  • Changed channel_index from "led" to "LED" in ESP32LEDMatrixManager.__init__() to match:
    • Case-sensitive equality checks in ESP32LEDLaserManager.setEnabled() (line 96) and setValue() (line 114)
    • Uppercase "LED" values in configuration files (example_histo_daheng.json, FRAME2b.json, example_uc2.json)
# Before
self.channel_index = "led"  # Would not match == "LED" checks

# After  
self.channel_index = "LED"  # Matches case-sensitive comparisons

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: beniroquai <4345528+beniroquai@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on Uv docs from review comments Fix LED channel case inconsistency in ESP32LEDMatrixManager Jan 14, 2026
Copilot AI requested a review from beniroquai January 14, 2026 14:37
@beniroquai beniroquai marked this pull request as ready for review January 14, 2026 14:44
Copilot AI review requested due to automatic review settings January 14, 2026 14:44
@beniroquai beniroquai merged commit 693b851 into uv-docs Jan 14, 2026
@beniroquai beniroquai deleted the copilot/sub-pr-209-yet-again branch January 14, 2026 14:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where the ESP32LEDMatrixManager was setting channel_index to lowercase "led", causing it to fail case-sensitive string comparisons against uppercase "LED" in ESP32LEDLaserManager and other parts of the codebase.

Changes:

  • Changed the hardcoded channel_index value from "led" to "LED" in ESP32LEDMatrixManager.__init__() to match case-sensitive equality checks used throughout the codebase
Comments suppressed due to low confidence (2)

imswitch/imcontrol/model/managers/LEDMatrixs/ESP32LEDMatrixManager.py:28

  • Except block directly handles BaseException.
        except:

imswitch/imcontrol/model/managers/LEDMatrixs/ESP32LEDMatrixManager.py:36

  • Except block directly handles BaseException.
        except:

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants