fixing threshold

This commit is contained in:
Peli de Halleux
2018-01-10 11:45:08 -08:00
parent b9f5096480
commit e61dffff03
6 changed files with 9 additions and 6 deletions

View File

@ -257,8 +257,9 @@ namespace sensors {
* @param condition the dark or bright light condition
* @param value the value threshold
*/
//% blockId=irSetThreshold block="set %condition|to %value"
//% blockId=irSetThreshold block="set %sensor|%condition|to %value"
//% group="Threshold" blockGap=8
//% value.min=0 value.max=100
setThreshold(condition: InfraredSensorEvent, value: number) {
if (condition == InfraredSensorEvent.ObjectNear)
this.proximityThreshold.setLowThreshold(value)