From 1dbc2c0f7a0c23de18e4b174e2483e6e91e8f55d Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Fri, 17 Jun 2011 14:16:49 +0200 Subject: [PATCH] Fixed switch parsing and message --- src/FDM/JSBSim/models/flight_control/FGSwitch.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/FDM/JSBSim/models/flight_control/FGSwitch.cpp b/src/FDM/JSBSim/models/flight_control/FGSwitch.cpp index 9d56e512e..45b0a9921 100644 --- a/src/FDM/JSBSim/models/flight_control/FGSwitch.cpp +++ b/src/FDM/JSBSim/models/flight_control/FGSwitch.cpp @@ -69,7 +69,7 @@ using namespace std; namespace JSBSim { -static const char *IdSrc = "$Id: FGSwitch.cpp,v 1.21 2011/06/16 03:39:38 jberndt Exp $"; +static const char *IdSrc = "$Id: FGSwitch.cpp,v 1.22 2011/06/17 12:12:19 jberndt Exp $"; static const char *IdHdr = ID_SWITCH; /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -119,8 +119,11 @@ FGSwitch::FGSwitch(FGFCS* fcs, Element* element) : FGFCSComponent(fcs, element) tests.push_back(current_test); } - if (test_element->GetName() != "output" - && test_element->GetName() != "description") { // this is not an output element + string el_name = test_element->GetName(); + if ( el_name != "output" + && el_name != "description" + && el_name != "delay" ) + { value = test_element->GetAttributeValue("value"); if (value.empty()) { cerr << "No VALUE supplied for switch component: " << Name << endl; -- 2.39.5