Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe1de4a423 | ||
|
|
8537061e79 | ||
|
|
f6b7467324 | ||
|
|
36755400fd | ||
|
|
4cf7ec2da1 | ||
|
|
4b8e9f5715 | ||
|
|
0e99bf0d9e | ||
|
|
69bf34f773 | ||
|
|
6ba50b6c17 | ||
|
|
ab5b6baf46 | ||
|
|
dc3f6cf885 | ||
|
|
3533e57cc3 | ||
|
|
c03fac2162 | ||
|
|
2138725a44 | ||
|
|
e10bb1ce1d | ||
|
|
3bb03dcc1d | ||
|
|
a45bf54cff | ||
|
|
75e53ddd61 | ||
|
|
0590e74cc0 | ||
|
|
76edc1290c |
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"appref": "v0.5.54"
|
||||
"appref": "v0.5.63"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,45 @@
|
||||
{
|
||||
"Math.abs": "Returns the absolute value of a number (the value without regard to whether it is positive or negative). \nFor example, the absolute value of -5 is the same as the absolute value of 5.",
|
||||
"Math.abs|param|x": "A numeric expression for which the absolute value is needed.",
|
||||
"Math.max": "Returns the larger of two supplied numeric expressions.",
|
||||
"Math.min": "Returns the smaller of two supplied numeric expressions.",
|
||||
"Math.pow": "Returns the value of a base expression taken to a specified power.",
|
||||
"Math.pow|param|x": "The base value of the expression.",
|
||||
"Math.pow|param|y": "The exponent value of the expression.",
|
||||
"Math.random": "Returns a pseudorandom number between 0 and `max`.",
|
||||
"Math.randomBoolean": "Generates a `true` or `false` value randomly, just like flipping a coin.",
|
||||
"Math.sign": "Returns the sign of the x, indicating whether x is positive, negative or zero.",
|
||||
"Math.sign|param|x": "The numeric expression to test",
|
||||
"Math.sqrt": "Returns the square root of a number.",
|
||||
"Math.sqrt|param|x": "A numeric expression.",
|
||||
"String.charAt": "Returns the character at the specified index.",
|
||||
"String.charAt|param|index": "The zero-based index of the desired character.",
|
||||
"String.charCodeAt": "Returns the Unicode value of the character at the specified location.",
|
||||
"String.charCodeAt|param|index": "The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.",
|
||||
"String.compare": "Determines whether relative order of two strings (in ASCII encoding).",
|
||||
"String.compare|param|that": "String to compare to target string",
|
||||
"String.concat": "Returns a string that contains the concatenation of two or more strings.",
|
||||
"String.concat|param|other": "The string to append to the end of the string.",
|
||||
"String.fromCharCode": "Make a string from the given ASCII character code.",
|
||||
"String.isEmpty": "Returns a value indicating if the string is empty",
|
||||
"String.length": "Returns the length of a String object.",
|
||||
"String.substr": "Return substring of the current string.",
|
||||
"String.substr|param|length": "number of characters to extract",
|
||||
"String.substr|param|start": "first character index; can be negative from counting from the end, eg:0",
|
||||
"basic": "Provides access to basic micro:bit functionality.",
|
||||
"basic.clearScreen": "Turn off all LEDs",
|
||||
"basic.color": "Converts the color name to a number",
|
||||
"basic.forever": "Repeats the code forever in the background. On each iteration, allows other codes to run.",
|
||||
"basic.pause": "Pause for the specified time in milliseconds",
|
||||
"basic.pause|param|ms": "how long to pause for, eg: 100, 200, 500, 1000, 2000",
|
||||
"basic.plotLeds": "Draws an image on the LED screen.",
|
||||
"basic.plotLeds|param|leds": "pattern of LEDs to turn on/off",
|
||||
"basic.rgbw": "Converts red, green, blue channels into a RGB color",
|
||||
"basic.rgbw|param|blue": "value of the blue channel between 0 and 255. eg: 255",
|
||||
"basic.rgbw|param|green": "value of the green channel between 0 and 255. eg: 255",
|
||||
"basic.rgbw|param|red": "value of the red channel between 0 and 255. eg: 255",
|
||||
"basic.rgbw|param|white": "value of the white channel between 0 and 255. eg: 0",
|
||||
"basic.setLedColor": "Sets the color on the build-in LED. Set to 0 to turn off.",
|
||||
"basic.showAnimation": "Shows a sequence of LED screens as an animation.",
|
||||
"basic.showAnimation|param|interval": "time in milliseconds between each redraw",
|
||||
"basic.showAnimation|param|leds": "pattern of LEDs to turn on/off",
|
||||
@@ -20,19 +52,51 @@
|
||||
"basic.showString|param|interval": "how fast to shift characters; eg: 150, 100, 200, -100",
|
||||
"basic.showString|param|text": "the text to scroll on the screen, eg: \"Hello!\"",
|
||||
"control": "Runtime and event utilities.",
|
||||
"control.assert": "If the condition is false, display msg on serial console, and panic with code 098.",
|
||||
"control.deviceName": "Gets a friendly name for the device derived from the its serial number",
|
||||
"control.deviceSerialNumber": "Derive a unique, consistent serial number of this device from internal data.",
|
||||
"control.eventSourceId": "Returns the value of a C++ runtime constant",
|
||||
"control.eventTimestamp": "Gets the timestamp of the last event executed on the bus",
|
||||
"control.eventValue": "Gets the value of the last event executed on the bus",
|
||||
"control.eventValueId": "Returns the value of a C++ runtime constant",
|
||||
"control.inBackground": "Schedules code that run in the background.",
|
||||
"control.onEvent": "Raises an event in the event bus.",
|
||||
"control.panic": "Display specified error code and stop the program.",
|
||||
"control.raiseEvent": "Raises an event in the event bus.",
|
||||
"control.raiseEvent|param|mode": "optional definition of how the event should be processed after construction (default is CREATE_AND_FIRE).",
|
||||
"control.raiseEvent|param|src": "ID of the MicroBit Component that generated the event e.g. MICROBIT_ID_BUTTON_A.",
|
||||
"control.raiseEvent|param|value": "Component specific code indicating the cause of the event.",
|
||||
"control.reset": "Resets the BBC micro:bit.",
|
||||
"control.runtimeWarning": "Display warning in the simulator.",
|
||||
"control.waitMicros": "Blocks the current fiber for the given microseconds",
|
||||
"control.waitMicros|param|micros": "number of micro-seconds to wait. eg: 4",
|
||||
"game": "A single-LED sprite game engine",
|
||||
"game.addLife": "Adds life points to the current life",
|
||||
"game.addLife|param|lives": "TODO",
|
||||
"game.addScore": "Adds points to the current score",
|
||||
"game.addScore|param|points": "amount of points to change, eg: 1",
|
||||
"game.createSprite": "Creates a new LED sprite pointing to the right.",
|
||||
"game.createSprite|param|x": "sprite horizontal coordinate, eg: 2",
|
||||
"game.createSprite|param|y": "sprite vertical coordinate, eg: 2",
|
||||
"game.currentTime": "Gets the remaining time (since `start countdown`) or current time (since the device started or `start stopwatch`) in milliseconds.",
|
||||
"game.gameOver": "Displays a game over animation.",
|
||||
"game.invalidSprite": "Gets an invalid sprite; used to initialize locals.",
|
||||
"game.isGameOver": "Indicates if the game is display the game over sequence.",
|
||||
"game.isRunning": "Gets a value indicating if the game is still running. Returns `false` if game over.",
|
||||
"game.level": "Gets the current level",
|
||||
"game.levelUp": "Increments the level and display a message.",
|
||||
"game.life": "Gets the current life",
|
||||
"game.removeLife": "Removes some life",
|
||||
"game.removeLife|param|life": "TODO",
|
||||
"game.score": "Gets the current score",
|
||||
"game.setLife": "Sets the current life value",
|
||||
"game.setLife|param|value": "TODO",
|
||||
"game.setScore": "Sets the current score value",
|
||||
"game.setScore|param|value": "TODO",
|
||||
"game.showScore": "Displays the score on the screen.",
|
||||
"game.startCountdown": "Starts a game countdown timer",
|
||||
"game.startCountdown|param|ms": "countdown duration in milliseconds, eg: 10000",
|
||||
"game.startStopwatch": "Starts a stopwatch timer. `current time` will return the elapsed time.",
|
||||
"images": "Creation, manipulation and display of LED images.",
|
||||
"images.createBigImage": "Creates an image with 2 frames.",
|
||||
"images.createImage": "Creates an image that fits on the LED screen.",
|
||||
@@ -103,18 +167,23 @@
|
||||
"led.unplot": "Turn off the specified LED using x, y coordinates (x is horizontal, y is vertical). (0,0) is upper left.",
|
||||
"led.unplot|param|x": "TODO",
|
||||
"led.unplot|param|y": "TODO",
|
||||
"motors": "Blocks to control the onboard motors",
|
||||
"motors.dualMotorPower": "Controls two motors attached to the board.",
|
||||
"motors.motorCommand": "Send break, coast or sleep commands to the motor",
|
||||
"motors.motorPower": "Turns on the motor at a certain percent of power.",
|
||||
"motors.motorPower|param|power": "%percent of power sent to the motor. Negative power goes backward. eg: 50",
|
||||
"music": "Generation of music tones through pin ``P0``.",
|
||||
"music.beat": "Returns the duration of a beat in milli-seconds",
|
||||
"music.changeTempoBy": "Change the tempo by the specified amount",
|
||||
"music.changeTempoBy|param|bpm": "The change in beats per minute to the tempo, eg: 20",
|
||||
"music.noteFrequency": "Gets the frequency of a note.",
|
||||
"music.noteFrequency|param|name": "the note name",
|
||||
"music.playTone": "Plays a tone through pin ``P0`` for the given duration.",
|
||||
"music.playTone": "Plays a tone through ``speaker`` for the given duration.",
|
||||
"music.playTone|param|frequency": "pitch of the tone to play in Hertz (Hz)",
|
||||
"music.playTone|param|ms": "tone duration in milliseconds (ms)",
|
||||
"music.rest": "Rests (plays nothing) for a specified time through pin ``P0``.",
|
||||
"music.rest|param|ms": "rest duration in milliseconds (ms)",
|
||||
"music.ringTone": "Plays a tone through pin ``P0``.",
|
||||
"music.ringTone": "Plays a tone through ``speaker``.",
|
||||
"music.ringTone|param|frequency": "pitch of the tone to play in Hertz (Hz)",
|
||||
"music.setTempo": "Sets the tempo to the specified amount",
|
||||
"music.setTempo|param|bpm": "The new tempo in beats per minute, eg: 120",
|
||||
@@ -133,12 +202,16 @@
|
||||
"pins.analogWritePin": "Set the connector value as analog. Value must be comprised between 0 and 1023.",
|
||||
"pins.analogWritePin|param|name": "pin name to write to",
|
||||
"pins.analogWritePin|param|value": "value to write to the pin between ``0`` and ``1023``. eg:1023,0",
|
||||
"pins.createBuffer": "Create a new zero-initialized buffer.",
|
||||
"pins.createBuffer|param|size": "number of bytes in the buffer",
|
||||
"pins.digitalReadPin": "Read the specified pin or connector as either 0 or 1",
|
||||
"pins.digitalReadPin|param|name": "pin to read from",
|
||||
"pins.digitalWritePin": "Set a pin or connector value to either 0 or 1.",
|
||||
"pins.digitalWritePin|param|name": "pin to write to",
|
||||
"pins.digitalWritePin|param|value": "value to set on the pin, 1 eg,0",
|
||||
"pins.i2cReadBuffer": "Read `size` bytes from a 7-bit I2C `address`.",
|
||||
"pins.i2cReadNumber": "Read one number from 7-bit I2C address.",
|
||||
"pins.i2cWriteBuffer": "Write bytes to a 7-bit I2C `address`.",
|
||||
"pins.i2cWriteNumber": "Write one number to a 7-bit I2C address.",
|
||||
"pins.map": "Re-maps a number from one range to another. That is, a value of ``from low`` would get mapped to ``to low``, a value of ``from high`` to ``to high``, values in-between to values in-between, etc.",
|
||||
"pins.map|param|fromHigh": "the upper bound of the value's current range, eg: 1023",
|
||||
@@ -148,6 +221,9 @@
|
||||
"pins.map|param|value": "value to map in ranges",
|
||||
"pins.onPulsed": "Configures this pin to a digital input, and generates events where the timestamp is the duration that this pin was either ``high`` or ``low``.",
|
||||
"pins.pulseDuration": "Gets the duration of the last pulse in micro-seconds. This function should be called from a ``onPulsed`` handler.",
|
||||
"pins.pulseIn": "Returns the duration of a pulse in microseconds",
|
||||
"pins.pulseIn|param|name": "the pin which measures the pulse",
|
||||
"pins.pulseIn|param|value": "the value of the pulse (default high)",
|
||||
"pins.servoSetPulse": "Configures this IO pin as an analog/pwm output, configures the period to be 20 ms, and sets the pulse width, based on the value it is given **microseconds** or `1/1000` milliseconds.",
|
||||
"pins.servoSetPulse|param|micros": "pulse duration in micro seconds, eg:1500",
|
||||
"pins.servoSetPulse|param|name": "pin name",
|
||||
@@ -157,9 +233,12 @@
|
||||
"pins.setPull": "Configures the pull of this pin.",
|
||||
"pins.setPull|param|name": "pin to set the pull mode on",
|
||||
"pins.setPull|param|pull": "one of the mbed pull configurations: PullUp, PullDown, PullNone ",
|
||||
"pins.sizeOf": "Get the size in bytes of specified number format.",
|
||||
"pins.spiWrite": "Write to the SPI slave and return the response",
|
||||
"pins.spiWrite|param|value": "Data to be sent to the SPI slave",
|
||||
"serial": "Reading and writing data over a serial connection.",
|
||||
"serial.delimiters": "Returns the delimiter corresponding string",
|
||||
"serial.onLineReceived": "Registers an event to be fired when a line has been received",
|
||||
"serial.readLine": "Reads a line of text from the serial port.",
|
||||
"serial.readUntil": "Reads a line of text from the serial port and returns the buffer when the delimiter is met.",
|
||||
"serial.readUntil|param|delimiter": "text delimiter that separates each text chunk",
|
||||
|
||||
@@ -1,20 +1,38 @@
|
||||
{
|
||||
"Math.randomBoolean|block": "pick random true or false",
|
||||
"Math|block": "Math",
|
||||
"String.charAt|block": "char from %this|at %pos",
|
||||
"String.compare|block": "compare %this| to %that",
|
||||
"String.concat|block": "join %this|%other",
|
||||
"String.fromCharCode|block": "text from char code %code",
|
||||
"String.isEmpty|block": "%this| is empty",
|
||||
"String.length|block": "length of %VALUE",
|
||||
"String.substr|block": "substring of %this|from %start|of length %length",
|
||||
"String|block": "String",
|
||||
"basic.clearScreen|block": "clear screen",
|
||||
"basic.color|block": "%c",
|
||||
"basic.forever|block": "forever",
|
||||
"basic.pause|block": "pause (ms) %pause",
|
||||
"basic.rgbw|block": "red %red|green %green|blue %blue|white %white",
|
||||
"basic.setLedColor|block": "set led to %color=color_id",
|
||||
"basic.showLeds|block": "show leds",
|
||||
"basic.showNumber|block": "show|number %number",
|
||||
"basic.showString|block": "show|string %text",
|
||||
"basic|block": "basic",
|
||||
"control.deviceName|block": "device name",
|
||||
"control.deviceSerialNumber|block": "device serial number",
|
||||
"control.eventSourceId|block": "%id",
|
||||
"control.eventTimestamp|block": "event timestamp",
|
||||
"control.eventValueId|block": "%id",
|
||||
"control.eventValue|block": "event value",
|
||||
"control.inBackground|block": "run in background",
|
||||
"control.onEvent|block": "on event|from %src=control_event_source_id|with value %value=control_event_value_id",
|
||||
"control.raiseEvent|block": "raise event|from source %src=control_event_source_id|with value %value=control_event_value_id",
|
||||
"control.reset|block": "reset",
|
||||
"control.waitMicros|block": "wait (µs)%micros",
|
||||
"control|block": "control",
|
||||
"game.addScore|block": "change score by|%points",
|
||||
"game.createSprite|block": "create sprite at|x: %x|y: %y",
|
||||
"game.gameOver|block": "game over",
|
||||
"game.score|block": "score",
|
||||
"game.startCountdown|block": "start countdown|(ms) %duration",
|
||||
@@ -46,6 +64,10 @@
|
||||
"led.toggle|block": "toggle|x %x|y %y",
|
||||
"led.unplot|block": "unplot|x %x|y %y",
|
||||
"led|block": "led",
|
||||
"motors.dualMotorPower|block": "motor %motor|at %percent",
|
||||
"motors.motorCommand|block": "motor %command",
|
||||
"motors.motorPower|block": "motor on at %percent",
|
||||
"motors|block": "motors",
|
||||
"music.beat|block": "%fraction|beat",
|
||||
"music.changeTempoBy|block": "change tempo by (bpm)|%value",
|
||||
"music.noteFrequency|block": "%note",
|
||||
@@ -65,11 +87,13 @@
|
||||
"pins.map|block": "map %value|from low %fromLow|from high %fromHigh|to low %toLow|to high %toHigh",
|
||||
"pins.onPulsed|block": "on|pin %pin|pulsed %pulse",
|
||||
"pins.pulseDuration|block": "pulse duration (µs)",
|
||||
"pins.pulseIn|block": "pulse in (µs)|pin %name|pulsed %value",
|
||||
"pins.servoSetPulse|block": "servo set pulse|pin %value|to (µs) %micros",
|
||||
"pins.servoWritePin|block": "servo write|pin %name|to %value",
|
||||
"pins.setPull|block": "set pull|pin %pin|to %pull",
|
||||
"pins.spiWrite|block": "spi write %value",
|
||||
"pins|block": "pins",
|
||||
"serial.delimiters|block": "%del",
|
||||
"serial.readLine|block": "serial|read line",
|
||||
"serial.readUntil|block": "serial|read until %delimiter=serial_delimiter_conv",
|
||||
"serial.redirect|block": "serial|redirect to|TX %tx|RX %rx|at baud rate %rate",
|
||||
@@ -85,7 +109,10 @@
|
||||
"{id:category}Input": "Input",
|
||||
"{id:category}Led": "Led",
|
||||
"{id:category}Math": "Math",
|
||||
"{id:category}Motors": "Motors",
|
||||
"{id:category}Music": "Music",
|
||||
"{id:category}Pins": "Pins",
|
||||
"{id:category}Serial": "Serial"
|
||||
"{id:category}Serial": "Serial",
|
||||
"{id:category}String": "String",
|
||||
"{id:category}Text": "Text"
|
||||
}
|
||||
@@ -3,8 +3,8 @@
|
||||
"String.fromCharCode": "",
|
||||
"basic": "",
|
||||
"basic.clearScreen": "",
|
||||
"basic.forever": "",
|
||||
"basic.pause": "",
|
||||
"basic.forever": "Répète le code indéfiniment en tâche de fond. A chaque itération, permet aux autres codes de s’exécuter.",
|
||||
"basic.pause": "Pause pendant la durée indiquée en millisecondes",
|
||||
"basic.pause|param|ms": "",
|
||||
"basic.plotLeds": "",
|
||||
"basic.plotLeds|param|leds": "",
|
||||
|
||||
@@ -58,10 +58,10 @@
|
||||
"pins.analogReadPin|block": "lire|la broche analogique %name",
|
||||
"pins.analogSetPeriod|block": "",
|
||||
"pins.analogWritePin|block": "",
|
||||
"pins.digitalReadPin|block": "",
|
||||
"pins.digitalWritePin|block": "",
|
||||
"pins.i2cReadNumber|block": "",
|
||||
"pins.i2cWriteNumber|block": "",
|
||||
"pins.digitalReadPin|block": "lire en numérique|broche %name",
|
||||
"pins.digitalWritePin|block": "écrire en numérique|la broche %name|%value",
|
||||
"pins.i2cReadNumber|block": "i2c lire nombre|à l’adresse %address|de format %format=i2c_sizeof",
|
||||
"pins.i2cWriteNumber|block": "i2c écrire nombre|à l’adresse %address|avec value %value|de format %format=i2c_sizeof",
|
||||
"pins.map|block": "",
|
||||
"pins.onPulsed|block": "lorsque|la broche %pin|est pulsée %pulse",
|
||||
"pins.pulseDuration|block": "durée de l’impulsion (µs)",
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace music {
|
||||
//% help=music/play-tone weight=90
|
||||
//% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" icon="\uf025" blockGap=8
|
||||
//% parts="speaker" async
|
||||
void playTone(int freqency, int ms) {
|
||||
uBit.soundmotor.Sound_On(freqency);
|
||||
void playTone(int frequency, int ms) {
|
||||
uBit.soundmotor.Sound_On(frequency);
|
||||
if(ms > 0) uBit.sleep(ms);
|
||||
uBit.soundmotor.Sound_Off();
|
||||
}
|
||||
|
||||
@@ -129,31 +129,6 @@ enum BeatFraction {
|
||||
namespace music {
|
||||
let beatsPerMinute: number = 120;
|
||||
|
||||
// /**
|
||||
// * Plays a tone through pin ``P0`` for the given duration.
|
||||
// * @param frequency pitch of the tone to play in Hertz (Hz)
|
||||
// * @param ms tone duration in milliseconds (ms)
|
||||
// */
|
||||
// //% help=music/play-tone weight=90
|
||||
// //% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" icon="\uf025" blockGap=8
|
||||
// //% parts="speaker"
|
||||
// export function playTone(frequency: number, ms: number): void {
|
||||
// pins.analogSetPitchPin(AnalogPin.P0);
|
||||
// pins.analogPitch(frequency, ms);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Plays a tone through pin ``P0``.
|
||||
// * @param frequency pitch of the tone to play in Hertz (Hz)
|
||||
// */
|
||||
// //% help=music/ring-tone weight=80
|
||||
// //% blockId=device_ring block="ring tone (Hz)|%note=device_note" icon="\uf025" blockGap=8
|
||||
// //% parts="speaker"
|
||||
// export function ringTone(frequency: number): void {
|
||||
// pins.analogSetPitchPin(AnalogPin.P0);
|
||||
// pins.analogPitch(frequency, 0);
|
||||
// }
|
||||
|
||||
/**
|
||||
* Rests (plays nothing) for a specified time through pin ``P0``.
|
||||
* @param ms rest duration in milliseconds (ms)
|
||||
|
||||
2
libs/core/shims.d.ts
vendored
2
libs/core/shims.d.ts
vendored
@@ -548,7 +548,7 @@ declare namespace music {
|
||||
//% help=music/play-tone weight=90
|
||||
//% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" icon="\uf025" blockGap=8
|
||||
//% parts="speaker" async shim=music::playTone
|
||||
function playTone(freqency: number, ms: number): void;
|
||||
function playTone(frequency: number, ms: number): void;
|
||||
|
||||
/**
|
||||
* Plays a tone through ``speaker``.
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
{
|
||||
"radio": "Communicate data using radio packets",
|
||||
"radio.onDataPacketReceived": "Registers code to run when the radio receives a packet. Also takes the\nreceived packet from the radio queue.",
|
||||
"radio.onDataReceived": "Registers code to run when a packet is received over radio.",
|
||||
"radio.receiveNumber": "Reads the next packet as a number from the radio queue.",
|
||||
"radio.receiveString": "Reads the next packet as a string and returns it.",
|
||||
"radio.receivedNumberAt": "Reads a number at a given index, between ``0`` and ``3``, from the packet received by ``receive number``. Not supported in simulator.",
|
||||
"radio.receivedNumberAt|param|index": "index of the number to read from 0 to 3. 1 eg",
|
||||
"radio.receivedSignalStrength": "Gets the received signal strength indicator (RSSI) from the packet received by ``receive number``. Not supported in simulator.\nnamespace=radio",
|
||||
"radio.receiveNumber": "Reads the next packet from the radio queue and returns the packet's number\npayload or 0 if the packet did not contain a number.",
|
||||
"radio.receiveString": "Reads the next packet from the radio queue and returns the packet's string\npayload or the empty string if the packet did not contain a string.",
|
||||
"radio.receivedNumber": "Returns the number payload from the last packet taken from the radio queue\n(via ``receiveNumber``, ``receiveString``, etc) or 0 if that packet did not\ncontain a number.",
|
||||
"radio.receivedSerial": "Returns the serial number of the sender micro:bit from the last packet taken\nfrom the radio queue (via ``receiveNumber``, ``receiveString``, etc) or 0 if\nthat packet did not send a serial number.",
|
||||
"radio.receivedSignalStrength": "Gets the received signal strength indicator (RSSI) from the last packet taken\nfrom the radio queue (via ``receiveNumber``, ``receiveString``, etc). Not supported in simulator.\nnamespace=radio",
|
||||
"radio.receivedString": "Returns the string payload from the last packet taken from the radio queue\n(via ``receiveNumber``, ``receiveString``, etc) or the empty string if that\npacket did not contain a string.",
|
||||
"radio.receivedTime": "Returns the system time of the sender micro:bit at the moment when it sent the\nlast packet taken from the radio queue (via ``receiveNumber``,\n``receiveString``, etc).",
|
||||
"radio.sendNumber": "Broadcasts a number over radio to any connected micro:bit in the group.",
|
||||
"radio.sendString": "Broadcasts a number over radio to any connected micro:bit in the group.",
|
||||
"radio.sendString": "Broadcasts a string along with the device serial number\nand running time to any connected micro:bit in the group.",
|
||||
"radio.sendValue": "Broadcasts a name / value pair along with the device serial number\nand running time to any connected micro:bit in the group.",
|
||||
"radio.sendValue|param|name": "the field name (max 12 characters), eg: \"data\"",
|
||||
"radio.sendValue|param|value": "the numberic value",
|
||||
@@ -16,5 +19,5 @@
|
||||
"radio.setTransmitPower|param|power": "a value in the range 0..7, where 0 is the lowest power and 7 is the highest. eg: 7",
|
||||
"radio.setTransmitSerialNumber": "Set the radio to transmit the serial number in each message.",
|
||||
"radio.setTransmitSerialNumber|param|transmit": "value indicating if the serial number is transmitted, eg: true",
|
||||
"radio.writeValueToSerial": "Reads a value sent with `stream value` and writes it\nto the serial stream as JSON"
|
||||
"radio.writeValueToSerial": "Reads the next packet from the radio queue and and writes it to serial\nas JSON."
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"radio.onDataPacketReceived|block": "on radio received",
|
||||
"radio.onDataReceived|block": "radio on data received",
|
||||
"radio.receiveNumber|block": "radio receive number",
|
||||
"radio.receiveString|block": "radio receive string",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pxt-calliope",
|
||||
"version": "0.5.61",
|
||||
"version": "0.5.67",
|
||||
"description": "calliope target for PXT",
|
||||
"keywords": [
|
||||
"JavaScript",
|
||||
@@ -30,7 +30,7 @@
|
||||
"typescript": "^1.8.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"pxt-core": "0.5.44",
|
||||
"pxt-core": "0.5.54",
|
||||
"less": "^2.6.0",
|
||||
"semantic-ui-less": "^2.2.4"
|
||||
}
|
||||
|
||||
@@ -220,13 +220,13 @@
|
||||
"appTheme": {
|
||||
"accentColor": "#249899",
|
||||
"defaultLocale": "de",
|
||||
"logoUrl": "https://calliope.cc/about",
|
||||
"logoUrl": "https://calliope.cc/",
|
||||
"logo": "./static/Calliopeminieditor.svg",
|
||||
"docsLogo": "./static/Calliopeminieditor.svg",
|
||||
"docsLogo": "./static/Logo_Calliope_Woman.svg",
|
||||
"portraitLogo": "./static/Logo_Calliope_Woman.svg",
|
||||
"footerLogo": "./static/Calliopeminieditor.svg",
|
||||
"cardLogo": "https://az851932.vo.msecnd.net/pub/drbwxcth",
|
||||
"appLogo": "https://az851932.vo.msecnd.net/pub/tbhemtig",
|
||||
"cardLogo": "./static/icons/apple-touch-icon.png",
|
||||
"appLogo": "./static/icons/apple-touch-icon.png",
|
||||
"homeUrl": "https://calliope.cc/",
|
||||
"privacyUrl": "https://go.microsoft.com/fwlink/?LinkId=521839",
|
||||
"termsOfUseUrl": "https://go.microsoft.com/fwlink/?LinkID=206977",
|
||||
|
||||
@@ -1716,8 +1716,9 @@ namespace pxsim.visuals {
|
||||
tiltDecayer = 0;
|
||||
}
|
||||
|
||||
let ax = (ev.clientX - this.element.clientWidth / 2) / (this.element.clientWidth / 3);
|
||||
let ay = (ev.clientY - this.element.clientHeight / 2) / (this.element.clientHeight / 3);
|
||||
let bbox = this.element.getBoundingClientRect();
|
||||
let ax = (ev.clientX - bbox.width / 2) / (bbox.width / 3);
|
||||
let ay = (ev.clientY - bbox.height / 2) / (bbox.height / 3);
|
||||
|
||||
let x = - Math.max(- 1023, Math.min(1023, Math.floor(ax * 1023)));
|
||||
let y = Math.max(- 1023, Math.min(1023, Math.floor(ay * 1023)));
|
||||
|
||||
@@ -35,4 +35,7 @@
|
||||
PXT Overrides
|
||||
*******************************/
|
||||
|
||||
@mainMenuHeight: 5rem;
|
||||
@mobileMenuHeight: 5rem;
|
||||
|
||||
@blocklyToolboxColor: #F6F4E6;
|
||||
|
||||
Reference in New Issue
Block a user