]> git.tdb.fi Git - r2c2.git/commitdiff
Do not tick the clock while halted
authorMikko Rasa <tdb@tdb.fi>
Tue, 8 Apr 2014 18:48:11 +0000 (21:48 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 8 Apr 2014 18:48:11 +0000 (21:48 +0300)
source/libr2c2/layout.cpp

index a6abc500448782341378376a83bf35c6500325ff..43ce921475cf9971b3ff518f48cf6d5425aedf14 100644 (file)
@@ -385,7 +385,8 @@ void Layout::tick()
                dt = t-last_tick;
        last_tick = t;
 
-       clock.tick(dt);
+       if(!driver || !driver->is_halted())
+               clock.tick(dt);
 
        for(set<Sensor *>::iterator i=sensors.get().begin(); i!=sensors.get().end(); ++i)
                (*i)->tick(dt);