mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-08-10 18:03:40 +00: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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user