Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
274bb9e042 | |||
e316f068e2 | |||
c75e77593a | |||
ecbf8409ea | |||
411fe52813 | |||
0d04376413 | |||
5deffe832c | |||
528f696b8c |
@ -73,6 +73,8 @@
|
||||
"PinPullMode.PullDown|block": "down",
|
||||
"PinPullMode.PullNone|block": "none",
|
||||
"PinPullMode.PullUp|block": "up",
|
||||
"PulseValue.High|block": "high",
|
||||
"PulseValue.Low|block": "low",
|
||||
"Rotation.Pitch|block": "pitch",
|
||||
"Rotation.Roll|block": "roll",
|
||||
"String.charAt|block": "char from %this|at %pos",
|
||||
|
2
libs/core/enums.d.ts
vendored
2
libs/core/enums.d.ts
vendored
@ -275,7 +275,9 @@ declare namespace led {
|
||||
|
||||
|
||||
declare enum PulseValue {
|
||||
//% block=high
|
||||
High = 4, // MICROBIT_PIN_EVT_PULSE_HI
|
||||
//% block=low
|
||||
Low = 5, // MICROBIT_PIN_EVT_PULSE_LO
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ namespace ImageMethods {
|
||||
|
||||
/**
|
||||
* Scrolls an image .
|
||||
* @param frameOffset x offset moved on each animation step, eg: 5, 1, -1
|
||||
* @param frameOffset x offset moved on each animation step, eg: 1, 2, 5
|
||||
* @param interval time between each animation step in milli seconds, eg: 200
|
||||
*/
|
||||
//% help=images/show-image weight=79 async blockNamespace=images
|
||||
@ -69,10 +69,7 @@ namespace ImageMethods {
|
||||
//% parts="ledmatrix"
|
||||
void scrollImage(Image id, int frameOffset, int interval) {
|
||||
MicroBitImage i(id);
|
||||
if (i.getWidth() <= 5)
|
||||
showImage(id, 0);
|
||||
else
|
||||
uBit.display.animate(i, interval, frameOffset, 0);
|
||||
uBit.display.animate(i, interval, frameOffset, MICROBIT_DISPLAY_WIDTH - 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,7 +32,9 @@ enum class AnalogPin {
|
||||
};
|
||||
|
||||
enum class PulseValue {
|
||||
//% block=high
|
||||
High = MICROBIT_PIN_EVT_PULSE_HI,
|
||||
//% block=low
|
||||
Low = MICROBIT_PIN_EVT_PULSE_LO
|
||||
};
|
||||
|
||||
|
2
libs/core/shims.d.ts
vendored
2
libs/core/shims.d.ts
vendored
@ -53,7 +53,7 @@ declare interface Image {
|
||||
|
||||
/**
|
||||
* Scrolls an image .
|
||||
* @param frameOffset x offset moved on each animation step, eg: 5, 1, -1
|
||||
* @param frameOffset x offset moved on each animation step, eg: 1, 2, 5
|
||||
* @param interval time between each animation step in milli seconds, eg: 200
|
||||
*/
|
||||
//% help=images/show-image weight=79 async blockNamespace=images
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pxt-microbit",
|
||||
"version": "0.6.14",
|
||||
"version": "0.6.16",
|
||||
"description": "micro:bit target for PXT",
|
||||
"keywords": [
|
||||
"JavaScript",
|
||||
@ -34,6 +34,6 @@
|
||||
"semantic-ui-less": "^2.2.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"pxt-core": "0.5.73"
|
||||
"pxt-core": "0.5.76"
|
||||
}
|
||||
}
|
||||
|
@ -190,7 +190,6 @@
|
||||
"projectGallery": "projects",
|
||||
"boardName": "micro:bit",
|
||||
"sideDoc": "getting-started",
|
||||
"gettingStarted": "getting-started",
|
||||
"browserSupport": [
|
||||
{
|
||||
"name": "unsupported",
|
||||
|
Reference in New Issue
Block a user