You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I had problems using ESP-Dmx in combination with https://github.com/DaAwesomeP/dmxusb on an ESP8266 NodeMCU, working with qlcplus on the host computer. The issue was to address fixtures > 32.
It seems there might be an off-by-one error induced here:
voidDMXESPSerial::write(int Channel, uint8_t value) {
if (dmxStarted == false) init();
if (Channel < 1) Channel = 1; // Channel should be allowed to be equal to zero// Next line: Channel should *never* be > index 511 (512th element in dmxData)if (Channel > chanSize) Channel = chanSize;
if (value < 0) value = 0;
if (value > 255) value = 255;
dmxData[Channel] = value; // undefined for Channel == 512
}
Skimming over a few issues I think this might have been the cause.
I did some more tests today and I might still have an off-by-one error, that has to be on my end though.
In the meantime I have also confirmed the issue reported here: when addressing 512, which makes sense as 1 is seemingly used as first channel as per the example and code, it overflows into chanSize which is located next in the memory, effectively overwriting it and preventing to address higher channels.
Hello, I had problems using ESP-Dmx in combination with https://github.com/DaAwesomeP/dmxusb on an ESP8266 NodeMCU, working with qlcplus on the host computer. The issue was to address fixtures > 32.
It seems there might be an off-by-one error induced here:
Skimming over a few issues I think this might have been the cause.
For faster/easier access I simply added a buffer() function to write directly to
dmxData
: https://github.com/Simon-L/mpdmx/blob/main/mpdmx_1/ESPDMX.cpp#L35The text was updated successfully, but these errors were encountered: