Switch to reflected light when calling threshold (#489)

* fix typo

* fixing threshold functions

* switch to reflected mode when calling threshold
This commit is contained in:
Peli de Halleux
2018-04-11 09:58:34 -06:00
committed by GitHub
parent 6c253182e4
commit a4a9af28a4
3 changed files with 14 additions and 4 deletions

View File

@ -279,7 +279,7 @@ namespace sensors {
//% group="Threshold" blockGap=8 weight=49
//% this.fieldEditor="ports"
proximityThreshold(condition: InfraredSensorEvent): number {
return this._proximityThreshold.threshold(<ThresholdState><number>Light.Dark);
return this._proximityThreshold.threshold(<ThresholdState><number>condition);
}
// TODO