generalelectrix / pyenttec

Python module for sending DMX using the Enttec Pro (or compatible) DMX port.
MIT License
18 stars 10 forks source link

Question about baud rate in __init__.py #5

Closed HJ959 closed 4 years ago

HJ959 commented 4 years ago

Hello, been playing with this a while and was just wondering why the baud rate is 57600 in init.py?

From looking online the DMX baud rate is 250kbp/s? Is it to do with the enttec device?

Cheers! This repo is super useful!

willstott101 commented 4 years ago

That's the serial connection over USB to the Enttec not the baud rate of the actual dmx output. IDK why that value is what it is, or if it's important though.

HJ959 commented 4 years ago

Okay no worries thanks!

generalelectrix commented 4 years ago

I believe that value isn’t actually used by the port since it is a virtual com port, but it is a safe dummy value that will pass possible validation by an underlying serial library.

generalelectrix commented 4 years ago

Indeed, from the API spec: "Since the driver is a virtual COM port, the baudrate setting used to open this COM port is a dummy value, and does not control the USB communication speed." The value of that constant was probably arbitrary to begin with and likely ported directly from the Objective-C implementation that I used as the basis for this library.