Autopilot: enable debug output for logic elements
This commit is contained in:
parent
ca3cc03fac
commit
4be1aba62e
1 changed files with 11 additions and 0 deletions
|
@ -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() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue