From 5bd4aed0e18ab309a3ca2947dc5dec8e18a2e88b Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 28 Aug 2019 02:34:55 +0300 Subject: [PATCH] Multiple sensors 2 (#877) * Fixed -1 mode in libs * Deleted todo --- libs/color-sensor/color.ts | 2 +- libs/core/input.ts | 1 - libs/gyro-sensor/gyro.ts | 2 +- libs/infrared-sensor/ir.ts | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/color-sensor/color.ts b/libs/color-sensor/color.ts index 72121eb0..e6d977df 100644 --- a/libs/color-sensor/color.ts +++ b/libs/color-sensor/color.ts @@ -1,5 +1,5 @@ const enum ColorSensorMode { - None = -1, + None = 0, //% block="reflected light intensity" ReflectedLightIntensity = 0, //% block="ambient light intensity" diff --git a/libs/core/input.ts b/libs/core/input.ts index 27d3c160..8065b682 100644 --- a/libs/core/input.ts +++ b/libs/core/input.ts @@ -212,7 +212,6 @@ namespace sensors.internal { _activated() { this.realmode = 0 - // uartReset(this.port) // TODO is it ever needed? this._setMode(this.mode) } diff --git a/libs/gyro-sensor/gyro.ts b/libs/gyro-sensor/gyro.ts index 3b8b9f3c..1200307d 100644 --- a/libs/gyro-sensor/gyro.ts +++ b/libs/gyro-sensor/gyro.ts @@ -1,5 +1,5 @@ const enum GyroSensorMode { - None = -1, + None = 0, Angle = 0, Rate = 1, } diff --git a/libs/infrared-sensor/ir.ts b/libs/infrared-sensor/ir.ts index 11ffd744..85866fd0 100644 --- a/libs/infrared-sensor/ir.ts +++ b/libs/infrared-sensor/ir.ts @@ -1,5 +1,5 @@ const enum InfraredSensorMode { - None = -1, + None = 0, Proximity = 0, Seek = 1, RemoteControl = 2,