diff --git a/libs/color-sensor/color.ts b/libs/color-sensor/color.ts index c6f0bdb5..bd9e7fcb 100644 --- a/libs/color-sensor/color.ts +++ b/libs/color-sensor/color.ts @@ -136,7 +136,7 @@ namespace sensors { //% group="Color Sensor" onLightChanged(mode: LightIntensityMode, condition: LightCondition, handler: () => void) { control.onEvent(this._id, condition, handler); - this.setMode(ColorSensorMode.AmbientLightIntensity) + this.setMode(mode) } /**