From 21065863772a1f9e99b404093a6696aa581cd7c6 Mon Sep 17 00:00:00 2001 From: Nathan Kunicki Date: Fri, 27 Jul 2018 11:20:23 +0100 Subject: [PATCH] Added automated train layout example --- examples/automated_train_layout.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/examples/automated_train_layout.js b/examples/automated_train_layout.js index 2da973e..bdb94b7 100644 --- a/examples/automated_train_layout.js +++ b/examples/automated_train_layout.js @@ -118,17 +118,6 @@ lpf2.on("discover", async (hub) => { // Wait to discover hubs }, 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) { moving = false; maersk.setMotorSpeed("A", 0);