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

set_data() can destroy communication #5

Open
hansu opened this issue Jun 20, 2024 · 0 comments
Open

set_data() can destroy communication #5

hansu opened this issue Jun 20, 2024 · 0 comments

Comments

@hansu
Copy link

hansu commented Jun 20, 2024

If you pass data ≠0 with id = 0 to set_data(), the DMX data stream will be incorrect, because the first data byte is expected as zero.

To prevent this, the user data could start at zero like this:

    def set_data(self,id,data):
        self.data[id+1]=data

or something like this:

    def set_data(self,id,data):
        if id == 0:
             return
        self.data[id]=data
@hansu hansu changed the title set_data() can destroy comminication set_data() can destroy communication Jun 20, 2024
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

No branches or pull requests

1 participant