Set high/low to 20/5
This commit is contained in:
parent
d78d9c8686
commit
2c73bfc813
@ -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