mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-15 01:45:46 -04:00
Revert into use of spaces for padding freq
This patch addresses the issue detected in: https://github.com/eried/portapack-mayhem/issues/159 This patch will revert the behavior of the function to_string_short_freq into using spaces on the left of the integer part of the frequency (as it did originally). When upgrading the scanner app, I did change the behavior of this function eliminating those spaces, so I could gain some characters-worth of space inside the scanner, but I failed to detect that it introduced some lack of padding on the rx->audio app. Now, it is back as before, and I also did update the scanner so it can cope with the "extra spaces" this function now adds (again).
This commit is contained in:
parent
c626d83c3b
commit
b41074fbe3
2 changed files with 9 additions and 8 deletions
|
@ -113,8 +113,7 @@ std::string to_string_dec_int(
|
|||
}
|
||||
|
||||
std::string to_string_short_freq(const uint64_t f) {
|
||||
//was... to_string_dec_int(f / 1000000,4)
|
||||
auto final_str = to_string_dec_int(f / 1000000) + "." + to_string_dec_int((f / 100) % 10000, 4, '0');
|
||||
auto final_str = to_string_dec_int(f / 1000000,4) + "." + to_string_dec_int((f / 100) % 10000, 4, '0');
|
||||
return final_str;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue