pxt-ev3/libs/core/ns.ts

25 lines
770 B
TypeScript
Raw Normal View History

2017-10-28 18:13:02 +02:00
2018-01-06 23:25:50 +01:00
namespace motors {
/**
* A speed picker
2018-01-06 23:40:09 +01:00
* @param speed the speed, eg: 50
2018-01-06 23:25:50 +01:00
*/
//% blockId=motorSpeedPicker block="%speed" shim=TD_ID
//% speed.fieldEditor="speed" colorSecondary="#FFFFFF"
2018-01-07 02:16:08 +01:00
//% weight=0 blockHidden=1 speed.fieldOptions.decompileLiterals=1
2018-01-06 23:25:50 +01:00
export function __speedPicker(speed: number): number {
return speed;
}
/**
* A turn ratio picker
* @param turnratio the turn ratio, eg: 0
*/
//% blockId=motorTurnRatioPicker block="%turnratio" shim=TD_ID
//% turnratio.fieldEditor="turnratio" colorSecondary="#FFFFFF"
//% weight=0 blockHidden=1 turnRatio.fieldOptions.decompileLiterals=1
export function __turnRatioPicker(turnratio: number): number {
return turnratio;
}
2018-01-06 23:25:50 +01:00
}