From b0400856cca8be380c8e404c64586cb877b0bbaa Mon Sep 17 00:00:00 2001 From: Nathan Kunicki Date: Thu, 14 Jun 2018 18:08:41 +0100 Subject: [PATCH] Better distance test --- test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.js b/test.js index 1efbfa9..16e39bd 100644 --- a/test.js +++ b/test.js @@ -18,7 +18,7 @@ lpf2.on("discover", (hub) => { moveHub.on("distance", (port, distance) => { console.log(`Distance ${distance} received on port ${port}`); - if (distance < 100) { + if (distance < 90) { moveHub.setMotorSpeed("D", 40); } else { moveHub.setMotorSpeed("D", 0); @@ -31,7 +31,7 @@ lpf2.on("discover", (hub) => { wedoHub.on("distance", (port, distance) => { console.log(`Distance ${distance} received on port ${port}`); - if (distance < 100) { + if (distance < 90) { wedoHub.setMotorSpeed("B", 40); } else { wedoHub.setMotorSpeed("B", 0);