Added automated train layout example

This commit is contained in:
Nathan Kunicki 2018-07-27 11:20:23 +01:00
parent d5a62f5645
commit 2106586377

View File

@ -118,17 +118,6 @@ lpf2.on("discover", async (hub) => { // Wait to discover hubs
}, 6000); }, 6000);
} }
/*if (color === 7 && moving && state === 2) {
moving = false;
maersk.setMotorSpeed("A", 0);
await maersk.sleep(2000);
maersk.setMotorSpeed("A", -40);
setTimeout(() => {
state = 3;
moving = true;
}, 3000);
}*/
if (color === 7 && moving && state === 3) { if (color === 7 && moving && state === 3) {
moving = false; moving = false;
maersk.setMotorSpeed("A", 0); maersk.setMotorSpeed("A", 0);