Switch to reflected light when calling threshold (#489)
* fix typo * fixing threshold functions * switch to reflected mode when calling threshold
This commit is contained in:
1 parent
6c253182e4
commit
a4a9af28a4
3 files changed
+14
-4
No files matched your search
@@ -115,8 +115,8 @@ namespace sensors {
|
||||
//% this.fieldEditor="ports"
|
||||
threshold(condition: UltrasonicSensorEvent): number {
|
||||
switch (condition) {
|
||||
case UltrasonicSensorEvent.ObjectNear: this.promixityThreshold.threshold(ThresholdState.Low); break;
|
||||
case UltrasonicSensorEvent.ObjectDetected: this.movementThreshold; break;
|
||||
case UltrasonicSensorEvent.ObjectNear: return this.promixityThreshold.threshold(ThresholdState.Low);
|
||||
case UltrasonicSensorEvent.ObjectDetected: return this.movementThreshold;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user