Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR_NONE being counted as packet errors #33

Open
adampisula opened this issue Dec 10, 2024 · 1 comment
Open

ERROR_NONE being counted as packet errors #33

adampisula opened this issue Dec 10, 2024 · 1 comment

Comments

@adampisula
Copy link

Hey there,

I've been playing with this library for a little bit and what concerned me when using it was that given this code from the test example:

Serial.printf("Universe %u / %u Channels | Packet#: %u / Errors: %u / CH1: %u\n",
                htons(packet.universe),                 // The Universe for this packet
                htons(packet.property_value_count) - 1, // Start code is ignored, we're interested in dimmer data
                e131.stats.num_packets,                 // Packet counter
                e131.stats.packet_errors,               // Packet error counter
                packet.property_values[1]);             // Dimmer data for Channel 1

the e131.stats.packet_errors kept incrementing with every packet I receive. I debugged it and it turned out that all of these errors were ERROR_NONE that were initially set here. Later there's an if statement checking if error is ERROR_IGNORE, but it doesn't exclude ERROR_NONEs.

I'll post a PR with a solution that I hope is acceptable.

@adampisula
Copy link
Author

The PR is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant