]> git.tdb.fi Git - r2c2.git/commitdiff
Remove some debug messages that managed to sneak in
authorMikko Rasa <tdb@tdb.fi>
Sun, 24 Feb 2013 11:47:33 +0000 (13:47 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 24 Feb 2013 11:47:33 +0000 (13:47 +0200)
source/libr2c2/signal.cpp

index 986d727d5a95b9e4f8f8ffc41b35ef3592e6f308..6efc250256477a7115cae0cff3962da7667be158 100644 (file)
@@ -10,8 +10,6 @@
 using namespace std;
 using namespace Msp;
 
-#include <msp/io/print.h>
-
 namespace R2C2 {
 
 Signal::Signal(Layout &l, const SignalType &t):
@@ -109,13 +107,10 @@ void Signal::tick(const Time::TimeDelta &)
                int train_entry = train->get_entry_to_block(*block);
                if(train_entry>=0 && static_cast<unsigned>(train_entry)==entry)
                {
-                       IO::print("Train passing in the proper direction\n");
                        if(train_conn)
                                train_conn.disconnect();
                        train_conn = train->signal_advanced.connect(sigc::mem_fun(this, &Signal::train_advanced));
                }
-               else
-                       IO::print("Train passing in the wrong direction (entry=%d, train_entry=%d)\n", entry, train_entry);
                check_train_direction = false;
                check_allocated_blocks = true;
        }
@@ -131,7 +126,6 @@ void Signal::tick(const Time::TimeDelta &)
                                ++n_blocks;
                        iter=iter.next();
                }
-               IO::print("%d sensor blocks allocated\n", n_blocks);
                check_allocated_blocks = false;
 
                const list<SignalType::Indication> &indications = type.get_indications();
@@ -143,7 +137,6 @@ void Signal::tick(const Time::TimeDelta &)
                                break;
                        }
 
-               IO::print("Setting signal %d to aspect %d\n", address, aspect);
                layout.get_driver().set_signal(address, aspect);
        }
 }
@@ -171,13 +164,9 @@ void Signal::block_reserved(const Block &b, Train *t)
 void Signal::train_advanced(Block &b)
 {
        if(&b==block)
-       {
-               IO::print("Train is passing the signal now\n");
                passing = true;
-       }
        else if(passing && b.get_sensor_id())
        {
-               IO::print("Train has passed the signal\n");
                layout.get_driver().set_signal(address, type.get_indications().back().aspect);
                reset();
        }