From 104e997b59e6ecbbeab215313ab930df4814b48c Mon Sep 17 00:00:00 2001 From: Evelyn Eastmond Date: Thu, 7 Feb 2019 10:48:48 -0500 Subject: [PATCH] Changing the input rate, resolves 1976. --- src/extensions/scratch3_gdx_for/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index 9c860228d..d781aebcb 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -38,6 +38,11 @@ const GDXFOR_SENSOR = { SPIN_SPEED_Z: 7 }; +/** + * The update rate, in milliseconds, for sensor data input from the peripheral. + */ +const GDXFOR_UPDATE_RATE = 100; + /** * Threshold for pushing and pulling force, for the whenForcePushedOrPulled hat block. * @type {number} @@ -220,7 +225,7 @@ class GdxFor { }); // Start device - this._device.start(10); // Set the period to 10 milliseconds + this._device.start(GDXFOR_UPDATE_RATE); }); }