]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/locomotive.cpp
Add networking library and a remote control program
[r2c2.git] / source / libmarklin / locomotive.cpp
index 3088d4655ba3d100b2c64d2c704782e4e3c04e57..2df46a0d7fae67429c6ddea6be63da3e81c9f6eb 100644 (file)
@@ -34,6 +34,8 @@ Locomotive::Locomotive(const LocoType &t, Control &c, unsigned a):
 void Locomotive::set_speed(unsigned spd)
 {
        spd = min(spd, 14U);
+       if(spd==speed)
+               return;
        signal_speed_changing.emit(spd);
 
        speed = spd;