Added Datetime + Freq Filename to Audio App

This commit is contained in:
notpike 2022-03-28 20:53:09 -07:00
parent 477e6d65df
commit d70e1a6fac
6 changed files with 46 additions and 3 deletions

View file

@ -129,6 +129,11 @@ std::string to_string_decimal(float decimal, int8_t precision) {
return result;
}
std::string to_string_freq(const uint64_t f) {
auto final_str = to_string_dec_int(f / 1000000,4) + to_string_dec_int(f % 1000000, 6, '0');
return final_str;
}
std::string to_string_short_freq(const uint64_t f) {
auto final_str = to_string_dec_int(f / 1000000,4) + "." + to_string_dec_int((f / 100) % 10000, 4, '0');
return final_str;