mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-08-02 17:31:53 +00:00
Fix incorrect hex conversion
This commit is contained in:
parent
dea989ffac
commit
981dbc68c9
@ -177,7 +177,7 @@ namespace sta
|
|||||||
// First digit in buffer is 4 MSBs in value, so shift from high to low
|
// First digit in buffer is 4 MSBs in value, so shift from high to low
|
||||||
uint8_t hex = ((value >> ((digits - 1 - i) * 4)) & 0xF);
|
uint8_t hex = ((value >> ((digits - 1 - i) * 4)) & 0xF);
|
||||||
if (hex > 9)
|
if (hex > 9)
|
||||||
buffer[i] = 'A' + (hex - 9);
|
buffer[i] = 'A' + (hex - 10);
|
||||||
else
|
else
|
||||||
buffer[i] = '0' + hex;
|
buffer[i] = '0' + hex;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user