Skip to content

Commit

Permalink
main leds artnet: fix busyloop on state->artnet->timeout_tick if conf…
Browse files Browse the repository at this point in the history
…ig->artnet_dmx_timeout is changed to 0
  • Loading branch information
SpComb committed Dec 22, 2024
1 parent 68cf9d7 commit e355f9f
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 e355f9f

Please sign in to comment.