[poincare] Template for double

Change-Id: I7404bd5cefc9ef78a5dbd572c3874a557cded28e
This commit is contained in:
Émilie Feral
2017-08-03 13:05:46 +02:00
parent 05d2b83f92
commit 82e212e771
184 changed files with 2062 additions and 1475 deletions

View File

@@ -41,14 +41,14 @@ void BatteryTestController::viewWillAppear() {
}
void BatteryTestController::updateBatteryState(float batteryLevel, bool batteryCharging) {
char bufferLevel[ContentView::k_maxNumberOfCharacters + Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits)];
char bufferLevel[ContentView::k_maxNumberOfCharacters + PrintFloat::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits)];
const char * legend = "Battery level: ";
int legendLength = strlen(legend);
strlcpy(bufferLevel, legend, legendLength+1);
Complex::convertFloatToText(batteryLevel, bufferLevel+legendLength, Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits);
Complex<float>::convertFloatToText(batteryLevel, bufferLevel+legendLength, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits);
m_view.batteryLevelTextView()->setText(bufferLevel);
char bufferCharging[ContentView::k_maxNumberOfCharacters + Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits)];
char bufferCharging[ContentView::k_maxNumberOfCharacters + PrintFloat::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits)];
int numberOfChars = 0;
legend = "Battery charging: ";
legendLength = strlen(legend);