X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Flocomotive.cpp;h=6329196710583014bc76ee80028daf476bb77ef7;hb=06c100aacb559fbbe7380e15981c4772092c269b;hp=ecacea19a833af43f918823523951740d9a0e69c;hpb=78bc40c2d1a5fcc5715143bd2326716fbb143730;p=r2c2.git diff --git a/source/libmarklin/locomotive.cpp b/source/libmarklin/locomotive.cpp index ecacea1..6329196 100644 --- a/source/libmarklin/locomotive.cpp +++ b/source/libmarklin/locomotive.cpp @@ -27,6 +27,8 @@ void Locomotive::set_speed(unsigned spd) speed=min(spd, 14U); send_command(false); + + signal_speed_changed.emit(speed); } void Locomotive::set_reverse(bool rev) @@ -62,7 +64,7 @@ void Locomotive::refresh_status() cmd[0]=CMD_LOK_STATUS; cmd[1]=addr&0xFF; cmd[2]=(addr>>8)&0xFF; - control.command(string(cmd,3)).signal_done.connect(sigc::mem_fun(this,&Locomotive::status_reply)); + control.command(string(cmd, 3)).signal_done.connect(sigc::mem_fun(this, &Locomotive::status_reply)); } void Locomotive::send_command(bool setf)