From: James Turner Date: Tue, 27 Dec 2011 20:19:10 +0000 (+0000) Subject: Nav-display: expose TCAS threat level correctly. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=36fc0367d2fc80ab49cf30b0f20a4d3f552871e2;p=flightgear.git Nav-display: expose TCAS threat level correctly. --- diff --git a/src/Instrumentation/NavDisplay.cxx b/src/Instrumentation/NavDisplay.cxx index 92207e6a6..83de81bbf 100644 --- a/src/Instrumentation/NavDisplay.cxx +++ b/src/Instrumentation/NavDisplay.cxx @@ -1161,7 +1161,10 @@ void NavDisplay::computeAIStates(const SGPropertyNode* ai, string_set& states) int threatLevel = ai->getIntValue("tcas/threat-level",-1); if (threatLevel >= 0) { states.insert("tcas"); - // states.insert("tcas-threat-level-" + itoa(threatLevel)); + + std::ostringstream os; + os << "tcas-threat-level-" << threatLevel; + states.insert(os.str()); } double vspeed = ai->getDoubleValue("velocities/vertical-speed-fps");