From 3a59431fbd229ef19b634b3d03536f59d1884c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20M=C3=A1tik?= Date: Mon, 28 Dec 2020 08:45:11 +0100 Subject: [PATCH] Added support for aux temp on place of aux perc. This may not be the final solution, as both aux temp and aux perc could be shown on same cell possibly. --- Board320_240.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Board320_240.cpp b/Board320_240.cpp index 5804dc3..2a917cb 100644 --- a/Board320_240.cpp +++ b/Board320_240.cpp @@ -295,9 +295,14 @@ void Board320_240::drawSceneMain() { sprintf(tmpStr1, ((liveData->settings.temperatureUnit == 'c') ? "%01.00f" : "%01.01f"), liveData->celsius2temperature(liveData->params.batHeaterC)); drawBigCell(2, 3, 1, 1, tmpStr1, "BAT.HEAT", TFT_TEMP, TFT_WHITE); - // Aux perc - sprintf(tmpStr1, "%01.00f%%", liveData->params.auxPerc); - drawBigCell(3, 0, 1, 1, tmpStr1, "AUX BAT.", (liveData->params.auxPerc < 60 ? TFT_RED : TFT_DEFAULT_BK), TFT_WHITE); + // Aux perc / temp + if (liveData->settings.carType == CAR_BMW_I3_2014) { // TODO: use invalid auxPerc value as decision point here? + sprintf(tmpStr1, "%01.00f", liveData->params.auxTemperature); + drawBigCell(3, 0, 1, 1, tmpStr1, "AUX TEMP.", (liveData->params.auxTemperature < 5 ? TFT_RED : TFT_DEFAULT_BK), TFT_WHITE); + } else { + sprintf(tmpStr1, "%01.00f%%", liveData->params.auxPerc); + drawBigCell(3, 0, 1, 1, tmpStr1, "AUX BAT.", (liveData->params.auxPerc < 60 ? TFT_RED : TFT_DEFAULT_BK), TFT_WHITE); + } // Aux amp sprintf(tmpStr1, (abs(liveData->params.auxCurrentAmp) > 9.9 ? "%01.00f" : "%01.01f"), liveData->params.auxCurrentAmp);