Merge pull request #118 from Microsoft/ambient_light_threshold
Set high/low to 20/5 for ambient light mode
This commit is contained in:
commit
e1f7a5b8cf
@ -68,6 +68,13 @@ namespace sensors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setMode(m: ColorSensorMode) {
|
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)
|
this._setMode(m)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user