-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Not working #82
Comments
As answered at node-dmx/dmx#148, I think I can’t help you. Your code seems to be right, so it’s probably got something to do with the timing of You could maybe try changing the 0 in this line to something else (1, 200, ...) but I can’t guarantee this will do: node-enttec-open-dmx-usb/src/index.ts Line 134 in e1a78c6
|
I can confirm this is related to the break.
const child_process = require("child_process");
child_process.execSync("usleep 88"); Or this lib https://www.npmjs.com/package/sleep which is what is defined in the spec http://www.dmx512-online.com/dmx512_packet.html Can you try this value on your setup? Or I'll just make a pull request to have this configurable. |
I don’t want to make sleep a dependency because it does not seem to provide pre-built binaries (i.e. it’s a pain to use it on Windows). I think the best option would be to add a constructor option for passing a It would be great if you could try whether it works with |
@moritzruth It's in my plan, i'll do the integration of the device in the next week, be sure I'll update this thread with intelligence when i have new |
I was experiencing the same issue after moving my code to an M1 Mac. I can also confirm that changing line 134 to |
I just published v4.0.1 (I forgot to build before publishing v4.0.0). |
@moritzruth Thanks, what timing! I'm expected to write the DMX part of the code in the next 30 days, I'll for sure give feedback. We have two sparkling machines and one light |
Hi @moritzruth, Here is my first test pass.
Test without external libDoesn't works. Just as before. But as setTimeout relies on various things such as CPU capabilities, I can understand that this is tricky. Test with library92 µs seems to be too short. After some test, I'm able to make it works with two code : The first is based on a Rust implementation algorithm from a library and pause for 51ms (doesn't rely on setTimeout) : const device = new DMXDevice(
await DMXDevice.getFirstAvailableDevice(),
true,
(ignoreValueForTest) => {
sleep.msleep(51);
}
); Note that you can replace (as described in the sleep library) with I've been able to reduce this frame up to 20ms, below it starts glitching, as read from https://docs.openlighting.org/ola/doc/latest/dmx_cpp_client_tutorial.html Waiting for the tests on real device (raspberry PI, on linux) |
So far after some experiencing i can confirm that on a good CPU https://github.com/davidmarkclements/atomic-sleep works for pausing. It relies on atomics API. which sleep without CPU overhead. Also note that this is not a microsleep, its a ms sleep, but it looks like that it works, probably due to some internal implementation mechanism of node serial. |
Also take a look at this awesome project https://github.com/benkuper/Chataigne |
I think I fixed this issue with v4.0.1 last year. |
Hello,
I'm trying this library with the following code and nothing happens really, I get a small white flash, like in the following video
Here is my code (I'm on OSX with an M1 mac)
I use an 8 channel mode light see the doc
CLNB600_Cameo_DMX_Control_Table_EN.pdf
IMG_0981.MOV
The text was updated successfully, but these errors were encountered: