]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/block.cpp
Change the control system to separate speed and reverse
[r2c2.git] / source / libmarklin / block.cpp
index 51f8ddb0dfe45dbd954f994ba75b1c82f759e290..aa16fffc6ba5b6e3f04879f0e3d5fdb206b809c3 100644 (file)
@@ -199,6 +199,11 @@ void Block::determine_id()
                        swap(id1, id2);
                id = (id1<<16)|id2;
        }
+       else if(endpoints.size()==1)
+       {
+               unsigned id1 = endpoints[0].link ? endpoints[0].link->get_id() : 1;
+               id = 0x10000 | id1;
+       }
 }