2017-10-28 09:13:02 -07:00
|
|
|
|
2018-01-06 14:25:50 -08:00
|
|
|
namespace motors {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A speed picker
|
2018-01-06 14:40:09 -08:00
|
|
|
* @param speed the speed, eg: 50
|
2018-01-06 14:25:50 -08:00
|
|
|
*/
|
|
|
|
//% blockId=motorSpeedPicker block="%speed" shim=TD_ID
|
|
|
|
//% speed.fieldEditor="speed" colorSecondary="#FFFFFF"
|
2018-01-06 17:16:08 -08:00
|
|
|
//% weight=0 blockHidden=1 speed.fieldOptions.decompileLiterals=1
|
2018-01-06 14:25:50 -08:00
|
|
|
export function __speedPicker(speed: number): number {
|
|
|
|
return speed;
|
|
|
|
}
|
2018-01-09 22:05:26 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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-06-20 15:18:31 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
//% icon="\uf112"
|
|
|
|
namespace console {
|
|
|
|
|
2018-01-06 14:25:50 -08:00
|
|
|
}
|