1
0
Fork 0

Autopilot: enable debug output for logic elements

This commit is contained in:
Torsten Dreyer 2014-03-28 17:48:35 +01:00
parent ca3cc03fac
commit 4be1aba62e

View file

@ -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() );
}