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;
|
|
|
|
}
|
2018-01-10 07:05:26 +01: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-21 00:18:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//% icon="\uf112"
|
|
|
|
namespace console {
|
|
|
|
|
2018-01-06 23:25:50 +01:00
|
|
|
}
|