From 0f053abbd14ef5ce0b7f9905a874a53c6124b10b Mon Sep 17 00:00:00 2001 From: Michael Ossmann Date: Tue, 28 May 2024 20:54:08 -0400 Subject: [PATCH] Correct Base32 representation of serial number Bump version to 1.1 Fix #18 --- Makefile | 2 +- usb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 72d3974..b7e3c37 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ BOARD_REVISION_MAJOR ?= 1 BOARD_REVISION_MINOR ?= 4 VERSION_MAJOR = 1 -VERSION_MINOR = 0 +VERSION_MINOR = 1 CROSS=arm-none-eabi- diff --git a/usb.c b/usb.c index 9518a05..1b15eab 100644 --- a/usb.c +++ b/usb.c @@ -259,7 +259,7 @@ char *get_serial_number_string(void) } bitsLeft -= 5; int index = (buffer >> bitsLeft) & 0x1f; - buf[count] = index + (index < 26 ? 'A' : '2'); // Base32 + buf[count] = index + (index < 26 ? 'A' : '2' - 26); // Base32 } return buf;