-
Notifications
You must be signed in to change notification settings - Fork 8
Feature/software icon export on pr11 #12
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
Open
timoteuszelle
wants to merge
11
commits into
FrameworkComputer:usbserial
Choose a base branch
from
timoteuszelle:feature/software-icon-export-on-pr11
base: usbserial
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/software icon export on pr11 #12
timoteuszelle
wants to merge
11
commits into
FrameworkComputer:usbserial
from
timoteuszelle:feature/software-icon-export-on-pr11
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… to keep matrix awake
Member
|
You're working together, so we can close #11? |
Member
|
I merged #10, please help fix the conflicts that came up now. |
JohnAZoidberg
requested changes
Jan 26, 2026
Member
JohnAZoidberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty simple overall, please dedup the code for left and right
- Fix README.md typo (Controlh -> Control) - Move feature documentation to proper Features section - Remove commented-out startWakeLoop() line - Fix comment: '39 x 9' -> '34 x 9' (correct dimensions) - Deduplicate matrix helper functions: - Combine getRawValsMatrixLeft/Right into getRawVals(matrix) - Combine setMatrixLeftFromVals/setMatrixRightFromVals into setMatrixFromVals(matrix, vals) - Combine setMatrixLeftFromRawVals/setMatrixRightFromRawVals into setMatrixFromRawVals(matrix, vals) - Change UI label from 'Persist' to 'Keep Awake' for clarity
- Replace triple negation with explicit ternary operator - Remove unused raw parameter and dead code path - Simplify export button handlers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is stacked directly on top of PR #11 (Import and Export patterns by @MidnightJava) and adds a software-oriented JSON export feature. All of the behavior from PR #11 remains unchanged.
Relationship to PR #11
That means maintainers can:
Additions in this PR
1. UI: “Export for Software” section
Below the existing Import/Export buttons, this PR adds:
Format options
Binary (0/1)Grayscale (0–255)(default)Layout
9 x 34), matching the physical LED matrix orientation and my icon library usage.Buttons
Export Left (JSON)Export Right (JSON)The existing Import/Export buttons and the 39‑byte hardware pattern format from PR #11 remain exactly as implemented there.
2. JSON export format
The new buttons generate a
.jsonfile with:Shape
9 x 34(outer array = columns, inner array = rows)Values
0(off) or1(on)0(off) or255(fully lit)This is derived from the existing convention where
matrix[row][col] === 0means “LED on”.Filenames follow this pattern, e.g.:
matrix_left_grayscale_colmajor.jsonmatrix_right_binary_colmajor.json3. Implementation details
index.htmlExport Left/Right (JSON)buttons.app.jsinitSoftwareExportOptions()in the main$(function() { ... }).initSoftwareExportOptions():#exportLeftSoftwareBtn/#exportRightSoftwareBtnto the new behavior.exportFormatradio value.exportMatrixSoftware(matrix, side, grayscale):9 x 34array from the existingmatrix_*.0/1cells to0/1or0/255.Compatibility
Happy to adjust naming/text if you prefer different terminology for the new options.