tweaks of blocks

This commit is contained in:
Peli de Halleux 2017-12-14 13:07:10 -08:00
parent 11a88a9d94
commit 81fcbb6916
2 changed files with 7 additions and 5 deletions

View File

@ -57,7 +57,7 @@
"motors.mediumMotorB|block": "medium B",
"motors.mediumMotorC|block": "medium C",
"motors.mediumMotorD|block": "medium D",
"motors.stopAllMotors|block": "stop all `icons.motorLarge`",
"motors.stopAllMotors|block": "stop all motors",
"motors|block": "motors",
"output|block": "output",
"screen|block": "screen",

View File

@ -78,8 +78,8 @@ namespace motors {
/**
* Stops all motors
*/
//% blockId=motorStopAll block="stop all `icons.motorLarge`"
//% weight=10 blockGap=8
//% blockId=motorStopAll block="stop all motors"
//% weight=19
export function stopAllMotors() {
const b = mkCmd(Output.ALL, DAL.opOutputStop, 0)
writePWM(b)
@ -272,6 +272,7 @@ namespace motors {
/**
* Clears the motor count
*/
//%
clearCount() {
this.__init();
const b = mkCmd(this._port, DAL.opOutputClearCount, 0)
@ -287,7 +288,7 @@ namespace motors {
* Resets the motor and clears any synchronization
*/
//% blockId=motorReset block="reset `icons.motorLarge` %motor"
//% weight=1
//% weight=20
reset() {
this.__init();
reset(this._port);
@ -317,6 +318,7 @@ namespace motors {
//% blockId=motorTurn block="turn `icons.motorLarge` %motor|by %value|%unit|at %speed|% turn %turnRadio"
//% weight=9 blockGap=8
//% turnRatio.min=-200 turnRatio=200
//% inlineInputMode=inline
turn(value: number, unit: MoveUnit, speed: number, turnRatio: number) {
this.output(value, unit, speed, turnRatio);
}