update mode selection

This commit is contained in:
Peli de Halleux 2017-11-30 08:20:00 -08:00
parent ad17191ae2
commit 39b7f99741

View File

@ -136,7 +136,7 @@ namespace sensors {
//% group="Color Sensor" //% group="Color Sensor"
onLightChanged(mode: LightIntensityMode, condition: LightCondition, handler: () => void) { onLightChanged(mode: LightIntensityMode, condition: LightCondition, handler: () => void) {
control.onEvent(this._id, <number>condition, handler); control.onEvent(this._id, <number>condition, handler);
this.setMode(ColorSensorMode.AmbientLightIntensity) this.setMode(<ColorSensorMode><number>mode)
} }
/** /**