[apps/shared/sum_graph_controller] Uniformize number of significant digits

This commit is contained in:
Ruben Dashyan
2020-02-28 14:00:38 +01:00
committed by LeaNumworks
parent 7ee8c31c70
commit 04794dd26f

View File

@@ -201,7 +201,7 @@ void SumGraphController::LegendView::setSumLayout(Step step, double start, doubl
LayoutHelper::String(buffer, strlen(buffer), k_font),
EmptyLayout::Builder(EmptyLayoutNode::Color::Yellow, false, k_font, false));
} else {
constexpr int precision = Preferences::LargeNumberOfSignificantDigits;
constexpr int precision = Preferences::MediumNumberOfSignificantDigits;
constexpr int sizeForPrecision = PrintFloat::charSizeForFloatsWithPrecision(precision);
constexpr int bufferSize = 2 + sizeForPrecision;
char buffer[bufferSize];