Skip to content

Commit

Permalink
Merge pull request #95 from qmsk/leds-artnet-timeout-config-busyloop-fix
Browse files Browse the repository at this point in the history
main leds artnet: fix busyloop on state->artnet->timeout_tick if conf…
  • Loading branch information
SpComb authored Dec 22, 2024
2 parents 68cf9d7 + e355f9f commit 5db3208
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main/leds_artnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ bool leds_artnet_active(struct leds_state *state, EventBits_t event_bits)
int leds_artnet_update(struct leds_state *state, EventBits_t event_bits)
{
struct leds_stats *stats = &leds_stats[state->index];
const struct leds_config *config = state->config;

bool data = event_bits & ARTNET_OUTPUT_EVENT_INDEX_BITS;
bool sync = event_bits & (1 << ARTNET_OUTPUT_EVENT_SYNC_BIT);
Expand Down Expand Up @@ -343,7 +342,7 @@ int leds_artnet_update(struct leds_state *state, EventBits_t event_bits)
// timeouts
if (data || sync) {
leds_artnet_timeout_reset(state);
} else if (config->artnet_dmx_timeout) {
} else if (state->artnet->timeout_tick) {
if (xTaskGetTickCount() >= state->artnet->timeout_tick) {
if (leds_artnet_timeout(state)) {
LOG_WARN("leds_artnet_timeout");
Expand Down

0 comments on commit 5db3208

Please sign in to comment.