mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 14:48:03 +03:00
slowly completing MDC1200 (TX and RX)
This commit is contained in:
17
misc.c
17
misc.c
@ -346,8 +346,19 @@ void NUMBER_trim_trailing_zeros(char *str)
|
||||
{
|
||||
if (str != NULL)
|
||||
{
|
||||
int i = (int)strlen(str) - 1;
|
||||
while (i > 0 && (str[i] == '0' || str[i] == ' ') && str[i - 1] != '.')
|
||||
str[i--] = 0;
|
||||
bool found_dp = false;
|
||||
int i = 0;
|
||||
while (i < 16 && str[i] != 0)
|
||||
{
|
||||
if (str[i] == '.')
|
||||
found_dp = true;
|
||||
i++;
|
||||
}
|
||||
if (found_dp)
|
||||
{
|
||||
i--;
|
||||
while (i > 0 && (str[i] == '0' || str[i] == ' ') && str[i - 1] != '.')
|
||||
str[i--] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user