Update Python API to control up to 256 LED#51
Open
areid-van wants to merge 5 commits intoarvydas:masterfrom
Open
Update Python API to control up to 256 LED#51areid-van wants to merge 5 commits intoarvydas:masterfrom
areid-van wants to merge 5 commits intoarvydas:masterfrom
Conversation
Allows ATTiny85 to address twice as many LED with its limited memory
areid-van
commented
Sep 8, 2017
| self.mode = self.get_mode() | ||
|
|
||
| def _usb_get_string(self, device, index): | ||
| def _usb_get_string(self, device, length, index): |
Author
There was a problem hiding this comment.
My USB library seemed to require a length parameter which required a lot of changes like this. Not sure if this is appropriate for master. I could revert.
areid-van
commented
Sep 8, 2017
| report_id = 9 | ||
| elif led_count <= 128 * 3: | ||
| max_leds = 128 | ||
| report_id = 10 |
Author
There was a problem hiding this comment.
Add support for report 10 here
areid-van
commented
Sep 8, 2017
| report.append(data[i]) | ||
| else: | ||
| report.append(0) | ||
| if self.mode == 3: |
Author
There was a problem hiding this comment.
Pack the data so each 24 bit RGB tuple is two interleaved 12 bit RGB tuples for mode 3
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
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.
Exposes two new features in the firmware:
Using both features together you can control up to 256 LED. 12 bits still gives a pretty nice range of colors.
Sorry there are a bunch of trivial changes included to work with a different version of the USB library on my system. Those might need to be reverted.