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

Update enttec-open-usb-dmx.js #4

Merged
merged 2 commits into from Apr 25, 2014
Merged

Update enttec-open-usb-dmx.js #4

merged 2 commits into from Apr 25, 2014

Conversation

evantahler
Copy link
Contributor

No description provided.

@evantahler evantahler mentioned this pull request Apr 19, 2014

self.dev = new FTDI.FtdiDevice(device_id)
self.dev.open({
'baudrate': 115200 / 2,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use 57600 directly here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think that its clearer to inform folks that it is (realBaudrate / 2)

@wiedi
Copy link
Member

wiedi commented Apr 24, 2014

Hi, the first two comments are just minor things I noticed, if you want to keep them like this thats fine too.

About the toHex() function please explain why it's needed (maybe add a comment) or remove it if we can do without it ;)

@evantahler
Copy link
Contributor Author

Actually, the more I think about this, the more I think that this driver needs something drastic. Since the timing of the send loop is so critical, I think that the best thing to to is to fork a second node process off (cluster) and communicate universe changes with it via process.send.

How would you feel about this module becoming that complex?

@wiedi
Copy link
Member

wiedi commented Apr 24, 2014

If thats what it takes to get it running reliable sure. :D

Remember that node has garbage collection which can cause latency you can't avoid even if running in a seperate process.
No idea if this will actually be a problem or is minimal enough so it can be ignored.

Also not sure how much of that could be sidestepped with a native c/c++ module.
Without a realtime kernel there might always be cases where a frame misses the mark.

In the end I think this will require some experimentation and testing until it's "good enough".

@evantahler
Copy link
Contributor Author

That's exactly why the separate process is best. We create a loop with no scopes or variables, which should really limit garbage collection... or try anyway!

@wiedi
Copy link
Member

wiedi commented Apr 24, 2014

sounds like a plan :)

@evantahler
Copy link
Contributor Author

here are some updates

  • added updateAll
  • you don't need hex after all!

@evantahler
Copy link
Contributor Author

After this update, I'm going to start work on a smaller package just for the openDMX. I don't need animations, nor do I need the web server you provided.

wiedi added a commit that referenced this pull request Apr 25, 2014
Update enttec-open-usb-dmx.js
@wiedi wiedi merged commit 6c837cc into node-dmx:master Apr 25, 2014
@wiedi
Copy link
Member

wiedi commented Apr 25, 2014

thanks for the contribution!

I don't know what you have in mind for the smaller package, but if by chance it'll provide a reusable API I can add it as a dependency and use that directly.

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.

None yet

2 participants