From 4be1aba62e59a991dacf44e41bf6175cc591f6db Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Fri, 28 Mar 2014 17:48:35 +0100 Subject: [PATCH] Autopilot: enable debug output for logic elements --- src/Autopilot/logic.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Autopilot/logic.cxx b/src/Autopilot/logic.cxx index 6f8a53041..e49627f2a 100644 --- a/src/Autopilot/logic.cxx +++ b/src/Autopilot/logic.cxx @@ -57,6 +57,17 @@ bool Logic::get_output() const void Logic::update( bool firstTime, double dt ) { + if(_debug) { + bool q = get_output(); + bool a = get_input(); + if( a != q ) { + using std::endl; + using std::cout; + cout << "updating logic \"" << get_name() << "\"" << endl; + cout << "prev. Output:" << q << endl; + cout << "new Output:" << a << endl; + } + } set_output( get_input() ); }