From 111721b6a14b7b0428aa57f44a253212177b28f0 Mon Sep 17 00:00:00 2001 From: madbad Date: Mon, 13 Dec 2021 15:34:54 +0000 Subject: [PATCH] OSGHUD: update tires widget with temperatures converted from KELVIN to CELSIUS git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7815 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 3fd08e54ed0b6ffea9a59920fc504cfacd7a02bb Former-commit-id: a885c9fb652da7dc650344c2b3695d84587079a6 --- src/modules/graphic/osggraph/Viewer/OsgHUD.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/graphic/osggraph/Viewer/OsgHUD.cpp b/src/modules/graphic/osggraph/Viewer/OsgHUD.cpp index 6b4eec2b4..c0506cf52 100644 --- a/src/modules/graphic/osggraph/Viewer/OsgHUD.cpp +++ b/src/modules/graphic/osggraph/Viewer/OsgHUD.cpp @@ -1301,7 +1301,10 @@ void SDHUD::Refresh(tSituation *s, const SDFrameInfo* frameInfo, } //temps string only do this for middle temps? temp.str(""); - temp << currCar->_tyreT_mid(i); + //internally the tire temp is in KELVIN + int tireTempInCelsius = currCar->_tyreT_mid(i)- 273.15; +// temp << tireTempInCelsius << " °C"; + temp << tireTempInCelsius << " C"; std::ostringstream tireNameText; tireNameText << "tire-" << tireName.str().c_str() << "temps";