From 6f1f59c8785228aa24b8e999c90fe98cef7bc051 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Tue, 30 Dec 2014 10:49:43 +0000 Subject: [PATCH] util: Added support for more SI prefixes --- pv/util.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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) -- 2.30.2