for compatibility, make all existing extension menus accept reporters

This commit is contained in:
Christopher Willis-Ford 2019-04-29 13:07:08 -07:00
parent cfee656306
commit 33a6071466
11 changed files with 556 additions and 445 deletions

View file

@ -541,7 +541,7 @@ class BoostMotor {
BoostMotorProfile.DO_NOT_USE
]
);
if (resetState) this.status = BoostMotorState.ON_FOR_ROTATION;
this._pendingPositionDestination = this.position + (degrees * this.direction * direction);
this._parent.send(BoostBLE.characteristic, cmd);
@ -1428,246 +1428,267 @@ class Scratch3BoostBlocks {
}
],
menus: {
MOTOR_ID: [
{
text: formatMessage({
id: 'boost.motorId.a',
default: BoostMotorLabel.A,
description: `label for motor A element in motor menu for LEGO Boost extension`
}),
value: BoostMotorLabel.A
},
{
text: formatMessage({
id: 'boost.motorId.b',
default: BoostMotorLabel.B,
description: `label for motor B element in motor menu for LEGO Boost extension`
}),
value: BoostMotorLabel.B
},
{
text: formatMessage({
id: 'boost.motorId.c',
default: BoostMotorLabel.C,
description: `label for motor C element in motor menu for LEGO Boost extension`
}),
value: BoostMotorLabel.C
},
{
text: formatMessage({
id: 'boost.motorId.d',
default: BoostMotorLabel.D,
description: `label for motor D element in motor menu for LEGO Boost extension`
}),
value: BoostMotorLabel.D
},
{
text: formatMessage({
id: 'boost.motorId.ab',
default: BoostMotorLabel.AB,
description: `label for motor A and B element in motor menu for LEGO Boost extension`
}),
value: BoostMotorLabel.AB
},
{
text: formatMessage({
id: 'boost.motorId.all',
default: BoostMotorLabel.ALL,
description: 'label for all motors element in motor menu for LEGO Boost extension'
}),
value: BoostMotorLabel.ALL
}
],
MOTOR_REPORTER_ID: [
{
text: formatMessage({
id: 'boost.motorReporterId.a',
default: BoostMotorLabel.A,
description: 'label for motor A element in motor menu for LEGO Boost extension'
}),
value: BoostMotorLabel.A
},
{
text: formatMessage({
id: 'boost.motorReporterId.b',
default: BoostMotorLabel.B,
description: 'label for motor B element in motor menu for LEGO Boost extension'
}),
value: BoostMotorLabel.B
},
{
text: formatMessage({
id: 'boost.motorReporterId.c',
default: BoostMotorLabel.C,
description: 'label for motor C element in motor menu for LEGO Boost extension'
}),
value: BoostMotorLabel.C
},
{
text: formatMessage({
id: 'boost.motorReporterId.d',
default: BoostMotorLabel.D,
description: 'label for motor D element in motor menu for LEGO Boost extension'
}),
value: BoostMotorLabel.D
}
],
MOTOR_DIRECTION: [
{
text: formatMessage({
id: 'boost.motorDirection.forward',
default: 'this way',
description: 'label for forward element in motor direction menu for LEGO Boost extension'
}),
value: BoostMotorDirection.FORWARD
},
{
text: formatMessage({
id: 'boost.motorDirection.backward',
default: 'that way',
description: 'label for backward element in motor direction menu for LEGO Boost extension'
}),
value: BoostMotorDirection.BACKWARD
},
{
text: formatMessage({
id: 'boost.motorDirection.reverse',
default: 'reverse',
description: 'label for reverse element in motor direction menu for LEGO Boost extension'
}),
value: BoostMotorDirection.REVERSE
}
],
TILT_DIRECTION: [
{
text: formatMessage({
id: 'boost.tiltDirection.up',
default: 'up',
description: 'label for up element in tilt direction menu for LEGO Boost extension'
}),
value: BoostTiltDirection.UP
},
{
text: formatMessage({
id: 'boost.tiltDirection.down',
default: 'down',
description: 'label for down element in tilt direction menu for LEGO Boost extension'
}),
value: BoostTiltDirection.DOWN
},
{
text: formatMessage({
id: 'boost.tiltDirection.left',
default: 'left',
description: 'label for left element in tilt direction menu for LEGO Boost extension'
}),
value: BoostTiltDirection.LEFT
},
{
text: formatMessage({
id: 'boost.tiltDirection.right',
default: 'right',
description: 'label for right element in tilt direction menu for LEGO Boost extension'
}),
value: BoostTiltDirection.RIGHT
}
],
TILT_DIRECTION_ANY: [
{
text: formatMessage({
id: 'boost.tiltDirection.up',
default: 'up'
}),
value: BoostTiltDirection.UP
},
{
text: formatMessage({
id: 'boost.tiltDirection.down',
default: 'down'
}),
value: BoostTiltDirection.DOWN
},
{
text: formatMessage({
id: 'boost.tiltDirection.left',
default: 'left'
}),
value: BoostTiltDirection.LEFT
},
{
text: formatMessage({
id: 'boost.tiltDirection.right',
default: 'right'
}),
value: BoostTiltDirection.RIGHT
},
{
text: formatMessage({
id: 'boost.tiltDirection.any',
default: 'any',
description: 'label for any element in tilt direction menu for LEGO Boost extension'
}),
value: BoostTiltDirection.ANY
}
],
COLOR: [
{
text: formatMessage({
id: 'boost.color.red',
default: 'red',
description: 'the color red'
}),
value: BoostColor.RED
},
{
text: formatMessage({
id: 'boost.color.blue',
default: 'blue',
description: 'the color blue'
}),
value: BoostColor.BLUE
},
{
text: formatMessage({
id: 'boost.color.green',
default: 'green',
description: 'the color green'
}),
value: BoostColor.GREEN
},
{
text: formatMessage({
id: 'boost.color.yellow',
default: 'yellow',
description: 'the color yellow'
}),
value: BoostColor.YELLOW
},
{
text: formatMessage({
id: 'boost.color.white',
default: 'white',
desription: 'the color white'
}),
value: BoostColor.WHITE
},
{
text: formatMessage({
id: 'boost.color.black',
default: 'black',
description: 'the color black'
}),
value: BoostColor.BLACK
},
{
text: formatMessage({
id: 'boost.color.any',
default: 'any color',
description: 'any color'
}),
value: BoostColor.ANY
}
]
MOTOR_ID: {
acceptReporters: true,
items: [
{
text: formatMessage({
id: 'boost.motorId.a',
default: BoostMotorLabel.A,
description: `label for motor A element in motor menu for LEGO Boost extension`
}),
value: BoostMotorLabel.A
},
{
text: formatMessage({
id: 'boost.motorId.b',
default: BoostMotorLabel.B,
description: `label for motor B element in motor menu for LEGO Boost extension`
}),
value: BoostMotorLabel.B
},
{
text: formatMessage({
id: 'boost.motorId.c',
default: BoostMotorLabel.C,
description: `label for motor C element in motor menu for LEGO Boost extension`
}),
value: BoostMotorLabel.C
},
{
text: formatMessage({
id: 'boost.motorId.d',
default: BoostMotorLabel.D,
description: `label for motor D element in motor menu for LEGO Boost extension`
}),
value: BoostMotorLabel.D
},
{
text: formatMessage({
id: 'boost.motorId.ab',
default: BoostMotorLabel.AB,
description: `label for motor A and B element in motor menu for LEGO Boost extension`
}),
value: BoostMotorLabel.AB
},
{
text: formatMessage({
id: 'boost.motorId.all',
default: BoostMotorLabel.ALL,
description: 'label for all motors element in motor menu for LEGO Boost extension'
}),
value: BoostMotorLabel.ALL
}
]
},
MOTOR_REPORTER_ID: {
acceptReporters: true,
items: [
{
text: formatMessage({
id: 'boost.motorReporterId.a',
default: BoostMotorLabel.A,
description: 'label for motor A element in motor menu for LEGO Boost extension'
}),
value: BoostMotorLabel.A
},
{
text: formatMessage({
id: 'boost.motorReporterId.b',
default: BoostMotorLabel.B,
description: 'label for motor B element in motor menu for LEGO Boost extension'
}),
value: BoostMotorLabel.B
},
{
text: formatMessage({
id: 'boost.motorReporterId.c',
default: BoostMotorLabel.C,
description: 'label for motor C element in motor menu for LEGO Boost extension'
}),
value: BoostMotorLabel.C
},
{
text: formatMessage({
id: 'boost.motorReporterId.d',
default: BoostMotorLabel.D,
description: 'label for motor D element in motor menu for LEGO Boost extension'
}),
value: BoostMotorLabel.D
}
]
},
MOTOR_DIRECTION: {
acceptReporters: true,
items: [
{
text: formatMessage({
id: 'boost.motorDirection.forward',
default: 'this way',
description:
'label for forward element in motor direction menu for LEGO Boost extension'
}),
value: BoostMotorDirection.FORWARD
},
{
text: formatMessage({
id: 'boost.motorDirection.backward',
default: 'that way',
description:
'label for backward element in motor direction menu for LEGO Boost extension'
}),
value: BoostMotorDirection.BACKWARD
},
{
text: formatMessage({
id: 'boost.motorDirection.reverse',
default: 'reverse',
description:
'label for reverse element in motor direction menu for LEGO Boost extension'
}),
value: BoostMotorDirection.REVERSE
}
]
},
TILT_DIRECTION: {
acceptReporters: true,
items: [
{
text: formatMessage({
id: 'boost.tiltDirection.up',
default: 'up',
description: 'label for up element in tilt direction menu for LEGO Boost extension'
}),
value: BoostTiltDirection.UP
},
{
text: formatMessage({
id: 'boost.tiltDirection.down',
default: 'down',
description: 'label for down element in tilt direction menu for LEGO Boost extension'
}),
value: BoostTiltDirection.DOWN
},
{
text: formatMessage({
id: 'boost.tiltDirection.left',
default: 'left',
description: 'label for left element in tilt direction menu for LEGO Boost extension'
}),
value: BoostTiltDirection.LEFT
},
{
text: formatMessage({
id: 'boost.tiltDirection.right',
default: 'right',
description: 'label for right element in tilt direction menu for LEGO Boost extension'
}),
value: BoostTiltDirection.RIGHT
}
]
},
TILT_DIRECTION_ANY: {
acceptReporters: true,
items: [
{
text: formatMessage({
id: 'boost.tiltDirection.up',
default: 'up'
}),
value: BoostTiltDirection.UP
},
{
text: formatMessage({
id: 'boost.tiltDirection.down',
default: 'down'
}),
value: BoostTiltDirection.DOWN
},
{
text: formatMessage({
id: 'boost.tiltDirection.left',
default: 'left'
}),
value: BoostTiltDirection.LEFT
},
{
text: formatMessage({
id: 'boost.tiltDirection.right',
default: 'right'
}),
value: BoostTiltDirection.RIGHT
},
{
text: formatMessage({
id: 'boost.tiltDirection.any',
default: 'any',
description: 'label for any element in tilt direction menu for LEGO Boost extension'
}),
value: BoostTiltDirection.ANY
}
]
},
COLOR: {
acceptReporters: true,
items: [
{
text: formatMessage({
id: 'boost.color.red',
default: 'red',
description: 'the color red'
}),
value: BoostColor.RED
},
{
text: formatMessage({
id: 'boost.color.blue',
default: 'blue',
description: 'the color blue'
}),
value: BoostColor.BLUE
},
{
text: formatMessage({
id: 'boost.color.green',
default: 'green',
description: 'the color green'
}),
value: BoostColor.GREEN
},
{
text: formatMessage({
id: 'boost.color.yellow',
default: 'yellow',
description: 'the color yellow'
}),
value: BoostColor.YELLOW
},
{
text: formatMessage({
id: 'boost.color.white',
default: 'white',
desription: 'the color white'
}),
value: BoostColor.WHITE
},
{
text: formatMessage({
id: 'boost.color.black',
default: 'black',
description: 'the color black'
}),
value: BoostColor.BLACK
},
{
text: formatMessage({
id: 'boost.color.any',
default: 'any color',
description: 'any color'
}),
value: BoostColor.ANY
}
]
}
}
};
}

View file

@ -1112,8 +1112,14 @@ class Scratch3Ev3Blocks {
}
],
menus: {
motorPorts: this._formatMenu(Ev3MotorMenu),
sensorPorts: this._formatMenu(Ev3SensorMenu)
motorPorts: {
acceptReporters: true,
items: this._formatMenu(Ev3MotorMenu)
},
sensorPorts: {
acceptReporters: true,
items: this._formatMenu(Ev3SensorMenu)
}
}
};
}

View file

@ -757,11 +757,26 @@ class Scratch3GdxForBlocks {
}
],
menus: {
pushPullOptions: this.PUSH_PULL_MENU,
gestureOptions: this.GESTURE_MENU,
axisOptions: this.AXIS_MENU,
tiltOptions: this.TILT_MENU,
tiltAnyOptions: this.TILT_MENU_ANY
pushPullOptions: {
acceptReporters: true,
items: this.PUSH_PULL_MENU
},
gestureOptions: {
acceptReporters: true,
items: this.GESTURE_MENU
},
axisOptions: {
acceptReporters: true,
items: this.AXIS_MENU
},
tiltOptions: {
acceptReporters: true,
items: this.TILT_MENU
},
tiltAnyOptions: {
acceptReporters: true,
items: this.TILT_MENU_ANY
}
}
};
}

View file

@ -207,55 +207,61 @@ class Scratch3MakeyMakeyBlocks {
}
],
menus: {
KEY: [
{
text: formatMessage({
id: 'makeymakey.spaceKey',
default: 'space',
description: 'The space key on a computer keyboard.'
}),
value: KEY_ID_SPACE
},
{
text: formatMessage({
id: 'makeymakey.upArrow',
default: 'up arrow',
description: 'The up arrow key on a computer keyboard.'
}),
value: KEY_ID_UP
},
{
text: formatMessage({
id: 'makeymakey.downArrow',
default: 'down arrow',
description: 'The down arrow key on a computer keyboard.'
}),
value: KEY_ID_DOWN
},
{
text: formatMessage({
id: 'makeymakey.rightArrow',
default: 'right arrow',
description: 'The right arrow key on a computer keyboard.'
}),
value: KEY_ID_RIGHT
},
{
text: formatMessage({
id: 'makeymakey.leftArrow',
default: 'left arrow',
description: 'The left arrow key on a computer keyboard.'
}),
value: KEY_ID_LEFT
},
{text: 'w', value: 'w'},
{text: 'a', value: 'a'},
{text: 's', value: 's'},
{text: 'd', value: 'd'},
{text: 'f', value: 'f'},
{text: 'g', value: 'g'}
],
SEQUENCE: this.buildSequenceMenu(this.DEFAULT_SEQUENCES)
KEY: {
acceptReporters: true,
items: [
{
text: formatMessage({
id: 'makeymakey.spaceKey',
default: 'space',
description: 'The space key on a computer keyboard.'
}),
value: KEY_ID_SPACE
},
{
text: formatMessage({
id: 'makeymakey.upArrow',
default: 'up arrow',
description: 'The up arrow key on a computer keyboard.'
}),
value: KEY_ID_UP
},
{
text: formatMessage({
id: 'makeymakey.downArrow',
default: 'down arrow',
description: 'The down arrow key on a computer keyboard.'
}),
value: KEY_ID_DOWN
},
{
text: formatMessage({
id: 'makeymakey.rightArrow',
default: 'right arrow',
description: 'The right arrow key on a computer keyboard.'
}),
value: KEY_ID_RIGHT
},
{
text: formatMessage({
id: 'makeymakey.leftArrow',
default: 'left arrow',
description: 'The left arrow key on a computer keyboard.'
}),
value: KEY_ID_LEFT
},
{text: 'w', value: 'w'},
{text: 'a', value: 'a'},
{text: 's', value: 's'},
{text: 'd', value: 'd'},
{text: 'f', value: 'f'},
{text: 'g', value: 'g'}
]
},
SEQUENCE: {
acceptReporters: true,
items: this.buildSequenceMenu(this.DEFAULT_SEQUENCES)
}
}
};
}

View file

@ -746,12 +746,30 @@ class Scratch3MicroBitBlocks {
}
],
menus: {
buttons: this.BUTTONS_MENU,
gestures: this.GESTURES_MENU,
pinState: this.PIN_STATE_MENU,
tiltDirection: this.TILT_DIRECTION_MENU,
tiltDirectionAny: this.TILT_DIRECTION_ANY_MENU,
touchPins: ['0', '1', '2']
buttons: {
acceptReporters: true,
items: this.BUTTONS_MENU
},
gestures: {
acceptReporters: true,
items: this.GESTURES_MENU
},
pinState: {
acceptReporters: true,
items: this.PIN_STATE_MENU
},
tiltDirection: {
acceptReporters: true,
items: this.TILT_DIRECTION_MENU
},
tiltDirectionAny: {
acceptReporters: true,
items: this.TILT_DIRECTION_ANY_MENU
},
touchPins: {
acceptReporters: true,
items: ['0', '1', '2']
}
}
};
}

View file

@ -911,8 +911,14 @@ class Scratch3MusicBlocks {
}
],
menus: {
DRUM: this._buildMenu(this.DRUM_INFO),
INSTRUMENT: this._buildMenu(this.INSTRUMENT_INFO)
DRUM: {
acceptReporters: true,
items: this._buildMenu(this.DRUM_INFO)
},
INSTRUMENT: {
acceptReporters: true,
items: this._buildMenu(this.INSTRUMENT_INFO)
}
}
};
}

View file

@ -477,7 +477,10 @@ class Scratch3PenBlocks {
}
],
menus: {
colorParam: this._initColorParam()
colorParam: {
acceptReporters: true,
items: this._initColorParam()
}
}
};
}

View file

@ -462,8 +462,14 @@ class Scratch3Text2SpeechBlocks {
}
],
menus: {
voices: this.getVoiceMenu(),
languages: this.getLanguageMenu()
voices: {
acceptReporters: true,
items: this.getVoiceMenu()
},
languages: {
acceptReporters: true,
items: this.getLanguageMenu()
}
}
};
}

View file

@ -146,7 +146,10 @@ class Scratch3TranslateBlocks {
}
],
menus: {
languages: this._supportedLanguages
languages: {
acceptReporters: true,
items: this._supportedLanguages
}
}
};
}

View file

@ -488,9 +488,18 @@ class Scratch3VideoSensingBlocks {
}
],
menus: {
ATTRIBUTE: this._buildMenu(this.ATTRIBUTE_INFO),
SUBJECT: this._buildMenu(this.SUBJECT_INFO),
VIDEO_STATE: this._buildMenu(this.VIDEO_STATE_INFO)
ATTRIBUTE: {
acceptReporters: true,
items: this._buildMenu(this.ATTRIBUTE_INFO)
},
SUBJECT: {
acceptReporters: true,
items: this._buildMenu(this.SUBJECT_INFO)
},
VIDEO_STATE: {
acceptReporters: true,
items: this._buildMenu(this.VIDEO_STATE_INFO)
}
}
};
}

View file

@ -1134,139 +1134,157 @@ class Scratch3WeDo2Blocks {
}
],
menus: {
MOTOR_ID: [
{
text: formatMessage({
id: 'wedo2.motorId.default',
default: 'motor',
description: 'label for motor element in motor menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorLabel.DEFAULT
},
{
text: formatMessage({
id: 'wedo2.motorId.a',
default: 'motor A',
description: 'label for motor A element in motor menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorLabel.A
},
{
text: formatMessage({
id: 'wedo2.motorId.b',
default: 'motor B',
description: 'label for motor B element in motor menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorLabel.B
},
{
text: formatMessage({
id: 'wedo2.motorId.all',
default: 'all motors',
description: 'label for all motors element in motor menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorLabel.ALL
}
],
MOTOR_DIRECTION: [
{
text: formatMessage({
id: 'wedo2.motorDirection.forward',
default: 'this way',
description: 'label for forward element in motor direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorDirection.FORWARD
},
{
text: formatMessage({
id: 'wedo2.motorDirection.backward',
default: 'that way',
description: 'label for backward element in motor direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorDirection.BACKWARD
},
{
text: formatMessage({
id: 'wedo2.motorDirection.reverse',
default: 'reverse',
description: 'label for reverse element in motor direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorDirection.REVERSE
}
],
TILT_DIRECTION: [
{
text: formatMessage({
id: 'wedo2.tiltDirection.up',
default: 'up',
description: 'label for up element in tilt direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2TiltDirection.UP
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.down',
default: 'down',
description: 'label for down element in tilt direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2TiltDirection.DOWN
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.left',
default: 'left',
description: 'label for left element in tilt direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2TiltDirection.LEFT
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.right',
default: 'right',
description: 'label for right element in tilt direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2TiltDirection.RIGHT
}
],
TILT_DIRECTION_ANY: [
{
text: formatMessage({
id: 'wedo2.tiltDirection.up',
default: 'up'
}),
value: WeDo2TiltDirection.UP
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.down',
default: 'down'
}),
value: WeDo2TiltDirection.DOWN
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.left',
default: 'left'
}),
value: WeDo2TiltDirection.LEFT
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.right',
default: 'right'
}),
value: WeDo2TiltDirection.RIGHT
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.any',
default: 'any',
description: 'label for any element in tilt direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2TiltDirection.ANY
}
],
OP: ['<', '>']
MOTOR_ID: {
acceptReporters: true,
items: [
{
text: formatMessage({
id: 'wedo2.motorId.default',
default: 'motor',
description: 'label for motor element in motor menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorLabel.DEFAULT
},
{
text: formatMessage({
id: 'wedo2.motorId.a',
default: 'motor A',
description: 'label for motor A element in motor menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorLabel.A
},
{
text: formatMessage({
id: 'wedo2.motorId.b',
default: 'motor B',
description: 'label for motor B element in motor menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorLabel.B
},
{
text: formatMessage({
id: 'wedo2.motorId.all',
default: 'all motors',
description: 'label for all motors element in motor menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorLabel.ALL
}
]
},
MOTOR_DIRECTION: {
acceptReporters: true,
items: [
{
text: formatMessage({
id: 'wedo2.motorDirection.forward',
default: 'this way',
description:
'label for forward element in motor direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorDirection.FORWARD
},
{
text: formatMessage({
id: 'wedo2.motorDirection.backward',
default: 'that way',
description:
'label for backward element in motor direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorDirection.BACKWARD
},
{
text: formatMessage({
id: 'wedo2.motorDirection.reverse',
default: 'reverse',
description:
'label for reverse element in motor direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2MotorDirection.REVERSE
}
]
},
TILT_DIRECTION: {
acceptReporters: true,
items: [
{
text: formatMessage({
id: 'wedo2.tiltDirection.up',
default: 'up',
description: 'label for up element in tilt direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2TiltDirection.UP
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.down',
default: 'down',
description: 'label for down element in tilt direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2TiltDirection.DOWN
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.left',
default: 'left',
description: 'label for left element in tilt direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2TiltDirection.LEFT
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.right',
default: 'right',
description: 'label for right element in tilt direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2TiltDirection.RIGHT
}
]
},
TILT_DIRECTION_ANY: {
acceptReporters: true,
items: [
{
text: formatMessage({
id: 'wedo2.tiltDirection.up',
default: 'up'
}),
value: WeDo2TiltDirection.UP
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.down',
default: 'down'
}),
value: WeDo2TiltDirection.DOWN
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.left',
default: 'left'
}),
value: WeDo2TiltDirection.LEFT
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.right',
default: 'right'
}),
value: WeDo2TiltDirection.RIGHT
},
{
text: formatMessage({
id: 'wedo2.tiltDirection.any',
default: 'any',
description: 'label for any element in tilt direction menu for LEGO WeDo 2 extension'
}),
value: WeDo2TiltDirection.ANY
}
]
},
OP: {
acceptReporters: true,
items: ['<', '>']
}
}
};
}