more renaming
This commit is contained in:
parent
c4d3d7634e
commit
e6ef86101f
@ -21,8 +21,8 @@
|
|||||||
"input.ColorSensor.ambientLight|block": "%color| ambient light",
|
"input.ColorSensor.ambientLight|block": "%color| ambient light",
|
||||||
"input.ColorSensor.color|block": "%color| color",
|
"input.ColorSensor.color|block": "%color| color",
|
||||||
"input.ColorSensor.reflectedLight|block": "%color| reflected light",
|
"input.ColorSensor.reflectedLight|block": "%color| reflected light",
|
||||||
"input.GyroSensor.angle|block": "%color|angle",
|
"input.GyroSensor.angle|block": "%sensor|angle",
|
||||||
"input.GyroSensor.rate|block": "%color|rotation rate",
|
"input.GyroSensor.rate|block": "%sensor|rotation rate",
|
||||||
"input.IrSensor.distance|block": "%infrared|distance",
|
"input.IrSensor.distance|block": "%infrared|distance",
|
||||||
"input.IrSensor.remoteCommand|block": "%infrared|remote command",
|
"input.IrSensor.remoteCommand|block": "%infrared|remote command",
|
||||||
"input.UltraSonicSensor.distance|block": "%sensor|distance",
|
"input.UltraSonicSensor.distance|block": "%sensor|distance",
|
||||||
@ -35,10 +35,10 @@
|
|||||||
"input.color2|block": "color sensor 2",
|
"input.color2|block": "color sensor 2",
|
||||||
"input.color3|block": "color sensor 3",
|
"input.color3|block": "color sensor 3",
|
||||||
"input.color4|block": "color sensor 4",
|
"input.color4|block": "color sensor 4",
|
||||||
"input.gyro1|block": "gyroscope 1",
|
"input.gyro1|block": "gyro sensor 1",
|
||||||
"input.gyro2|block": "gyroscope 2",
|
"input.gyro2|block": "gyro sensor 2",
|
||||||
"input.gyro3|block": "gyroscope 3",
|
"input.gyro3|block": "gyro sensor 3",
|
||||||
"input.gyro4|block": "gyroscope 4",
|
"input.gyro4|block": "gyro sensor 4",
|
||||||
"input.remoteBottomLeft|block": "remote bottom-left",
|
"input.remoteBottomLeft|block": "remote bottom-left",
|
||||||
"input.remoteBottomRight|block": "remote bottom-right",
|
"input.remoteBottomRight|block": "remote bottom-right",
|
||||||
"input.remoteCenter|block": "remote center",
|
"input.remoteCenter|block": "remote center",
|
||||||
@ -72,7 +72,7 @@
|
|||||||
"{id:category}Serial": "Serial",
|
"{id:category}Serial": "Serial",
|
||||||
"{id:group}Buttons": "Buttons",
|
"{id:group}Buttons": "Buttons",
|
||||||
"{id:group}Color Sensor": "Color Sensor",
|
"{id:group}Color Sensor": "Color Sensor",
|
||||||
"{id:group}Gyroscope": "Gyroscope",
|
"{id:group}Gyro sensor": "Gyro sensor",
|
||||||
"{id:group}Infrared sensor": "Infrared sensor",
|
"{id:group}Infrared sensor": "Infrared sensor",
|
||||||
"{id:group}Lights": "Lights",
|
"{id:group}Lights": "Lights",
|
||||||
"{id:group}Motors": "Motors",
|
"{id:group}Motors": "Motors",
|
||||||
|
@ -21,15 +21,15 @@ namespace input {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current angle from the gyroscope.
|
* Get the current angle from the gyroscope.
|
||||||
* @param color the gyroscope to query the request
|
* @param sensor the gyroscope to query the request
|
||||||
*/
|
*/
|
||||||
//% help=input/gyro/angle
|
//% help=input/gyro/angle
|
||||||
//% block="%color|angle"
|
//% block="%sensor|angle"
|
||||||
//% blockId=gyroGetAngle
|
//% blockId=gyroGetAngle
|
||||||
//% parts="gyroscope"
|
//% parts="gyroscope"
|
||||||
//% blockNamespace=input
|
//% blockNamespace=input
|
||||||
//% weight=65 blockGap=8
|
//% weight=65 blockGap=8
|
||||||
//% group="Gyroscope"
|
//% group="Gyro sensor"
|
||||||
angle() {
|
angle() {
|
||||||
this.setMode(GyroSensorMode.Angle)
|
this.setMode(GyroSensorMode.Angle)
|
||||||
return this.getNumber(NumberFormat.Int16LE, 0)
|
return this.getNumber(NumberFormat.Int16LE, 0)
|
||||||
@ -37,30 +37,30 @@ namespace input {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current rotation rate from the gyroscope.
|
* Get the current rotation rate from the gyroscope.
|
||||||
* @param color the gyroscope to query the request
|
* @param sensor the gyroscope to query the request
|
||||||
*/
|
*/
|
||||||
//% help=input/gyro/rate
|
//% help=input/gyro/rate
|
||||||
//% block="%color|rotation rate"
|
//% block="%sensor|rotation rate"
|
||||||
//% blockId=gyroGetRate
|
//% blockId=gyroGetRate
|
||||||
//% parts="gyroscope"
|
//% parts="gyroscope"
|
||||||
//% blockNamespace=input
|
//% blockNamespace=input
|
||||||
//% weight=65 blockGap=8
|
//% weight=65 blockGap=8
|
||||||
//% group="Gyroscope"
|
//% group="Gyro sensor"
|
||||||
rate() {
|
rate() {
|
||||||
this.setMode(GyroSensorMode.Rate)
|
this.setMode(GyroSensorMode.Rate)
|
||||||
return this.getNumber(NumberFormat.Int16LE, 0)
|
return this.getNumber(NumberFormat.Int16LE, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//% fixedInstance whenUsed block="gyroscope 1"
|
//% fixedInstance whenUsed block="gyro sensor 1"
|
||||||
export const gyro1: GyroSensor = new GyroSensor(1)
|
export const gyro1: GyroSensor = new GyroSensor(1)
|
||||||
|
|
||||||
//% fixedInstance whenUsed block="gyroscope 2"
|
//% fixedInstance whenUsed block="gyro sensor 2"
|
||||||
export const gyro2: GyroSensor = new GyroSensor(2)
|
export const gyro2: GyroSensor = new GyroSensor(2)
|
||||||
|
|
||||||
//% fixedInstance whenUsed block="gyroscope 3"
|
//% fixedInstance whenUsed block="gyro sensor 3"
|
||||||
export const gyro3: GyroSensor = new GyroSensor(3)
|
export const gyro3: GyroSensor = new GyroSensor(3)
|
||||||
|
|
||||||
//% fixedInstance whenUsed block="gyroscope 4"
|
//% fixedInstance whenUsed block="gyro sensor 4"
|
||||||
export const gyro4: GyroSensor = new GyroSensor(4)
|
export const gyro4: GyroSensor = new GyroSensor(4)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user