From 36fc0367d2fc80ab49cf30b0f20a4d3f552871e2 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 27 Dec 2011 20:19:10 +0000 Subject: [PATCH] Nav-display: expose TCAS threat level correctly. --- src/Instrumentation/NavDisplay.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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");