Comments (6)
Thanks for the code link. It is possible that this is related to interrupts clashing. It should be possible to check this by adjusting the DMX driver interrupt priority. The constant ESP_INTR_FLAG_LEVEL3
should work when installing your DMX driver. In other words, instead of calling dmx_driver_install(dmx_num, DMX_DEFAULT_INTR_FLAGS)
, try calling dmx_driver_install(dmx_num, ESP_INTR_FLAG_LEVEL3)
.
You should also check to ensure that your other components are using lower level interrupts.
from esp_dmx.
The last argument of dmx_receive()
is the maximum block time in FreeRTOS ticks. If you set this argument to 0
, the function will not block and will return the number of DMX packet slots received.
dmx_packet_t packet;
if (dmx_receive(DMX_NUM_2, &packet, 0)) {
// Do work if packet is received
}
As a side note, dmx_receive()
will only return the number of slots received for a NEW packet. If you call dmx_receive()
again with a block time of zero and before a new packet is received, it will return 0
.
This is a relatively new feature so let me know if this is not the behavior you see!
from esp_dmx.
Thanks for the very prompt response, using 0 does resolve my blocking issue. However, I'm now seeing some rather odd glitches with WLEDs output when DMX is active if I then use that.
Is 0 a magic value to trigger a different behavior?
So with the blocking, all is fine when I have DMX, but no signal blocks my main loop for the timeout.
With no blocking, when no DMX all is fine, but when receiving I get very erratic behavior of the WLED output
from esp_dmx.
Setting the block time to 0 should not cause another behavior.
What do you mean by erratic behavior? Do you mind sharing your code?
from esp_dmx.
The LEDs star showing incorrect values, I wondered if we were seeing clashing interrupts
https://github.com/netmindz/WLED/blob/DMX-Input-esp_dmx/wled00/dmx.cpp
from esp_dmx.
That seems to be working nicely, thank you
from esp_dmx.
Related Issues (20)
- dmx timing HOT 1
- Compile errors version 2 and up HOT 8
- Troubles with ETC Express HOT 6
- RDM discovery controller HOT 12
- Error on Sample DMX Sniffer HOT 1
- DMX read example - 'isr_handle' undeclared in arduino 2.14 HOT 1
- DMX Output randomly stops for a few seconds HOT 1
- Interrupt conflict HOT 1
- rdm_register_dmx_personality missing in 3.1.0 HOT 4
- DMX Read - Unstable packet.size depends on the number of DMX channels HOT 3
- compiling error with 3.10 but not with 3.0.3-beta HOT 3
- Bug string constant to 'char*' [-Wwrite-strings] HOT 2
- Send SET RDM_PID_IDENTIFY_DEVICE argument error
- RDM controller requests are not copying parameter data HOT 2
- dmx_get_personality_description() does not work HOT 1
- ESP32-S3 RDM issues with UART0 HOT 5
- Start Address Not Saving Via RDM HOT 8
- Compile Warning
- Problem with installing DMX on UART2 HOT 5
- ESP32-C6 incompatibility HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp_dmx.