mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 22:58:04 +03:00
Added freq cal menu option (hidden) + 8.33kHz step bug fix
This commit is contained in:
7
misc.c
7
misc.c
@ -216,12 +216,15 @@ void NUMBER_ToDigits(uint32_t Value, char *pDigits)
|
||||
pDigits[8] = 0;
|
||||
}
|
||||
|
||||
uint8_t NUMBER_AddWithWraparound(uint8_t Base, int8_t Add, uint8_t LowerLimit, uint8_t UpperLimit)
|
||||
int32_t NUMBER_AddWithWraparound(int32_t Base, int32_t Add, int32_t LowerLimit, int32_t UpperLimit)
|
||||
{
|
||||
Base += Add;
|
||||
if (Base == 0xFF || Base < LowerLimit)
|
||||
|
||||
if (Base == 0x7fffffff || Base < LowerLimit)
|
||||
return UpperLimit;
|
||||
|
||||
if (Base > UpperLimit)
|
||||
return LowerLimit;
|
||||
|
||||
return Base;
|
||||
}
|
||||
|
Reference in New Issue
Block a user