From 5c3c83eb5217857ad76be55562404603668590d0 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 17 Sep 2019 10:52:00 -0700 Subject: [PATCH] add a run to avoid tight loop hogging (#913) --- libs/core/output.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/core/output.ts b/libs/core/output.ts index f4d080df..13bc7f02 100644 --- a/libs/core/output.ts +++ b/libs/core/output.ts @@ -267,6 +267,9 @@ namespace motors { this.pauseUntilReady(); // allow robot to settle this.settle(); + } else { + // give a breather to the event system in tight loops + pause(1); } }