[apps] Display float in decimal mode in curve views and title

Change-Id: I3c069f3e001b43c98d4c54975b02636dad330acf
This commit is contained in:
Émilie Feral
2016-12-29 13:20:02 +01:00
parent b395680cc7
commit ff3d8dce5a
2 changed files with 4 additions and 4 deletions

View File

@@ -106,8 +106,8 @@ void ParametersController::updateTitle() {
m_titleBuffer[currentChar++] = m_law->parameterNameAtIndex(index)[0];
strlcpy(m_titleBuffer+currentChar, " = ", 4);
currentChar += 3;
char buffer[Constant::FloatBufferSizeInScientificMode];
Float(m_law->parameterValueAtIndex(index)).convertFloatToText(buffer, Constant::FloatBufferSizeInScientificMode, Constant::NumberOfDigitsInMantissaInScientificMode);
char buffer[Constant::FloatBufferSizeInDecimalMode];
Float(m_law->parameterValueAtIndex(index)).convertFloatToText(buffer, Constant::FloatBufferSizeInDecimalMode, Constant::NumberOfDigitsInMantissaInDecimalMode, Float::DisplayMode::Decimal);
strlcpy(m_titleBuffer+currentChar, buffer, strlen(buffer)+1);
currentChar += strlen(buffer);
m_titleBuffer[currentChar++] = ' ';