Safepolling (#915)
* headstart on safe polling * poke in sensors * more poking * typo
This commit is contained in:
1 parent
64a9930c2e
commit
6f34887c94
8 files changed
+105
-53
No files matched your search
@@ -73,6 +73,7 @@ namespace sensors {
|
||||
//% weight=81 blockGap=8
|
||||
//% group="Touch Sensor"
|
||||
isPressed() {
|
||||
this.poke();
|
||||
return this.button.isPressed();
|
||||
}
|
||||
|
||||
@@ -90,6 +91,7 @@ namespace sensors {
|
||||
//% weight=81
|
||||
//% group="Touch Sensor"
|
||||
wasPressed() {
|
||||
this.poke();
|
||||
return this.button.wasPressed();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user