Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] rgb matrix effect bug. #23850

Closed
2 tasks
itarze opened this issue Jun 2, 2024 · 5 comments
Closed
2 tasks

[Bug] rgb matrix effect bug. #23850

itarze opened this issue Jun 2, 2024 · 5 comments

Comments

@itarze
Copy link
Contributor

itarze commented Jun 2, 2024

Describe the Bug

https://github.com/qmk/qmk_firmware/blob/master/quantum/rgb_matrix/animations/pixel_fractal_anim.h

This RGB effect does not limit the NO_LED and will cause access to the wild pointer, which will cause the MCU to malfunction.

Keyboard Used

No response

Link to product page (if applicable)

No response

Operating System

No response

qmk doctor Output

No response

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

@itarze itarze changed the title [Bug] rgb matgrix effect bug. [Bug] rgb matrix effect bug. Jun 2, 2024
@drashna
Copy link
Member

drashna commented Jun 8, 2024

I'm curious which controller this is for. I can't replicate the MCU crash using an STM32F303 (using a moonlander, which does have a bunch of NO_LED values)

@jiaxin96
Copy link
Contributor

jiaxin96 commented Jul 6, 2024

same as #23348

@itarze
Copy link
Contributor Author

itarze commented Jul 23, 2024

I'm curious which controller this is for. I can't replicate the MCU crash using an STM32F303 (using a moonlander, which does have a bunch of NO_LED values)

Set NO LED to the left half of the keyboard RGB MATRIX, Like this.
image

@itarze
Copy link
Contributor Author

itarze commented Jul 23, 2024

And, This will slove it. Maybe not the best solution.

void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
    if (index >= RGB_MATRIX_LED_COUNT) {
        return;
    }
    rgb_matrix_driver.set_color(index, red, green, blue);
}

@itarze
Copy link
Contributor Author

itarze commented Jul 23, 2024

This problem was generated randomly because this lamp effect used random8(), and it may be that you were not able to reproduce it for this reason.

@zvecr zvecr closed this as completed Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants