From 981dbc68c901229062b77eeae6e0a53fc93921f5 Mon Sep 17 00:00:00 2001 From: Henrik Stickann <4376396-Mithradir@users.noreply.gitlab.com> Date: Mon, 11 Apr 2022 17:10:22 +0200 Subject: [PATCH] Fix incorrect hex conversion --- src/uart.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uart.cpp b/src/uart.cpp index 660c5ed..2f18412 100644 --- a/src/uart.cpp +++ b/src/uart.cpp @@ -177,7 +177,7 @@ namespace sta // First digit in buffer is 4 MSBs in value, so shift from high to low uint8_t hex = ((value >> ((digits - 1 - i) * 4)) & 0xF); if (hex > 9) - buffer[i] = 'A' + (hex - 9); + buffer[i] = 'A' + (hex - 10); else buffer[i] = '0' + hex; }