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

add light effects module #5

Merged
merged 3 commits into from
Nov 23, 2024
Merged

Conversation

ellensp
Copy link
Contributor

@ellensp ellensp commented Sep 29, 2024

As requested in Issue #4

Light effects where missing from the library

I logged and decoded the protocol from the app and added the new module.

This example is effect 0 with 7 colours

1c 00 03 02 00 5a 07 7f 00 00 7f 51 00 7f 7f 00 00 7f 00 00 00 7f 7f 00 7f 7f 7f 7f
|           |     |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
|           |     |  R1 G1 B1 R2 G2 B2 R3 G3 B3 R4 G4 B4 R5 G5 B5 R6 G6 B6 R7 G7 B7
|           |     ^count (RGB tupples) colours 2-7 
|           ^effect number 0-6
^count. full packet size inducing the count byte starting at 1

This example is effect 1 with 2 colours

0d 00 03 02 01 5a 02 7f 00 7f 7f 00 00
|           |     |  |  |  |  |  |  |
|           |     |  R1 G1 B1 R2 G2 B2
|           |     ^count (RGB tupples) colours 2-7 
|           ^effect number 0-6
^count. full packet size inducing the count byte starting at 1

I added a test_effect.py script to show all effects and to provide some examples on how to use the module.

Note: I'm not a python expert, this code was heavily based on other existing modules and I used copilot AI to get assistance.

Also note, I'm not an American. Colour is spelt correctly for my geographic region.

@derkalle4
Copy link
Owner

Hi @ellensp - can you please resolv the conflict? I will happily merge afterwards :)

@ellensp
Copy link
Contributor Author

ellensp commented Oct 27, 2024

Updated and resolved

@ellensp
Copy link
Contributor Author

ellensp commented Nov 20, 2024

@derkalle4 Please commit.

There is a new patch coming to fix uploading images see derkalle4/python3-idotmatrix-client#50 (comment)

And I would rather not have to resolve more conflicts

@derkalle4 derkalle4 merged commit 75af279 into derkalle4:main Nov 23, 2024
@derkalle4
Copy link
Owner

@ellensp many thanks!

@ellensp ellensp deleted the add-light-effect branch November 23, 2024 12:20
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.

2 participants