Skip to content

Fix: Add missing mXLed and mYLed instance variables in AdalightClient#28

Merged
b1ume merged 2 commits into
mainfrom
copilot/add-missing-led-variables
Feb 15, 2026
Merged

Fix: Add missing mXLed and mYLed instance variables in AdalightClient#28
b1ume merged 2 commits into
mainfrom
copilot/add-missing-led-variables

Conversation

Copilot AI commented Feb 15, 2026

Copy link
Copy Markdown
Contributor

Compilation was failing with "cannot find symbol" errors at lines 50, 51, 176, 196, and 223 in AdalightClient.java because mXLed and mYLed were used but never declared.

Changes

Added missing instance variable declarations:

private int mXLed;
private int mYLed;

These variables are assigned from LedDataExtractor.LedConfig in the constructor and used throughout for LED count calculations and data extraction.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.10.2-all/7iv73wktx1xtkvlq19urqw1wm/gradle-8.10.2/lib/gradle-daemon-main-8.10.2.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.10.2-all/7iv73wktx1xtkvlq19urqw1wm/gradle-8.10.2/lib/agents/gradle-instrumentation-agent-8.10.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.10.2 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

The Java compilation is failing because the AdalightClient class is using mXLed and mYLed variables throughout the code, but these instance variables are not declared in the class.

Error Details

Compilation errors at lines 50, 51, 176, 196, and 223 in common/src/main/java/com/hyperion/grabber/network/AdalightClient.java:

error: cannot find symbol
  symbol:   variable mXLed
  location: class AdalightClient

error: cannot find symbol
  symbol:   variable mYLed
  location: class AdalightClient

Solution Required

Add the missing instance variable declarations in the AdalightClient class at common/src/main/java/com/hyperion/grabber/network/AdalightClient.java.

The variables should be added to the instance variable section (around lines 33-42) alongside the existing variables:

  • private final Context mContext;
  • private final int mPriority;
  • private final int mBaudRate;
  • etc.

Add these two declarations:

private int mXLed;
private int mYLed;

These variables are assigned values in the constructor at lines 50-51:

mXLed = ledConfig.xLed;
mYLed = ledConfig.yLed;

And are used in methods throughout the class:

  • Line 176: int ledCount = Math.max(2 * (mXLed + mYLed), 1);
  • Line 196: int ledCount = Math.max(2 * (mXLed + mYLed), 1);
  • Line 223: mLedDataBuffer = LedDataExtractor.extractLEDData(data, width, height, mXLed, mYLed, mLedDataBuffer);

The fix should be applied to commit ffa8afd5e370c4705a62cd54c67c3063771d3207.

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: haumlab <222520099+haumlab@users.noreply.github.com>
Copilot AI changed the title [WIP] Add missing instance variables mXLed and mYLed in AdalightClient Fix: Add missing mXLed and mYLed instance variables in AdalightClient Feb 15, 2026
Copilot AI requested a review from b1ume February 15, 2026 22:13
@b1ume
b1ume marked this pull request as ready for review February 15, 2026 22:31
Copilot AI review requested due to automatic review settings February 15, 2026 22:31
@b1ume
b1ume merged commit af7dc4c into main Feb 15, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes a compilation failure in the network client layer by declaring previously missing LED-dimension instance fields used for LED count calculations and image-to-LED extraction.

Changes:

  • Added mXLed and mYLed instance variables to AdalightClient.
  • Ensures constructor assignments and downstream usages compile successfully.

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

Comment on lines +36 to +37
private int mXLed;
private int mYLed;

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

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

mXLed/mYLed are only assigned once in the constructor and never reassigned; consider making them final to match the rest of the immutable configuration fields in this client (and e.g. WLEDClient).

Suggested change
private int mXLed;
private int mYLed;
private final int mXLed;
private final int mYLed;

Copilot uses AI. Check for mistakes.
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.

3 participants