Compare commits

...

10 Commits

Author SHA1 Message Date
f4727f12c9 0.3.13 2016-08-04 10:10:03 -07:00
a36cb65aa5 Bump pxt-core to 0.3.17 2016-08-04 10:09:56 -07:00
3b16e59ee1 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-08-04 10:09:42 -07:00
f2c43c74ac support for start/length in buffer methods 2016-08-04 08:42:47 -07:00
1c4c93dc60 0.3.12 2016-08-03 17:19:26 -07:00
d73847bfba Bump pxt-core to 0.3.15 2016-08-03 17:19:19 -07:00
4e46682489 keep older value longer 2016-08-02 15:35:33 -07:00
ab7aa00747 0.3.11 2016-08-02 13:25:13 -07:00
2bebb6056d Bump pxt-core to 0.3.14 2016-08-02 13:25:11 -07:00
22046c417c adding uservoice info 2016-08-02 13:18:07 -07:00
5 changed files with 24 additions and 12 deletions

View File

@ -123,21 +123,25 @@ namespace BufferMethods {
/**
* Shift buffer left in place, with zero padding.
* @param offset number of bytes to shift; use negative value to shift right
* @param start start offset in buffer. Default is 0.
* @param length number of elements in buffer. If negative, length is set as the buffer length minus start. eg: -1
*/
//%
void shift(Buffer buf, int offset)
void shift(Buffer buf, int offset, int start = 0, int length = -1)
{
ManagedBuffer(buf).shift(offset);
ManagedBuffer(buf).shift(offset, start, length);
}
/**
* Rotate buffer left in place.
* @param offset number of bytes to shift; use negative value to shift right
* @param start start offset in buffer. Default is 0.
* @param length number of elements in buffer. If negative, length is set as the buffer length minus start. eg: -1
*/
//%
void rotate(Buffer buf, int offset)
void rotate(Buffer buf, int offset, int start = 0, int length = -1)
{
ManagedBuffer(buf).rotate(offset);
ManagedBuffer(buf).rotate(offset, start, length);
}
// int readBytes(uint8_t *dst, int offset, int length, bool swapBytes = false) const;

View File

@ -23,7 +23,7 @@
value = Math.abs(value);
if (high != 0) barGraphHigh = high;
else if (value > barGraphHigh || now - barGraphHighLast > 5000) {
else if (value > barGraphHigh || now - barGraphHighLast > 10000) {
barGraphHigh = value;
barGraphHighLast = now;
}

View File

@ -635,16 +635,20 @@ declare interface Buffer {
/**
* Shift buffer left in place, with zero padding.
* @param offset number of bytes to shift; use negative value to shift right
* @param start start offset in buffer. Default is 0.
* @param length number of elements in buffer. If negative, length is set as the buffer length minus start. eg: -1
*/
//% shim=BufferMethods::shift
shift(offset: number): void;
//% start.defl=0 length.defl=-1 shim=BufferMethods::shift
shift(offset: number, start?: number, length?: number): void;
/**
* Rotate buffer left in place.
* @param offset number of bytes to shift; use negative value to shift right
* @param start start offset in buffer. Default is 0.
* @param length number of elements in buffer. If negative, length is set as the buffer length minus start. eg: -1
*/
//% shim=BufferMethods::rotate
rotate(offset: number): void;
//% start.defl=0 length.defl=-1 shim=BufferMethods::rotate
rotate(offset: number, start?: number, length?: number): void;
/**
* Write contents of `src` at `dstOffset` in current buffer.

View File

@ -1,6 +1,6 @@
{
"name": "pxt-microbit",
"version": "0.3.10",
"version": "0.3.13",
"description": "BBC micro:bit target for PXT",
"keywords": [
"JavaScript",
@ -29,6 +29,6 @@
"typescript": "^1.8.7"
},
"dependencies": {
"pxt-core": "0.3.13"
"pxt-core": "0.3.17"
}
}

View File

@ -70,7 +70,7 @@
"yottaTarget": "bbc-microbit-classic-gcc",
"yottaCorePackage": "pxt-microbit-core",
"githubCorePackage": "microsoft/pxt-microbit-core",
"gittag": "v0.1.11",
"gittag": "v0.2.2",
"serviceId": "ws"
},
"serial": {
@ -124,5 +124,9 @@
}
],
"sideDoc": "getting-started"
},
"analytics": {
"userVoiceApiKey": "WEkkIGaj1WtJnSUF59iwaA",
"userVoiceForumId": 402381
}
}