Color calibration (#245)

* better handling of thresholds, color calibration strategy

* updating calibration parameters
This commit is contained in:
Peli de Halleux
2018-01-19 13:11:11 -08:00
committed by GitHub
parent 23bb316403
commit bf6a932e5f
7 changed files with 145 additions and 89 deletions

View File

@ -138,12 +138,12 @@ namespace sensors {
//% fixedInstances
export class InfraredSensor extends internal.UartSensor {
private channel: IrRemoteChannel;
private proximityThreshold: sensors.internal.ThresholdDetector;
private proximityThreshold: sensors.ThresholdDetector;
constructor(port: number) {
super(port)
this.channel = IrRemoteChannel.Ch0
this.proximityThreshold = new sensors.internal.ThresholdDetector(this._id, 0, 100, 10, 90);
this.proximityThreshold = new sensors.ThresholdDetector(this._id, 0, 100, 10, 90);
irButton(0) // make sure buttons array is initalized
// and set the mode, as otherwise button events won't work