From c4d3d7634ee84d4173efb88f1cb025b5959b59de Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 24 Oct 2017 15:35:42 -0700 Subject: [PATCH] fixed naming of sonar --- libs/core/_locales/core-strings.json | 12 ++++++------ libs/core/ultrasonic.ts | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libs/core/_locales/core-strings.json b/libs/core/_locales/core-strings.json index 67abf2d5..8ea78730 100644 --- a/libs/core/_locales/core-strings.json +++ b/libs/core/_locales/core-strings.json @@ -25,7 +25,7 @@ "input.GyroSensor.rate|block": "%color|rotation rate", "input.IrSensor.distance|block": "%infrared|distance", "input.IrSensor.remoteCommand|block": "%infrared|remote command", - "input.UltraSonicSensor.distance|block": "%sonar|distance", + "input.UltraSonicSensor.distance|block": "%sensor|distance", "input.buttonDown|block": "button down", "input.buttonEnter|block": "button enter", "input.buttonLeft|block": "button left", @@ -48,10 +48,10 @@ "input.touchSensor2|block": "touch sensor 2", "input.touchSensor3|block": "touch sensor 3", "input.touchSensor4|block": "touch sensor 4", - "input.ultrasonic1|block": "ultrasonic 1", - "input.ultrasonic2|block": "ultrasonic 1", - "input.ultrasonic3|block": "ultrasonic 1", - "input.ultrasonic4|block": "ultrasonic 1", + "input.ultrasonic1|block": "ultrasonic sensor 1", + "input.ultrasonic2|block": "ultrasonic sensor 1", + "input.ultrasonic3|block": "ultrasonic sensor 1", + "input.ultrasonic4|block": "ultrasonic sensor 1", "input|block": "input", "output.getCurrentSpeed|block": "motor %out|speed", "output.pattern|block": "%pattern", @@ -77,5 +77,5 @@ "{id:group}Lights": "Lights", "{id:group}Motors": "Motors", "{id:group}Screen": "Screen", - "{id:group}Sonar": "Sonar" + "{id:group}Ultrasonic sensor": "Ultrasonic sensor" } \ No newline at end of file diff --git a/libs/core/ultrasonic.ts b/libs/core/ultrasonic.ts index 14e3166e..73260015 100644 --- a/libs/core/ultrasonic.ts +++ b/libs/core/ultrasonic.ts @@ -12,15 +12,15 @@ namespace input { /** * Gets the distance from the sonar in millimeters - * @param sonar the ultrasonic sensor + * @param sensor the ultrasonic sensor port */ //% help=input/ultrasonic/distance - //% block="%sonar|distance" + //% block="%sensor|distance" //% blockId=sonarGetDistance //% parts="ultrasonic" //% blockNamespace=input //% weight=65 blockGap=8 - //% group="Sonar" + //% group="Ultrasonic sensor" distance() { // it supposedly also has an inch mode, but we stick to mm this._setMode(0) @@ -28,15 +28,15 @@ namespace input { } } - //% fixedInstance whenUsed block="ultrasonic 1" + //% fixedInstance whenUsed block="ultrasonic sensor 1" export const ultrasonic1: UltraSonicSensor = new UltraSonicSensor(1) - //% fixedInstance whenUsed block="ultrasonic 1" + //% fixedInstance whenUsed block="ultrasonic sensor 1" export const ultrasonic2: UltraSonicSensor = new UltraSonicSensor(2) - //% fixedInstance whenUsed block="ultrasonic 1" + //% fixedInstance whenUsed block="ultrasonic sensor 1" export const ultrasonic3: UltraSonicSensor = new UltraSonicSensor(3) - //% fixedInstance whenUsed block="ultrasonic 1" + //% fixedInstance whenUsed block="ultrasonic sensor 1" export const ultrasonic4: UltraSonicSensor = new UltraSonicSensor(4) }