From 217958aec367cd029fef5ac6698847e7f4d7de21 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Sun, 17 Dec 2017 23:19:38 -0800 Subject: [PATCH] fix polarity --- libs/core/output.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/core/output.ts b/libs/core/output.ts index 96f679cb..01f90e53 100644 --- a/libs/core/output.ts +++ b/libs/core/output.ts @@ -144,9 +144,9 @@ namespace motors { setReversed(reversed: boolean) { this.__init(); const b = mkCmd(this._port, DAL.opOutputPolarity, 1) - b.setNumber(NumberFormat.Int8LE, 2, reversed ? -1 : 1); + b.setNumber(NumberFormat.Int8LE, 2, reversed ? 0 : 1); writePWM(b) - } + } /** * Stops the motor(s).