Fix clamping to a single hex digit
The desired functionality is to display all channel measurements greater than 0xF as 0xF. The current behavior picks the minimum between `0xF` and `(value & 0xF)`, which is just the last hex digit of the measurement. If the value was `0x12`, the code would print `2` rather than `F`. This change just makes `min` compare `0xF` with the full value of the measurement, such that measurements above `0xF` will always get clamped correctly.
Showing
Please register or sign in to comment