arduino-lorawan icon indicating copy to clipboard operation
arduino-lorawan copied to clipboard

Bug in Arduino_LoRaWAN.h - kCountryCode()

Open matthias-bs opened this issue 2 years ago • 0 comments

        // return the country code
        constexpr uint16_t kCountryCode(char c1, char c2)
                {
                return (c1 < 'A' || c1 > 'Z' || c2 < 'A' || c2 > 'Z')
                        ? 0
                        : ((c1 << 8) | c1);
                }

The last part of the return value should probably read

((c1 << 8) | c2)

matthias-bs avatar Jun 19 '22 17:06 matthias-bs