Merge pull request #118 from Microsoft/ambient_light_threshold

Set high/low to 20/5 for ambient light mode
This commit is contained in:
Caitlin Hennessy 2017-12-19 14:42:54 -08:00 committed by GitHub
commit e1f7a5b8cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,6 +68,13 @@ namespace sensors {
}
setMode(m: ColorSensorMode) {
if (m == ColorSensorMode.AmbientLightIntensity) {
this.thresholdDetector.setLowThreshold(5);
this.thresholdDetector.setHighThreshold(20);
} else {
this.thresholdDetector.setLowThreshold(20);
this.thresholdDetector.setHighThreshold(80);
}
this._setMode(m)
}