-
Notifications
You must be signed in to change notification settings - Fork 22
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
Clarify zero indexed DMX Channel Numbering in Documentation and Error Messages #36
Comments
Hi, |
Hi, Thanks. I understand and that totally makes sense. It is just a issue as we have to remember to adjust the user data within the array down by 1 before we pass out but I'm guessing this must be how all DMX based programs are working then. The only issue will be if the library throws an error regarding the 0-512 channels.
Technically it is either 1- 512 which is the DMX channel or 0 - 511 which is the "indexed" channel. If this is an user message then it is conflicting as the user would expect a DMX channel of 1 - 512 if that makes sense. The way I've fixed it now is that I take the user data and reduce the channel number by one and then pass it over. Just seems a bit dirty but it works. I would have to then error if someone passed a 0 channel (which they shouldn't anyway). |
So, maybe a clarification of the Error Message and the documentation would be a good Idea. |
I created two pull requests to switch error messages in lib.js and added a hint in the notes block of README. With this this issue should be closed as I think that we should not switch channel numbering to 1-512 for all function calls and then handle the drift in the library. But - if this is wanted from the community - I am willing to do a pull request for this, too. |
Possibly we could use another config option to let the users choose the range of 0-511 or 1-512 for the channel numbers they input. |
Something that got me very confused today. I noticed the dmxnet library is using 0-511 which maps to DMX Channel 1 - 512. So for instance the user or coder has to take the user channel 1 and then put that into channel 0 for it to control the correct fixture. Should this not be shifted within the library so that we are passing the correct channels down to the lowest level before transmission ?
The text was updated successfully, but these errors were encountered: