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
@@ -45,6 +45,7 @@ namespace sensors {
|
||||
//% weight=64 blockGap=8
|
||||
//% group="Gyro Sensor"
|
||||
angle(): number {
|
||||
this.poke();
|
||||
if (this.calibrating)
|
||||
pauseUntil(() => !this.calibrating, 2000);
|
||||
|
||||
@@ -65,6 +66,7 @@ namespace sensors {
|
||||
//% weight=65 blockGap=8
|
||||
//% group="Gyro Sensor"
|
||||
rate(): number {
|
||||
this.poke();
|
||||
if (this.calibrating)
|
||||
pauseUntil(() => !this.calibrating, 2000);
|
||||
|
||||
|
||||
Reference in new issue
Block a user