Skip to content

Led Grouping v4#21

Open
mekathegapple wants to merge 5 commits intoled-subsystemfrom
mert/led-grouping-v4
Open

Led Grouping v4#21
mekathegapple wants to merge 5 commits intoled-subsystemfrom
mert/led-grouping-v4

Conversation

@mekathegapple
Copy link
Collaborator

brand new grouping system, uses 2 arrays instead of HashMaps and stores group details in Constants.java

closes #20

AddressableLEDBufferView group = m_buffer.createView(startingIndex, endingIndex); //create new group(view)
m_groupList.put(groupID, group);
m_patternList.put(groupID, k_defaultPattern); //initially set the defaultPattern, so the runPattern command doesn't break
m_groupList[m_groupList.length] = group; //add the group to the groupList
Copy link
Member

Choose a reason for hiding this comment

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

This causes a NullPointerException, because the array is never initialized with a size and cannot grow dynamically. Replace the arrays with ArrayList so you can add groups safely. same thing for the patternlist.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes I guess I thought about Python arrays while writing it, instead of ArrayList's I've initialized the arrays with the required size in the constructor class. Also coming in the next commit.

mekathegapple and others added 4 commits August 17, 2025 19:06
…izing arrays with required size beforehand and changed the name groupIndexes back to groupIDS as it caused confusion.
…functions properly in disabled mod. Works in simulation finally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants