added 2 more activities

This commit is contained in:
Peli de Halleux
2017-10-26 23:58:34 -07:00
parent 86212e2153
commit 6391620373
6 changed files with 35 additions and 1 deletions

View File

@ -43,7 +43,7 @@ namespace input {
//% blockNamespace=input
//% weight=100 blockGap=8
//% group="Ultrasonic Sensor"
onObjectNear(distance: number, handler: () => void) {
onObjectNear(handler: () => void) {
control.onEvent(this._id, PromixityEvent.ObjectNear, handler);
if (this.distance() == PromixityEvent.ObjectNear)
control.runInBackground(handler);