#ifndef HAVE_CONFIG_H
# include <config.h>
#endif
-#include <simgear/math/SGMath.hxx>
#endif
#include "logic.hxx"
if( _inverted ) value = !value;
// set all outputs to the given value
- for( OutputMap::iterator it = _output.begin(); it != _output.end(); it++ )
+ for( OutputMap::iterator it = _output.begin(); it != _output.end(); ++it )
(*it).second->setValue( value );
}
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() );
}