Compare commits
32 Commits
Author | SHA1 | Date | |
---|---|---|---|
3e46d4c615 | |||
2a3f2d4b11 | |||
d9b3f2fbef | |||
978e0fd765 | |||
00b4e8dc01 | |||
7a8f540b27 | |||
f04222fecb | |||
ede7c8b29b | |||
3dffd14abb | |||
fbf653834e | |||
166014bd92 | |||
3811461274 | |||
dbd3837dba | |||
db79634446 | |||
7f710c7d78 | |||
ce8bd38cb7 | |||
56dc85e6ff | |||
60f921c173 | |||
28fc309a64 | |||
e28cd3c3c6 | |||
4d2981489d | |||
f7f9a29e55 | |||
be88603d57 | |||
0dc9f53e30 | |||
9cb426e060 | |||
38c60710d1 | |||
5c62e5d697 | |||
63268c61a8 | |||
0c0c1cdd73 | |||
3d70526d05 | |||
7730b7c18f | |||
9b2fdabdcc |
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"appref": "v0.8.2"
|
"appref": "v0.8.21"
|
||||||
}
|
}
|
||||||
|
BIN
docs/static/Microsoft-logo_rgb_c-gray-square.png
vendored
Normal file
BIN
docs/static/Microsoft-logo_rgb_c-gray-square.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@ -8,6 +8,7 @@ def branch = GithubBranchName
|
|||||||
def newJobName = InternalUtilities.getFullJobName(project, "Default", isPR)
|
def newJobName = InternalUtilities.getFullJobName(project, "Default", isPR)
|
||||||
def newJob = job(newJobName) {
|
def newJob = job(newJobName) {
|
||||||
steps {
|
steps {
|
||||||
|
shell("chmod +x ./jenkins.sh")
|
||||||
shell("./jenkins.sh ${isPR}")
|
shell("./jenkins.sh ${isPR}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,8 +248,9 @@
|
|||||||
"serial.readUntil": "Reads a line of text from the serial port and returns the buffer when the delimiter is met.",
|
"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",
|
"serial.readUntil|param|delimiter": "text delimiter that separates each text chunk",
|
||||||
"serial.redirect": "Dynamically configuring the serial instance to use pins other than USBTX and USBRX.",
|
"serial.redirect": "Dynamically configuring the serial instance to use pins other than USBTX and USBRX.",
|
||||||
"serial.redirect|param|rx": "the new reception pin",
|
"serial.redirect|param|rate": "the new baud rate. eg: 115200",
|
||||||
"serial.redirect|param|tx": "the new transmission pins",
|
"serial.redirect|param|rx": "the new reception pin, eg: SerialPin.P1",
|
||||||
|
"serial.redirect|param|tx": "the new transmission pins, eg: SerialPin.P0",
|
||||||
"serial.writeLine": "Prints a line of text to the serial",
|
"serial.writeLine": "Prints a line of text to the serial",
|
||||||
"serial.writeNumber": "Prints a numeric value to the serial",
|
"serial.writeNumber": "Prints a numeric value to the serial",
|
||||||
"serial.writeString": "Sends a piece of text through Serial connection.",
|
"serial.writeString": "Sends a piece of text through Serial connection.",
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
"AcceleratorRange.TwoG": "The accelerator measures forces up to 2 gravity",
|
"AcceleratorRange.TwoG": "The accelerator measures forces up to 2 gravity",
|
||||||
"AcceleratorRange.TwoG|block": "2g",
|
"AcceleratorRange.TwoG|block": "2g",
|
||||||
"BaudRate.BaudRate115200|block": "115200",
|
"BaudRate.BaudRate115200|block": "115200",
|
||||||
|
"BaudRate.BaudRate56700|block": "57600",
|
||||||
"BaudRate.BaudRate9600|block": "9600",
|
"BaudRate.BaudRate9600|block": "9600",
|
||||||
"BeatFraction.Eighth|block": "1/8",
|
"BeatFraction.Eighth|block": "1/8",
|
||||||
"BeatFraction.Half|block": "1/2",
|
"BeatFraction.Half|block": "1/2",
|
||||||
@ -94,9 +95,7 @@
|
|||||||
"Rotation.Roll|block": "roll",
|
"Rotation.Roll|block": "roll",
|
||||||
"String.charAt|block": "char from %this=text|at %pos",
|
"String.charAt|block": "char from %this=text|at %pos",
|
||||||
"String.compare|block": "compare %this=text| to %that",
|
"String.compare|block": "compare %this=text| to %that",
|
||||||
"String.concat|block": "join %this=text|%other",
|
|
||||||
"String.fromCharCode|block": "text from char code %code",
|
"String.fromCharCode|block": "text from char code %code",
|
||||||
"String.isEmpty|block": "%this=text| is empty",
|
|
||||||
"String.length|block": "length of %VALUE",
|
"String.length|block": "length of %VALUE",
|
||||||
"String.substr|block": "substring of %this=text|from %start|of length %length",
|
"String.substr|block": "substring of %this=text|from %start|of length %length",
|
||||||
"String|block": "String",
|
"String|block": "String",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"AcceleratorRange.OneG|block": "1g",
|
"AcceleratorRange.OneG|block": "1g",
|
||||||
"AcceleratorRange.TwoG": "Der Bewegungssensor misst Kräfte bis 2g",
|
"AcceleratorRange.TwoG": "Der Bewegungssensor misst Kräfte bis 2g",
|
||||||
"AcceleratorRange.TwoG|block": "2g",
|
"AcceleratorRange.TwoG|block": "2g",
|
||||||
"BaudRate.BaudRate115200|block": "11520",
|
"BaudRate.BaudRate115200|block": "115200",
|
||||||
"BaudRate.BaudRate9600|block": "9600",
|
"BaudRate.BaudRate9600|block": "9600",
|
||||||
"BeatFraction.Eighth|block": "1/8",
|
"BeatFraction.Eighth|block": "1/8",
|
||||||
"BeatFraction.Half|block": "1/2",
|
"BeatFraction.Half|block": "1/2",
|
||||||
|
1
libs/core/dal.d.ts
vendored
1
libs/core/dal.d.ts
vendored
@ -192,6 +192,7 @@ declare const enum DAL {
|
|||||||
MICROBIT_SERIAL_EVT_TX_EMPTY = 2,
|
MICROBIT_SERIAL_EVT_TX_EMPTY = 2,
|
||||||
MICROBIT_UART_S_EVT_TX_EMPTY = 3,
|
MICROBIT_UART_S_EVT_TX_EMPTY = 3,
|
||||||
// built/yt/yotta_modules/microbit-dal/inc/drivers/CalliopeRGB.h
|
// built/yt/yotta_modules/microbit-dal/inc/drivers/CalliopeRGB.h
|
||||||
|
RGB_LED_MAX_INTENSITY = 40,
|
||||||
// built/yt/yotta_modules/microbit-dal/inc/drivers/CalliopeSoundMotor.h
|
// built/yt/yotta_modules/microbit-dal/inc/drivers/CalliopeSoundMotor.h
|
||||||
CALLIOPE_SM_DEFAULT_DUTY_M = 50,
|
CALLIOPE_SM_DEFAULT_DUTY_M = 50,
|
||||||
CALLIOPE_SM_DEFAULT_DUTY_S = 100,
|
CALLIOPE_SM_DEFAULT_DUTY_S = 100,
|
||||||
|
2
libs/core/enums.d.ts
vendored
2
libs/core/enums.d.ts
vendored
@ -339,6 +339,8 @@ declare namespace motors {
|
|||||||
declare enum BaudRate {
|
declare enum BaudRate {
|
||||||
//% block=115200
|
//% block=115200
|
||||||
BaudRate115200 = 115200,
|
BaudRate115200 = 115200,
|
||||||
|
//% block=57600
|
||||||
|
BaudRate56700 = 57600,
|
||||||
//% block=9600
|
//% block=9600
|
||||||
BaudRate9600 = 9600,
|
BaudRate9600 = 9600,
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,8 @@ enum SerialPin {
|
|||||||
enum BaudRate {
|
enum BaudRate {
|
||||||
//% block=115200
|
//% block=115200
|
||||||
BaudRate115200 = 115200,
|
BaudRate115200 = 115200,
|
||||||
|
//% block=57600
|
||||||
|
BaudRate56700 = 57600,
|
||||||
//% block=9600
|
//% block=9600
|
||||||
BaudRate9600 = 9600
|
BaudRate9600 = 9600
|
||||||
};
|
};
|
||||||
@ -83,16 +85,19 @@ namespace serial {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamically configuring the serial instance to use pins other than USBTX and USBRX.
|
* Dynamically configuring the serial instance to use pins other than USBTX and USBRX.
|
||||||
* @param tx the new transmission pins
|
* @param tx the new transmission pins, eg: SerialPin.P0
|
||||||
* @param rx the new reception pin
|
* @param rx the new reception pin, eg: SerialPin.P1
|
||||||
* @param baud the new baud rate. eg: 115200
|
* @param rate the new baud rate. eg: 115200
|
||||||
*/
|
*/
|
||||||
//% weight=10
|
//% weight=10
|
||||||
//% help=serial/redirect-to
|
//% help=serial/redirect-to
|
||||||
//% blockId=serial_redirect block="serial|redirect to|TX %tx|RX %rx|at baud rate %rate"
|
//% blockId=serial_redirect block="serial|redirect to|TX %tx|RX %rx|at baud rate %rate"
|
||||||
//% blockExternalInputs=1
|
//% blockExternalInputs=1
|
||||||
void redirect(SerialPin tx, SerialPin rx, BaudRate rate) {
|
void redirect(SerialPin tx, SerialPin rx, BaudRate rate) {
|
||||||
uBit.serial.redirect((PinName)tx, (PinName)rx);
|
MicroBitPin* txp = getPin(tx); if (!tx) return;
|
||||||
|
MicroBitPin* rxp = getPin(rx); if (!rx) return;
|
||||||
|
|
||||||
|
uBit.serial.redirect(txp->name, rxp->name);
|
||||||
uBit.serial.baud((int)rate);
|
uBit.serial.baud((int)rate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
6
libs/core/shims.d.ts
vendored
6
libs/core/shims.d.ts
vendored
@ -751,9 +751,9 @@ declare namespace serial {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamically configuring the serial instance to use pins other than USBTX and USBRX.
|
* Dynamically configuring the serial instance to use pins other than USBTX and USBRX.
|
||||||
* @param tx the new transmission pins
|
* @param tx the new transmission pins, eg: SerialPin.P0
|
||||||
* @param rx the new reception pin
|
* @param rx the new reception pin, eg: SerialPin.P1
|
||||||
* @param baud the new baud rate. eg: 115200
|
* @param rate the new baud rate. eg: 115200
|
||||||
*/
|
*/
|
||||||
//% weight=10
|
//% weight=10
|
||||||
//% help=serial/redirect-to
|
//% help=serial/redirect-to
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pxt-calliope",
|
"name": "pxt-calliope",
|
||||||
"version": "0.8.14",
|
"version": "0.8.23",
|
||||||
"description": "Calliope Mini editor for PXT",
|
"description": "Calliope Mini editor for PXT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"JavaScript",
|
"JavaScript",
|
||||||
@ -34,7 +34,7 @@
|
|||||||
"semantic-ui-less": "^2.2.4"
|
"semantic-ui-less": "^2.2.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pxt-core": "0.11.14"
|
"pxt-core": "0.11.32"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node node_modules/pxt-core/built/pxt.js travis"
|
"test": "node node_modules/pxt-core/built/pxt.js travis"
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
"cloud": {
|
"cloud": {
|
||||||
"workspace": false,
|
"workspace": false,
|
||||||
"packages": true,
|
"packages": true,
|
||||||
"sharing": true,
|
"sharing": false,
|
||||||
"publishing": true,
|
"publishing": false,
|
||||||
"preferredPackages": [
|
"preferredPackages": [
|
||||||
],
|
],
|
||||||
"githubPackages": true
|
"githubPackages": true
|
||||||
@ -55,6 +55,7 @@
|
|||||||
"loopsBlocks": true,
|
"loopsBlocks": true,
|
||||||
"logicBlocks": true,
|
"logicBlocks": true,
|
||||||
"variablesBlocks": true,
|
"variablesBlocks": true,
|
||||||
|
"textBlocks": true,
|
||||||
"onStartColor": "#54C9C9",
|
"onStartColor": "#54C9C9",
|
||||||
"onStartNamespace": "basic"
|
"onStartNamespace": "basic"
|
||||||
},
|
},
|
||||||
@ -170,7 +171,7 @@
|
|||||||
"yottaTarget": "calliope-mini-classic-gcc",
|
"yottaTarget": "calliope-mini-classic-gcc",
|
||||||
"yottaCorePackage": "microbit",
|
"yottaCorePackage": "microbit",
|
||||||
"githubCorePackage": "calliope-mini/microbit",
|
"githubCorePackage": "calliope-mini/microbit",
|
||||||
"gittag": "v2.0.0-rc7-calliope-p9",
|
"gittag": "v2.0.0-rc7-calliope-p9-2016-2",
|
||||||
"serviceId": "calliope"
|
"serviceId": "calliope"
|
||||||
},
|
},
|
||||||
"serial": {
|
"serial": {
|
||||||
@ -196,7 +197,7 @@
|
|||||||
"crowdinProject": "kindscript",
|
"crowdinProject": "kindscript",
|
||||||
"organization": "Microsoft",
|
"organization": "Microsoft",
|
||||||
"organizationUrl": "https://pxt.io/",
|
"organizationUrl": "https://pxt.io/",
|
||||||
"organizationLogo": "./static/Microsoft-logo_rgb_c-gray.png",
|
"organizationLogo": "./static/Microsoft-logo_rgb_c-gray-square.png",
|
||||||
"organizationWideLogo": "./static/Microsoft-logo_rgb_c-white.png",
|
"organizationWideLogo": "./static/Microsoft-logo_rgb_c-white.png",
|
||||||
"browserSupport": [
|
"browserSupport": [
|
||||||
{
|
{
|
||||||
|
@ -1728,7 +1728,7 @@ namespace pxsim.visuals {
|
|||||||
let ay = (ev.clientY - bbox.height / 2) / (bbox.height / 3);
|
let ay = (ev.clientY - bbox.height / 2) / (bbox.height / 3);
|
||||||
|
|
||||||
let x = - Math.max(- 1023, Math.min(1023, Math.floor(ax * 1023)));
|
let x = - Math.max(- 1023, Math.min(1023, Math.floor(ax * 1023)));
|
||||||
let y = Math.max(- 1023, Math.min(1023, Math.floor(ay * 1023)));
|
let y = - Math.max(- 1023, Math.min(1023, Math.floor(ay * 1023)));
|
||||||
let z2 = 1023 * 1023 - x * x - y * y;
|
let z2 = 1023 * 1023 - x * x - y * y;
|
||||||
let z = Math.floor((z2 > 0 ? -1 : 1) * Math.sqrt(Math.abs(z2)));
|
let z = Math.floor((z2 > 0 ? -1 : 1) * Math.sqrt(Math.abs(z2)));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user