From ec2ca32ffaaea13769c73004ed26c048ab917ca8 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Tue, 19 Feb 2019 13:55:24 -0500 Subject: [PATCH 1/8] =?UTF-8?q?Remove=20=E2=80=9Cmoved=E2=80=9D=20gesture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/extensions/scratch3_gdx_for/index.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index b5091517a..ad4142222 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -61,12 +61,6 @@ const GDXFOR_UPDATE_RATE = 100; */ const FORCE_THRESHOLD = 5; -/** - * Threshold for acceleration magnitude, for the "moved" gesture. - * @type {number} - */ -const MOVED_THRESHOLD = 3; - /** * Threshold for acceleration magnitude, for the "shaken" gesture. * @type {number} @@ -409,7 +403,6 @@ const PushPullValues = { * @enum {string} */ const GestureValues = { - MOVED: 'moved', SHAKEN: 'shaken', STARTED_FALLING: 'started falling' }; @@ -564,14 +557,6 @@ class Scratch3GdxForBlocks { get GESTURE_MENU () { return [ - { - text: formatMessage({ - id: 'gdxfor.moved', - default: 'moved', - description: 'the sensor was moved' - }), - value: GestureValues.MOVED - }, { text: formatMessage({ id: 'gdxfor.shaken', @@ -654,7 +639,7 @@ class Scratch3GdxForBlocks { GESTURE: { type: ArgumentType.STRING, menu: 'gestureOptions', - defaultValue: GestureValues.MOVED + defaultValue: GestureValues.SHAKEN } } }, @@ -762,8 +747,6 @@ class Scratch3GdxForBlocks { whenGesture (args) { switch (args.GESTURE) { - case GestureValues.MOVED: - return this.gestureMagnitude() > MOVED_THRESHOLD; case GestureValues.SHAKEN: return this.gestureMagnitude() > SHAKEN_THRESHOLD; case GestureValues.STARTED_FALLING: From f4662f833fd1808fd03a992b718c07cf31f68508 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Tue, 19 Feb 2019 15:06:03 -0500 Subject: [PATCH 2/8] =?UTF-8?q?rename=20=E2=80=9Ctilt=20angle=E2=80=9D=20a?= =?UTF-8?q?nd=20=E2=80=9Cspin=20speed=E2=80=9D=20reporters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/extensions/scratch3_gdx_for/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index ad4142222..78015e89f 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -647,7 +647,7 @@ class Scratch3GdxForBlocks { opcode: 'getTilt', text: formatMessage({ id: 'gdxfor.getTilt', - default: 'tilt [TILT]', + default: 'tilt angle [TILT]', description: 'gets tilt' }), blockType: BlockType.REPORTER, @@ -663,7 +663,7 @@ class Scratch3GdxForBlocks { opcode: 'getSpinSpeed', text: formatMessage({ id: 'gdxfor.getSpin', - default: 'spin [DIRECTION]', + default: 'spin speed [DIRECTION]', description: 'gets spin speed' }), blockType: BlockType.REPORTER, From ba548701e2a4243efd574066bdd65e187e700923 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Tue, 19 Feb 2019 15:14:37 -0500 Subject: [PATCH 3/8] Set update rate to 80ms --- src/extensions/scratch3_gdx_for/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index 78015e89f..2015fa954 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -53,7 +53,7 @@ const GDXFOR_SENSOR = { /** * The update rate, in milliseconds, for sensor data input from the peripheral. */ -const GDXFOR_UPDATE_RATE = 100; +const GDXFOR_UPDATE_RATE = 80; /** * Threshold for pushing and pulling force, for the whenForcePushedOrPulled hat block. From a19585af75ecfa106dfc14f9e3e2e24414941cca Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Tue, 19 Feb 2019 16:09:58 -0500 Subject: [PATCH 4/8] Add tilt blocks --- src/extensions/scratch3_gdx_for/index.js | 63 +++++++++++++++++++++--- 1 file changed, 56 insertions(+), 7 deletions(-) diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index 2015fa954..8bff84dc4 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -85,6 +85,12 @@ const FREEFALL_THRESHOLD = 0.5; */ const FREEFALL_ROTATION_FACTOR = 0.3; +/** + * Threshold in degrees for reporting that the sensor is tilted. + * @type {number} + */ +const TILT_THRESHOLD = 15; + /** * Acceleration due to gravity, in m/s^2. * @type {number} @@ -627,6 +633,22 @@ class Scratch3GdxForBlocks { blockType: BlockType.REPORTER }, '---', + { + opcode: 'whenTilted', + text: formatMessage({ + id: 'gdxfor.whenTilted', + default: 'when tilted [TILT]', + description: 'when the sensor detects tilt' + }), + blockType: BlockType.HAT, + arguments: { + TILT: { + type: ArgumentType.STRING, + menu: 'tiltOptions', + defaultValue: TiltAxisValues.FRONT + } + } + }, { opcode: 'whenGesture', text: formatMessage({ @@ -716,7 +738,22 @@ class Scratch3GdxForBlocks { description: 'is the device in free fall?' }), blockType: BlockType.BOOLEAN - + }, + { + opcode: 'isTilted', + text: formatMessage({ + id: 'gdxfor.isTilted', + default: 'tilted [TILT]?', + description: 'is the device tilted?' + }), + blockType: BlockType.BOOLEAN, + arguments: { + TILT: { + type: ArgumentType.STRING, + menu: 'tiltOptions', + defaultValue: TiltAxisValues.FRONT + } + } } ], menus: { @@ -757,24 +794,36 @@ class Scratch3GdxForBlocks { } } + whenTilted (args) { + return this._getTiltAngle(args.TILT) > TILT_THRESHOLD; + } + getTilt (args) { + return this._getTiltAngle(args.TILT); + } + + isTilted (args) { + return this._getTiltAngle(args.TILT) > TILT_THRESHOLD; + } + + _getTiltAngle (direction) { // Tilt values are calculated using acceleration due to gravity, // so we need to return 0 when the peripheral is not connected. if (!this._peripheral.isConnected()) { return 0; } - switch (args.TILT) { + switch (direction) { case TiltAxisValues.FRONT: - return Math.round(this._peripheral.getTiltFrontBack(false)); - case TiltAxisValues.BACK: return Math.round(this._peripheral.getTiltFrontBack(true)); + case TiltAxisValues.BACK: + return Math.round(this._peripheral.getTiltFrontBack(false)); case TiltAxisValues.LEFT: - return Math.round(this._peripheral.getTiltLeftRight(false)); - case TiltAxisValues.RIGHT: return Math.round(this._peripheral.getTiltLeftRight(true)); + case TiltAxisValues.RIGHT: + return Math.round(this._peripheral.getTiltLeftRight(false)); default: - log.warn(`Unknown direction in getTilt: ${args.TILT}`); + log.warn(`Unknown direction in getTilt: ${direction}`); } } From 7da54dd0677a6ba954cda64dc87ca0c33615fe41 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Wed, 20 Feb 2019 10:49:03 -0500 Subject: [PATCH 5/8] Add tilted any option --- src/extensions/scratch3_gdx_for/index.js | 44 +++++++++++++++++++----- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index 8bff84dc4..2714d33c7 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -422,7 +422,8 @@ const TiltAxisValues = { FRONT: 'front', BACK: 'back', LEFT: 'left', - RIGHT: 'right' + RIGHT: 'right', + ANY: 'any' }; /** @@ -519,6 +520,20 @@ class Scratch3GdxForBlocks { ]; } + get TILT_MENU_ANY () { + return [ + ...this.TILT_MENU, + { + text: formatMessage({ + id: 'gdxfor.tiltDirectionMenu.any', + default: 'any', + description: 'label for any direction element in tilt direction picker for gdxfor extension' + }), + value: TiltAxisValues.ANY + } + ]; + } + get FACE_MENU () { return [ { @@ -644,8 +659,8 @@ class Scratch3GdxForBlocks { arguments: { TILT: { type: ArgumentType.STRING, - menu: 'tiltOptions', - defaultValue: TiltAxisValues.FRONT + menu: 'tiltAnyOptions', + defaultValue: TiltAxisValues.ANY } } }, @@ -750,8 +765,8 @@ class Scratch3GdxForBlocks { arguments: { TILT: { type: ArgumentType.STRING, - menu: 'tiltOptions', - defaultValue: TiltAxisValues.FRONT + menu: 'tiltAnyOptions', + defaultValue: TiltAxisValues.ANY } } } @@ -761,6 +776,7 @@ class Scratch3GdxForBlocks { gestureOptions: this.GESTURE_MENU, axisOptions: this.AXIS_MENU, tiltOptions: this.TILT_MENU, + tiltAnyOptions: this.TILT_MENU_ANY, faceOptions: this.FACE_MENU } }; @@ -795,15 +811,27 @@ class Scratch3GdxForBlocks { } whenTilted (args) { - return this._getTiltAngle(args.TILT) > TILT_THRESHOLD; + return this._isTilted(args.TILT); + } + + isTilted (args) { + return this._isTilted(args.TILT); } getTilt (args) { return this._getTiltAngle(args.TILT); } - isTilted (args) { - return this._getTiltAngle(args.TILT) > TILT_THRESHOLD; + _isTilted (direction) { + switch (direction) { + case TiltAxisValues.ANY: + return this._getTiltAngle(TiltAxisValues.FRONT) > TILT_THRESHOLD || + this._getTiltAngle(TiltAxisValues.BACK) > TILT_THRESHOLD || + this._getTiltAngle(TiltAxisValues.LEFT) > TILT_THRESHOLD || + this._getTiltAngle(TiltAxisValues.RIGHT) > TILT_THRESHOLD; + default: + return this._getTiltAngle(direction) > TILT_THRESHOLD; + } } _getTiltAngle (direction) { From 9e650279a6d4bd67b7831012b63e01e3c686ca6a Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Wed, 20 Feb 2019 10:59:07 -0500 Subject: [PATCH 6/8] Re-order blocks --- src/extensions/scratch3_gdx_for/index.js | 50 ++++++++++++------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index 2714d33c7..4f3a31f4e 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -622,6 +622,22 @@ class Scratch3GdxForBlocks { blockIconURI: blockIconURI, showStatusButton: true, blocks: [ + { + opcode: 'whenGesture', + text: formatMessage({ + id: 'gdxfor.whenGesture', + default: 'when [GESTURE]', + description: 'when the sensor detects a gesture' + }), + blockType: BlockType.HAT, + arguments: { + GESTURE: { + type: ArgumentType.STRING, + menu: 'gestureOptions', + defaultValue: GestureValues.SHAKEN + } + } + }, { opcode: 'whenForcePushedOrPulled', text: formatMessage({ @@ -665,18 +681,18 @@ class Scratch3GdxForBlocks { } }, { - opcode: 'whenGesture', + opcode: 'isTilted', text: formatMessage({ - id: 'gdxfor.whenGesture', - default: 'when [GESTURE]', - description: 'when the sensor detects a gesture' + id: 'gdxfor.isTilted', + default: 'tilted [TILT]?', + description: 'is the device tilted?' }), - blockType: BlockType.HAT, + blockType: BlockType.BOOLEAN, arguments: { - GESTURE: { + TILT: { type: ArgumentType.STRING, - menu: 'gestureOptions', - defaultValue: GestureValues.SHAKEN + menu: 'tiltAnyOptions', + defaultValue: TiltAxisValues.ANY } } }, @@ -696,6 +712,7 @@ class Scratch3GdxForBlocks { } } }, + '---', { opcode: 'getSpinSpeed', text: formatMessage({ @@ -728,7 +745,6 @@ class Scratch3GdxForBlocks { } } }, - '---', { opcode: 'isFacing', text: formatMessage({ @@ -753,22 +769,6 @@ class Scratch3GdxForBlocks { description: 'is the device in free fall?' }), blockType: BlockType.BOOLEAN - }, - { - opcode: 'isTilted', - text: formatMessage({ - id: 'gdxfor.isTilted', - default: 'tilted [TILT]?', - description: 'is the device tilted?' - }), - blockType: BlockType.BOOLEAN, - arguments: { - TILT: { - type: ArgumentType.STRING, - menu: 'tiltAnyOptions', - defaultValue: TiltAxisValues.ANY - } - } } ], menus: { From 931d7e9a622b18b5559a304fcc1ef545416f8226 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Wed, 20 Feb 2019 11:00:21 -0500 Subject: [PATCH 7/8] More re-ordering --- src/extensions/scratch3_gdx_for/index.js | 50 ++++++++++++------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index 4f3a31f4e..a67663241 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -713,6 +713,31 @@ class Scratch3GdxForBlocks { } }, '---', + { + opcode: 'isFacing', + text: formatMessage({ + id: 'gdxfor.isFacing', + default: 'facing [FACING]?', + description: 'is the device facing up or down?' + }), + blockType: BlockType.BOOLEAN, + arguments: { + FACING: { + type: ArgumentType.STRING, + menu: 'faceOptions', + defaultValue: FaceValues.UP + } + } + }, + { + opcode: 'isFreeFalling', + text: formatMessage({ + id: 'gdxfor.isFreeFalling', + default: 'falling?', + description: 'is the device in free fall?' + }), + blockType: BlockType.BOOLEAN + }, { opcode: 'getSpinSpeed', text: formatMessage({ @@ -744,31 +769,6 @@ class Scratch3GdxForBlocks { defaultValue: AxisValues.X } } - }, - { - opcode: 'isFacing', - text: formatMessage({ - id: 'gdxfor.isFacing', - default: 'facing [FACING]?', - description: 'is the device facing up or down?' - }), - blockType: BlockType.BOOLEAN, - arguments: { - FACING: { - type: ArgumentType.STRING, - menu: 'faceOptions', - defaultValue: FaceValues.UP - } - } - }, - { - opcode: 'isFreeFalling', - text: formatMessage({ - id: 'gdxfor.isFreeFalling', - default: 'falling?', - description: 'is the device in free fall?' - }), - blockType: BlockType.BOOLEAN } ], menus: { From c0e80edfccf6d04bc1245132b16c4a70d7663c27 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Wed, 20 Feb 2019 11:13:00 -0500 Subject: [PATCH 8/8] Update block and menu icons --- src/extensions/scratch3_gdx_for/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index a67663241..f4eb425f4 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -12,7 +12,14 @@ const ScratchLinkDeviceAdapter = require('./scratch-link-device-adapter'); * @type {string} */ // eslint-disable-next-line max-len -const blockIconURI = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAuNSkiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PHBhdGggZD0iTTEyIDM5LjVBMi41IDIuNSAwIDAgMSA5LjUgMzdjMC0uMy4yLS41LjUtLjVzLjUuMi41LjVhMS41IDEuNSAwIDEgMCAzIDB2LS4yYzAtLjQtLjItLjgtLjUtMWwtLjgtLjljLS41LS40LS43LTEtLjctMS43VjMxYzAtLjMuMi0uNS41LS41cy41LjIuNS41djIuMmMwIC40LjEuOC40IDFsLjguOWMuNS40LjggMSAuOCAxLjd2LjJjMCAxLjQtMS4xIDIuNS0yLjUgMi41eiIgZmlsbD0iI0U2RTdFOCIvPjxwYXRoIGQ9Ik0yMy43LjNBMSAxIDAgMCAwIDIzIDBIMWExIDEgMCAwIDAtLjcuM0ExIDEgMCAwIDAgMCAxdjI2YzAgLjMuMS41LjMuNy4yLjIuNC4zLjcuM2gyMmMuMyAwIC41LS4xLjctLjMuMi0uMi4zLS40LjMtLjdWMWExIDEgMCAwIDAtLjMtLjd6TTEyIDRjMiAwIDMuMyAyIDIuNiAzLjhMMTMuMyAxMWExLjQgMS40IDAgMCAxLTIuNyAwTDkuNSA3LjdsLS4yLTFDOS4yIDUuNCAxMC40IDQgMTIgNHoiIHN0cm9rZT0iIzdDODdBNSIgZmlsbD0iIzg1OTJBRiIgZmlsbC1ydWxlPSJub256ZXJvIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJNMiAydjI0aDIwVjJIMnptMTAgM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ibdt+3ox7WOoxMCmD4i68PrZkBQaEDUe1tnVqSyyfl79+vr6evz1C2jKogkYWEEc0JnViiZRqKuoqJiZtEJcn0GIsykewzhW2jJVZjzBamxsfK79ase/5MoXL106TnEDwfq36qgIF6HGjKyqFsNkDGMwUNxEDEmIHQTxyNGjH1AchvumBcC4vAuXVpiA+TDYMFDXiiZFoN+SrmMI7tixo/v3337diNtQUzNpPq1RChIra5ccAFKDUEwYLra2fnXu3PmtA0gojqbaVUNl23ft+pPiPW73U7RGYdGH5QCQYCg93C73075S34I5c+ZQa0s/B1Njou51tVVVatJAXcrED3Q4EI5plgsHgAQiSiRCoRD9ECeam9fPo32UJzFQYwJLlix9mdZ9fb1naY2iyiQ2rVtyAEi199Pi5M8/tdB62vRpzceOH3+toaHBh61w2clTp96sqq5ehUnxw0eO7KA8KKpMYtO6JZcOKTUeNRhsp0+ffmtilYI1VLf4+Qvn1784d+5ezEfW144hMR05blglpDgHSbqxt6Wl5Y8ZM6afKq8oL7LZHd54PH7H7w+cOPj9dx8uXbLk+ICynbhm4cJDr7LVMKmhoP5dphaWoFGrHMTAQrgBJCjkFdQHpPntqCUmiWCge14PBsvdFnUYlP8AMAKfKIKmYukAAAAASUVORK5CYII='; + +/** + * Icon png to be displayed in the blocks category menu, encoded as a data URI. + * @type {string} + */ +// eslint-disable-next-line max-len +const menuIconURI = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAAA9dJREFUWAnNmE2IFEcUgF/9dE/v7LoaM9kkK4JBRA0EFBIPRm85hBAvEXHXwyo5eFE87GFcReMkObgJiQnkkJzEg9n8HIJixKNe1IMKihgiCbviwV11V3d0d3pmuqsqr5ppcEnb3TNVggVFVVe9eu+r97qqq4tASqp8/fsboQgmU0TMugi571K29bPy9ovPU8Sf16HbpQj3EkYFBcJcr5Am2nZfs94AIWVfqMQeHNwhICUBZ4ypUIA/X2sbIm2AW8AJK0lkEP6TJpf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* Enum for Vernier godirect protocol. @@ -620,6 +627,7 @@ class Scratch3GdxForBlocks { id: Scratch3GdxForBlocks.EXTENSION_ID, name: Scratch3GdxForBlocks.EXTENSION_NAME, blockIconURI: blockIconURI, + menuIconURI: menuIconURI, showStatusButton: true, blocks: [ {