Compare commits

..

6 Commits

8 changed files with 20 additions and 19 deletions

View File

@ -151,6 +151,6 @@
"serial.writeNumber": "Write a number to the serial port.",
"serial.writeString": "Write some text to the serial port.",
"serial.writeValue": "Write a name:value pair as a line of text to the serial port.",
"serial.writeValue|param|name": "name of the value stream, eg: x",
"serial.writeValue|param|name": "name of the value stream, eg: \"x\"",
"serial.writeValue|param|value": "to write"
}

View File

@ -30,7 +30,7 @@
"control.waitMicros|block": "wait (µs)%micros",
"control|block": "control",
"loops.forever|block": "forever",
"loops.pause|block": "pause %ms=timePicker|ms",
"loops.pause|block": "pause %pause=timePicker|ms",
"loops.timePicker|block": "%ms",
"loops|block": "loops",
"parseInt|block": "parse to integer %text",

10
libs/base/shims.d.ts vendored
View File

@ -79,7 +79,7 @@ declare namespace loops {
* @param ms how long to pause for, eg: 100, 200, 500, 1000, 2000
*/
//% help=loops/pause weight=99
//% async block="pause %ms=timePicker|ms"
//% async block="pause %pause=timePicker|ms"
//% blockId=device_pause shim=loops::pause
function pause(ms: int32): void;
}
@ -99,8 +99,8 @@ declare namespace control {
*/
//% weight=20 blockGap=8 blockId="control_on_event" block="on event|from %src|with value %value"
//% blockExternalInputs=1
//% help="control/on-event" shim=control::onEvent
function onEvent(src: int32, value: int32, handler: () => void): void;
//% help="control/on-event" flags.defl=16 shim=control::onEvent
function onEvent(src: int32, value: int32, handler: () => void, flags?: int32): void;
/**
* Reset the device.
@ -144,14 +144,14 @@ declare namespace serial {
* Write some text to the serial port.
*/
//% help=serial/write-string
//% weight=87
//% weight=87 blockHidden=true
//% blockId=serial_writestring block="serial|write string %text" shim=serial::writeString
function writeString(text: string): void;
/**
* Send a buffer across the serial connection.
*/
//% help=serial/write-buffer weight=6
//% help=serial/write-buffer weight=6 blockHidden=true
//% blockId=serial_writebuffer block="serial|write buffer %buffer" shim=serial::writeBuffer
function writeBuffer(buffer: Buffer): void;
}

View File

@ -210,7 +210,7 @@ namespace sensors {
*/
//% help=input/ultrasonic/wait
//% block="wait %sensor|for %event"
//% blockId=ultrasonicWait
//% blockId=infraredwait
//% parts="infraredsensor"
//% blockNamespace=sensors
//% weight=99 blockGap=8

View File

@ -352,7 +352,8 @@ void raiseEvent(int id, int event) {
pthread_mutex_unlock(&eventMutex);
}
void registerWithDal(int id, int event, Action a) {
void registerWithDal(int id, int event, Action a, int flags) {
// TODO support flags
setBinding(id, event, a);
}

View File

@ -4,6 +4,6 @@ namespace brick {
}
//% color="#B4009E" weight=98 icon="\uf192"
//% groups='["Touch Sensor", "Color Sensor", "Ultrasonic Sensor", "Infrared Sensor", "Remote Infrared Beacon", "Gyro Sensor"]'
//% groups='["Ultrasonic Sensor", "Touch Sensor", "Color Sensor", "Infrared Sensor", "Remote Infrared Beacon", "Gyro Sensor"]'
namespace sensors {
}

View File

@ -1,6 +1,6 @@
{
"name": "pxt-ev3",
"version": "0.0.28",
"version": "0.0.29",
"description": "LEGO Mindstorms EV3 for Microsoft MakeCode",
"private": true,
"keywords": [
@ -39,8 +39,8 @@
"semantic-ui-less": "^2.2.4"
},
"dependencies": {
"pxt-common-packages": "0.12.4",
"pxt-core": "2.3.6"
"pxt-common-packages": "0.12.17",
"pxt-core": "2.3.19"
},
"scripts": {
"test": "node node_modules/pxt-core/built/pxt.js travis"

View File

@ -43,10 +43,10 @@
}
/* Menu bar colors */
#menubar .ui.item {
.menubar .ui.item {
color: #373737;
}
.fullscreensim #menubar .ui.menu {
.fullscreensim .menubar .ui.menu {
box-shadow: none !important;
border-bottom: 0 !important;
}
@ -57,17 +57,17 @@
}
/* Editor menu toggle */
#menubar .ui.menu.fixed .item.editor-menuitem .ui.grid {
.menubar .ui.menu.fixed .item.editor-menuitem .ui.grid {
background: @blue !important;
border-radius: 0px !important;
}
#menubar .ui.menu.fixed .ui.item.editor-menuitem .item:not(.active) {
.menubar .ui.menu.fixed .ui.item.editor-menuitem .item:not(.active) {
color: white;
}
#menubar .ui.menu.fixed .ui.item.editor-menuitem .item {
.menubar .ui.menu.fixed .ui.item.editor-menuitem .item {
border-radius: 0px !important;
}
#menubar .ui.menu.fixed .ui.item.editor-menuitem .item.active {
.menubar .ui.menu.fixed .ui.item.editor-menuitem .item.active {
color: @blue;
}