From: Joel Holdsworth Date: Tue, 30 Dec 2014 10:49:43 +0000 (+0000) Subject: util: Added support for more SI prefixes X-Git-Tag: pulseview-0.3.0~289 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6f1f59c8785228aa24b8e999c90fe98cef7bc051;p=pulseview.git util: Added support for more SI prefixes --- diff --git a/pv/util.cpp b/pv/util.cpp index 2a04aaec..ff1b4848 100644 --- a/pv/util.cpp +++ b/pv/util.cpp @@ -32,9 +32,10 @@ using namespace Qt; namespace pv { namespace util { -static const QString SIPrefixes[9] = - {"f", "p", "n", QChar(0x03BC), "m", "", "k", "M", "G"}; -const int FirstSIPrefixPower = -15; +static const QString SIPrefixes[17] = + {"y", "z", "a", "f", "p", "n", QChar(0x03BC), "m", "", "k", "M", "G", + "T", "P", "E", "Z", "Y"}; +const int FirstSIPrefixPower = -24; QString format_si_value(double v, QString unit, int prefix, unsigned int precision, bool sign)