Added cursors in waveform widget

Auto unit string format function
This commit is contained in:
Furrtek
2017-10-28 16:34:52 +02:00
parent d47f292d3a
commit 90b76f00d9
7 changed files with 79 additions and 82 deletions
+4
View File
@@ -35,6 +35,8 @@ enum TimeFormat {
HM = 2
};
const char unit_prefix[7] { 'n', 'u', 'm', 0, 'k', 'M', 'G' };
// TODO: Allow l=0 to not fill/justify? Already using this way in ui_spectrum.hpp...
std::string to_string_bin(const uint32_t n, const uint8_t l = 0);
std::string to_string_dec_uint(const uint32_t n, const int32_t l = 0, const char fill = 0);
@@ -47,4 +49,6 @@ std::string to_string_short_freq(const uint64_t f);
std::string to_string_datetime(const rtc::RTC& value, const TimeFormat format = YMDHMS);
std::string to_string_timestamp(const rtc::RTC& value);
std::string unit_auto_scale(double n, const uint32_t base_nano, uint32_t precision);
#endif/*__STRING_FORMAT_H__*/