improving the spacing & block names (#298)
This commit is contained in:
parent
f594cdefac
commit
9bf50665fc
@ -115,7 +115,7 @@ namespace sensors {
|
||||
//% parts="colorsensor"
|
||||
//% blockNamespace=sensors
|
||||
//% sensor.fieldEditor="ports"
|
||||
//% weight=100 blockGap=8
|
||||
//% weight=100 blockGap=12
|
||||
//% group="Color Sensor"
|
||||
onColorDetected(color: ColorSensorColor, handler: () => void) {
|
||||
this.setMode(ColorSensorMode.Color)
|
||||
@ -174,7 +174,7 @@ namespace sensors {
|
||||
//% parts="colorsensor"
|
||||
//% blockNamespace=sensors
|
||||
//% sensor.fieldEditor="ports"
|
||||
//% weight=89 blockGap=8
|
||||
//% weight=89 blockGap=12
|
||||
//% group="Color Sensor"
|
||||
onLightChanged(mode: LightIntensityMode, condition: LightCondition, handler: () => void) {
|
||||
this.setMode(<ColorSensorMode><number>mode)
|
||||
|
@ -116,7 +116,7 @@ namespace brick {
|
||||
//% blockId=buttonEvent block="on %button|%event"
|
||||
//% parts="brick"
|
||||
//% blockNamespace=brick
|
||||
//% weight=99 blockGap=8
|
||||
//% weight=99 blockGap=16
|
||||
//% group="Buttons"
|
||||
//% button.fieldEditor="brickbuttons"
|
||||
onEvent(ev: ButtonEvent, body: () => void) {
|
||||
|
@ -187,7 +187,7 @@ namespace motors {
|
||||
*/
|
||||
//% weight=6 blockGap=8
|
||||
//% group="Move"
|
||||
//% blockId=motorStop block="%motors|stop"
|
||||
//% blockId=motorStop block="stop %motors|"
|
||||
stop() {
|
||||
this.init();
|
||||
stop(this._port, this._brake);
|
||||
@ -206,7 +206,7 @@ namespace motors {
|
||||
*/
|
||||
//% weight=5
|
||||
//% group="Move"
|
||||
//% blockId=motorReset block="%motors|reset"
|
||||
//% blockId=motorReset block="reset %motors|"
|
||||
reset() {
|
||||
this.init();
|
||||
reset(this._port);
|
||||
@ -279,7 +279,7 @@ namespace motors {
|
||||
* Pauses the execution until the previous command finished.
|
||||
* @param timeOut optional maximum pausing time in milliseconds
|
||||
*/
|
||||
//% blockId=motorPauseUntilRead block="%motor|pause until ready"
|
||||
//% blockId=motorPauseUntilRead block="pause until %motor|ready"
|
||||
//% weight=90
|
||||
//% group="Move"
|
||||
pauseUntilReady(timeOut?: number) {
|
||||
@ -385,7 +385,7 @@ namespace motors {
|
||||
/**
|
||||
* Clears the motor count
|
||||
*/
|
||||
//% blockId=motorClearCount block="%motor|clear counts"
|
||||
//% blockId=motorClearCount block="clear %motor|counters"
|
||||
//% weight=68
|
||||
//% blockGap=8
|
||||
//% group="Counters"
|
||||
|
@ -1,20 +1,20 @@
|
||||
|
||||
//% color="#68C3E2" weight=100 icon="\uf106"
|
||||
//% groups='["Buttons", "Screen"]'
|
||||
//% labelLineWidth=0
|
||||
//% labelLineWidth=60
|
||||
namespace brick {
|
||||
}
|
||||
|
||||
|
||||
//% color="#C8509B" weight=95 icon="\uf10f"
|
||||
//% labelLineWidth=0
|
||||
//% labelLineWidth=100
|
||||
//% groups='["Touch Sensor", "Color Sensor", "Ultrasonic Sensor", "Gyro Sensor", "Infrared Sensor", "Remote Infrared Beacon", "Threshold"]'
|
||||
namespace sensors {
|
||||
}
|
||||
|
||||
//% color="#A5CA18" weight=90 icon="\uf10d"
|
||||
//% groups='["Move", "Counters"]'
|
||||
//% labelLineWidth=0
|
||||
//% labelLineWidth=50
|
||||
namespace motors {
|
||||
}
|
||||
|
||||
|
@ -82,12 +82,12 @@ namespace sensors {
|
||||
* Forces a calibration of the gyro. Must be called when the sensor is completely still.
|
||||
*/
|
||||
//% help=input/gyro/calibrate
|
||||
//% block="%sensor|reset"
|
||||
//% block="reset %sensor|"
|
||||
//% blockId=gyroReset
|
||||
//% parts="gyroscope"
|
||||
//% blockNamespace=sensors
|
||||
//% sensor.fieldEditor="ports"
|
||||
//% weight=50 blockGap=8
|
||||
//% weight=50
|
||||
//% group="Gyro Sensor"
|
||||
reset(): void {
|
||||
if (this.calibrating) return; // already in calibration mode
|
||||
|
@ -34,7 +34,7 @@ namespace sensors {
|
||||
//% parts="touch"
|
||||
//% blockNamespace=sensors
|
||||
//% sensor.fieldEditor="ports"
|
||||
//% weight=99 blockGap=8
|
||||
//% weight=99 blockGap=12
|
||||
//% group="Touch Sensor"
|
||||
onEvent(ev: ButtonEvent, body: () => void) {
|
||||
this.button.onEvent(ev, body)
|
||||
@ -50,7 +50,7 @@ namespace sensors {
|
||||
//% parts="touch"
|
||||
//% blockNamespace=sensors
|
||||
//% sensor.fieldEditor="ports"
|
||||
//% weight=98 blockGap=8
|
||||
//% weight=98 blockGap=12
|
||||
//% group="Touch Sensor"
|
||||
pauseUntil(ev: ButtonEvent) {
|
||||
this.button.pauseUntil(<ButtonEvent><number>ev);
|
||||
@ -66,7 +66,7 @@ namespace sensors {
|
||||
//% parts="touch"
|
||||
//% blockNamespace=sensors
|
||||
//% sensor.fieldEditor="ports"
|
||||
//% weight=81
|
||||
//% weight=81 blockGap=8
|
||||
//% group="Touch Sensor"
|
||||
isPressed() {
|
||||
return this.button.isPressed();
|
||||
@ -82,7 +82,7 @@ namespace sensors {
|
||||
//% parts="touch"
|
||||
//% blockNamespace=sensors
|
||||
//% sensor.fieldEditor="ports"
|
||||
//% weight=81 blockGap=8
|
||||
//% weight=81
|
||||
//% group="Touch Sensor"
|
||||
wasPressed() {
|
||||
return this.button.wasPressed();
|
||||
|
Loading…
Reference in New Issue
Block a user