more renaming

This commit is contained in:
Peli de Halleux 2017-10-24 15:37:48 -07:00
parent c4d3d7634e
commit e6ef86101f
2 changed files with 17 additions and 17 deletions

View File

@ -21,8 +21,8 @@
"input.ColorSensor.ambientLight|block": "%color| ambient light",
"input.ColorSensor.color|block": "%color| color",
"input.ColorSensor.reflectedLight|block": "%color| reflected light",
"input.GyroSensor.angle|block": "%color|angle",
"input.GyroSensor.rate|block": "%color|rotation rate",
"input.GyroSensor.angle|block": "%sensor|angle",
"input.GyroSensor.rate|block": "%sensor|rotation rate",
"input.IrSensor.distance|block": "%infrared|distance",
"input.IrSensor.remoteCommand|block": "%infrared|remote command",
"input.UltraSonicSensor.distance|block": "%sensor|distance",
@ -35,10 +35,10 @@
"input.color2|block": "color sensor 2",
"input.color3|block": "color sensor 3",
"input.color4|block": "color sensor 4",
"input.gyro1|block": "gyroscope 1",
"input.gyro2|block": "gyroscope 2",
"input.gyro3|block": "gyroscope 3",
"input.gyro4|block": "gyroscope 4",
"input.gyro1|block": "gyro sensor 1",
"input.gyro2|block": "gyro sensor 2",
"input.gyro3|block": "gyro sensor 3",
"input.gyro4|block": "gyro sensor 4",
"input.remoteBottomLeft|block": "remote bottom-left",
"input.remoteBottomRight|block": "remote bottom-right",
"input.remoteCenter|block": "remote center",
@ -72,7 +72,7 @@
"{id:category}Serial": "Serial",
"{id:group}Buttons": "Buttons",
"{id:group}Color Sensor": "Color Sensor",
"{id:group}Gyroscope": "Gyroscope",
"{id:group}Gyro sensor": "Gyro sensor",
"{id:group}Infrared sensor": "Infrared sensor",
"{id:group}Lights": "Lights",
"{id:group}Motors": "Motors",

View File

@ -21,15 +21,15 @@ namespace input {
/**
* 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
//% block="%color|angle"
//% block="%sensor|angle"
//% blockId=gyroGetAngle
//% parts="gyroscope"
//% blockNamespace=input
//% weight=65 blockGap=8
//% group="Gyroscope"
//% group="Gyro sensor"
angle() {
this.setMode(GyroSensorMode.Angle)
return this.getNumber(NumberFormat.Int16LE, 0)
@ -37,30 +37,30 @@ namespace input {
/**
* 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
//% block="%color|rotation rate"
//% block="%sensor|rotation rate"
//% blockId=gyroGetRate
//% parts="gyroscope"
//% blockNamespace=input
//% weight=65 blockGap=8
//% group="Gyroscope"
//% group="Gyro sensor"
rate() {
this.setMode(GyroSensorMode.Rate)
return this.getNumber(NumberFormat.Int16LE, 0)
}
}
//% fixedInstance whenUsed block="gyroscope 1"
//% fixedInstance whenUsed block="gyro sensor 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)
//% fixedInstance whenUsed block="gyroscope 3"
//% fixedInstance whenUsed block="gyro sensor 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)
}