Skip to content

Commit 0861d3e

Browse files
committed
experiment with library
1 parent b4a2d7e commit 0861d3e

31 files changed

Lines changed: 459 additions & 9 deletions

File tree

‎libs/audio-recording/_locales/audio-recording-strings.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"record.playAudio|block": "play audio clip $mode",
2323
"record.setMicGain|block": "set microphone sensitivity to $gain",
2424
"record.setSampleRate|block": "set sample rate to $hz || for $scope",
25+
"record.setSampleRate|param|hz|label": "sample rate",
2526
"record.startRecording|block": "record audio clip $mode",
2627
"record|block": "Record",
2728
"{id:category}Record": "Record"

‎libs/bluetooth/_locales/bluetooth-strings.json‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
{
22
"bluetooth.advertiseUid|block": "bluetooth advertise UID|namespace (bytes 6-9)%ns|instance (bytes 2-6)%instance|with power %power|connectable %connectable",
3+
"bluetooth.advertiseUid|param|connectable|label": "connectable",
4+
"bluetooth.advertiseUid|param|instance|label": "instance",
5+
"bluetooth.advertiseUid|param|ns|label": "namespace",
6+
"bluetooth.advertiseUid|param|power|label": "power",
37
"bluetooth.advertiseUrl|block": "bluetooth advertise url %url|with power %power|connectable %connectable",
8+
"bluetooth.advertiseUrl|param|connectable|label": "connectable",
9+
"bluetooth.advertiseUrl|param|power|label": "power",
410
"bluetooth.advertiseUrl|param|url|defl": "https://makecode.com",
11+
"bluetooth.advertiseUrl|param|url|label": "url",
512
"bluetooth.onBluetoothConnected|block": "on bluetooth connected",
613
"bluetooth.onBluetoothDisconnected|block": "on bluetooth disconnected",
714
"bluetooth.onUartDataReceived|block": "bluetooth|on data received %delimiters=serial_delimiter_conv",
15+
"bluetooth.onUartDataReceived|param|delimiters|label": "delimiter",
816
"bluetooth.setTransmitPower|block": "bluetooth set transmit power %power",
17+
"bluetooth.setTransmitPower|param|power|label": "value",
918
"bluetooth.startAccelerometerService|block": "bluetooth accelerometer service",
1019
"bluetooth.startButtonService|block": "bluetooth button service",
1120
"bluetooth.startIOPinService|block": "bluetooth io pin service",
@@ -15,11 +24,17 @@
1524
"bluetooth.startUartService|block": "bluetooth uart service",
1625
"bluetooth.stopAdvertising|block": "bluetooth stop advertising",
1726
"bluetooth.uartReadUntil|block": "bluetooth uart|read until %del=serial_delimiter_conv",
27+
"bluetooth.uartReadUntil|param|del|label": "delimiter",
1828
"bluetooth.uartWriteLine|block": "bluetooth uart|write line %data",
29+
"bluetooth.uartWriteLine|param|data|label": "value",
1930
"bluetooth.uartWriteNumber|block": "bluetooth uart|write number %value",
31+
"bluetooth.uartWriteNumber|param|value|label": "value",
2032
"bluetooth.uartWriteString|block": "bluetooth uart|write string %data",
33+
"bluetooth.uartWriteString|param|data|label": "value",
2134
"bluetooth.uartWriteValue|block": "bluetooth uart|write value %name|= %value",
2235
"bluetooth.uartWriteValue|param|name|defl": "x",
36+
"bluetooth.uartWriteValue|param|name|label": "name",
37+
"bluetooth.uartWriteValue|param|value|label": "value",
2338
"bluetooth|block": "bluetooth",
2439
"{id:category}Bluetooth": "Bluetooth"
2540
}

‎libs/bluetooth/shims.d.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ declare namespace bluetooth {
8080
* @param delimiters the characters to match received characters against.
8181
*/
8282
//% help=bluetooth/on-uart-data-received
83-
//% weight=18 blockId=bluetooth_on_data_received block="bluetooth|on data received %delimiters=serial_delimiter_conv" shim=bluetooth::onUartDataReceived
83+
//% weight=18 blockId=bluetooth_on_data_received block="bluetooth|on data received %delimiters=serial_delimiter_conv"
84+
//% delimiters.label="delimiter" shim=bluetooth::onUartDataReceived
8485
function onUartDataReceived(delimiters: string, body: () => void): void;
8586

8687
/**
@@ -108,6 +109,7 @@ declare namespace bluetooth {
108109
* @param connectable true to keep bluetooth connectable for other services, false otherwise.
109110
*/
110111
//% blockId=eddystone_advertise_url block="bluetooth advertise url %url|with power %power|connectable %connectable"
112+
//% url.label="url" power.label="power" connectable.label="connectable"
111113
//% parts=bluetooth weight=11 blockGap=8
112114
//% help=bluetooth/advertise-url blockExternalInputs=1
113115
//% hidden=1 deprecated=1 shim=bluetooth::advertiseUrl
@@ -127,7 +129,8 @@ declare namespace bluetooth {
127129
* @param power power level between 0 (minimal) and 7 (maximum), eg: 7.
128130
*/
129131
//% parts=bluetooth weight=5 help=bluetooth/set-transmit-power advanced=true
130-
//% blockId=bluetooth_settransmitpower block="bluetooth set transmit power %power" shim=bluetooth::setTransmitPower
132+
//% blockId=bluetooth_settransmitpower block="bluetooth set transmit power %power"
133+
//% power.label="value" shim=bluetooth::setTransmitPower
131134
function setTransmitPower(power: int32): void;
132135

133136
/**
@@ -140,4 +143,4 @@ declare namespace bluetooth {
140143
function stopAdvertising(): void;
141144
}
142145

143-
// Auto-generated. Do not edit. Really.
146+
// Auto-generated. Do not edit. Really.

‎libs/color/_locales/color-strings.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,16 @@
2222
"color.ColorBufferLayout.ARGB": "32bit RGB color with alpha",
2323
"color.ColorBufferLayout.RGB": "24bit RGB color",
2424
"color.fade|block": "fade %color=neopixel_colors|by %brightness",
25+
"color.fade|param|brightness|label": "brightness",
26+
"color.fade|param|color|label": "color",
2527
"color.hsv|block": "hue %hue|sat %sat|val %val",
28+
"color.hsv|param|hue|label": "hue",
29+
"color.hsv|param|sat|label": "saturation",
30+
"color.hsv|param|val|label": "brightness",
2631
"color.rgb|block": "red %red|green %green|blue %blue",
32+
"color.rgb|param|blue|label": "blue",
33+
"color.rgb|param|green|label": "green",
34+
"color.rgb|param|red|label": "red",
2735
"color.wellKnown|block": "%color",
2836
"color|block": "color",
2937
"{id:category}Color": "Color",

0 commit comments

Comments
 (0)