opendroneid / opendroneid-core-c

Open Drone ID Core C Library
Apache License 2.0
178 stars 64 forks source link

printBasicID_data has values swapped #72

Closed bill-egert closed 1 year ago

bill-egert commented 1 year ago
void printBasicID_data(ODID_BasicID_data *BasicID)
{
    // Ensure the ID is null-terminated
    char buf[ODID_ID_SIZE + 1] = { 0 };
    memcpy(buf, BasicID->UASID, ODID_ID_SIZE);

    const char ODID_BasicID_data_format[] =
        "UAType: %d\nIDType: %d\nUASID: %s\n";
    printf(ODID_BasicID_data_format, BasicID->IDType, BasicID->UAType, buf);
}

The IDType and UAType are swapped from whats printed.

friissoren commented 1 year ago

Indeed they are. Thanks for spotting.