Skip to content

ERROR_NONE being counted as packet errors #33

@adampisula

Description

@adampisula

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions