Actually finish SB2 specMap for WeDo 2.0

Apparently I took a break at the wrong time and forgot to come back to
this... :/
This commit is contained in:
Christopher Willis-Ford 2017-11-03 13:48:05 -07:00
parent 51dcfb954d
commit 0ad03f8d70

View file

@ -1424,7 +1424,7 @@ addExtensionOp(weDo2, 'motorOnFor', {
argMap: [ argMap: [
{ {
type: 'input', type: 'input',
inputOp: 'text', inputOp: 'wedo2.menu.motorID',
inputName: 'MOTOR_ID' inputName: 'MOTOR_ID'
}, },
{ {
@ -1440,7 +1440,7 @@ addExtensionOp(weDo2, 'motorOn', {
argMap: [ argMap: [
{ {
type: 'input', type: 'input',
inputOp: 'text', inputOp: 'wedo2.menu.motorID',
inputName: 'MOTOR_ID' inputName: 'MOTOR_ID'
} }
] ]
@ -1451,7 +1451,7 @@ addExtensionOp(weDo2, 'motorOff', {
argMap: [ argMap: [
{ {
type: 'input', type: 'input',
inputOp: 'text', inputOp: 'wedo2.menu.motorID',
inputName: 'MOTOR_ID' inputName: 'MOTOR_ID'
} }
] ]
@ -1462,7 +1462,7 @@ addExtensionOp(weDo2, 'startMotorPower', {
argMap: [ argMap: [
{ {
type: 'input', type: 'input',
inputOp: 'text', inputOp: 'wedo2.menu.motorID',
inputName: 'MOTOR_ID' inputName: 'MOTOR_ID'
}, },
{ {
@ -1478,12 +1478,12 @@ addExtensionOp(weDo2, 'setMotorDirection', {
argMap: [ argMap: [
{ {
type: 'input', type: 'input',
inputOp: 'text', inputOp: 'wedo2.menu.motorID',
inputName: 'MOTOR_ID' inputName: 'MOTOR_ID'
}, },
{ {
type: 'input', type: 'input',
inputOp: 'text', inputOp: 'wedo2.menu.motorDirection',
inputName: 'DIRECTION' inputName: 'DIRECTION'
} }
] ]
@ -1521,7 +1521,7 @@ addExtensionOp(weDo2, 'whenDistance', {
argMap: [ argMap: [
{ {
type: 'input', type: 'input',
inputOp: 'text', inputOp: 'wedo2.menu.lessMore',
inputName: 'OP' inputName: 'OP'
}, },
{ {
@ -1537,33 +1537,34 @@ addExtensionOp(weDo2, 'whenTilted', {
argMap: [ argMap: [
{ {
type: 'input', type: 'input',
inputOp: 'text', inputOp: 'wedo2.menu.tiltDirectionAny',
inputName: 'DIRECTION' inputName: 'DIRECTION'
} }
] ]
}); });
addExtensionOp(weDo2, 'getDistance', { addExtensionOp(weDo2, 'getDistance', {
opcode: 'wedo2.motorOn' opcode: 'wedo2.getDistance',
argMap: []
}); });
addExtensionOp(weDo2, 'isTilted', { addExtensionOp(weDo2, 'isTilted', {
opcode: 'wedo2.motorOn', opcode: 'wedo2.isTilted',
argMap: [ argMap: [
{ {
type: 'input', type: 'input',
inputOp: 'text', inputOp: 'wedo2.menu.tiltDirectionAny',
inputName: 'DIRECTION' inputName: 'DIRECTION'
} }
] ]
}); });
addExtensionOp(weDo2, 'getTilt', { addExtensionOp(weDo2, 'getTilt', {
opcode: 'getTiltAngle', opcode: 'wedo2.getTiltAngle',
argMap: [ argMap: [
{ {
type: 'input', type: 'input',
inputOp: 'text', inputOp: 'wedo2.menu.tiltDirection',
inputName: 'DIRECTION' inputName: 'DIRECTION'
} }
] ]