Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
dbd3837dba | |||
db79634446 | |||
7f710c7d78 | |||
ce8bd38cb7 | |||
56dc85e6ff | |||
60f921c173 | |||
28fc309a64 | |||
e28cd3c3c6 | |||
4d2981489d | |||
f7f9a29e55 | |||
be88603d57 | |||
0dc9f53e30 | |||
9cb426e060 | |||
38c60710d1 | |||
5c62e5d697 | |||
63268c61a8 | |||
0c0c1cdd73 | |||
3d70526d05 | |||
cf1b85f85b | |||
1f7ad1f114 | |||
7730b7c18f | |||
9b2fdabdcc |
@ -1,3 +1,3 @@
|
||||
{
|
||||
"appref": "v0.8.2"
|
||||
"appref": "v0.8.19"
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ def branch = GithubBranchName
|
||||
def newJobName = InternalUtilities.getFullJobName(project, "Default", isPR)
|
||||
def newJob = job(newJobName) {
|
||||
steps {
|
||||
shell("chmod +x ./jenkins.sh")
|
||||
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|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|param|rx": "the new reception pin",
|
||||
"serial.redirect|param|tx": "the new transmission pins",
|
||||
"serial.redirect|param|rate": "the new baud rate. eg: 115200",
|
||||
"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.writeNumber": "Prints a numeric value to the serial",
|
||||
"serial.writeString": "Sends a piece of text through Serial connection.",
|
||||
|
15
libs/core/enums.d.ts
vendored
15
libs/core/enums.d.ts
vendored
@ -327,15 +327,12 @@ declare namespace motors {
|
||||
|
||||
|
||||
declare enum SerialPin {
|
||||
P0 = 7, // MICROBIT_ID_IO_P0
|
||||
P1 = 8, // MICROBIT_ID_IO_P1
|
||||
P2 = 9, // MICROBIT_ID_IO_P2
|
||||
//P8 = MICROBIT_ID_IO_P8,
|
||||
//P12 = MICROBIT_ID_IO_P12,
|
||||
//P13 = MICROBIT_ID_IO_P13,
|
||||
//P14 = MICROBIT_ID_IO_P14,
|
||||
//P15 = MICROBIT_ID_IO_P15,
|
||||
//P16 = MICROBIT_ID_IO_P16
|
||||
C16 = 9, // MICROBIT_ID_IO_P2
|
||||
C17 = 15, // MICROBIT_ID_IO_P8
|
||||
P0 = 19, // MICROBIT_ID_IO_P12
|
||||
P1 = 7, // MICROBIT_ID_IO_P0
|
||||
P2 = 8, // MICROBIT_ID_IO_P1
|
||||
P3 = 23, // MICROBIT_ID_IO_P16
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,15 +1,12 @@
|
||||
#include "pxt.h"
|
||||
|
||||
enum SerialPin {
|
||||
P0 = MICROBIT_ID_IO_P0,
|
||||
P1 = MICROBIT_ID_IO_P1,
|
||||
P2 = MICROBIT_ID_IO_P2,
|
||||
//P8 = MICROBIT_ID_IO_P8,
|
||||
//P12 = MICROBIT_ID_IO_P12,
|
||||
//P13 = MICROBIT_ID_IO_P13,
|
||||
//P14 = MICROBIT_ID_IO_P14,
|
||||
//P15 = MICROBIT_ID_IO_P15,
|
||||
//P16 = MICROBIT_ID_IO_P16
|
||||
C16 = MICROBIT_ID_IO_P2,
|
||||
C17 = MICROBIT_ID_IO_P8,
|
||||
P0 = MICROBIT_ID_IO_P12,
|
||||
P1 = MICROBIT_ID_IO_P0,
|
||||
P2 = MICROBIT_ID_IO_P1,
|
||||
P3 = MICROBIT_ID_IO_P16,
|
||||
};
|
||||
|
||||
enum BaudRate {
|
||||
@ -86,16 +83,19 @@ namespace serial {
|
||||
|
||||
/**
|
||||
* Dynamically configuring the serial instance to use pins other than USBTX and USBRX.
|
||||
* @param tx the new transmission pins
|
||||
* @param rx the new reception pin
|
||||
* @param baud the new baud rate. eg: 115200
|
||||
* @param tx the new transmission pins, eg: SerialPin.P0
|
||||
* @param rx the new reception pin, eg: SerialPin.P1
|
||||
* @param rate the new baud rate. eg: 115200
|
||||
*/
|
||||
//% weight=10
|
||||
//% help=serial/redirect-to
|
||||
//% blockId=serial_redirect block="serial|redirect to|TX %tx|RX %rx|at baud rate %rate"
|
||||
//% blockExternalInputs=1
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
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.
|
||||
* @param tx the new transmission pins
|
||||
* @param rx the new reception pin
|
||||
* @param baud the new baud rate. eg: 115200
|
||||
* @param tx the new transmission pins, eg: SerialPin.P0
|
||||
* @param rx the new reception pin, eg: SerialPin.P1
|
||||
* @param rate the new baud rate. eg: 115200
|
||||
*/
|
||||
//% weight=10
|
||||
//% help=serial/redirect-to
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pxt-calliope",
|
||||
"version": "0.8.13",
|
||||
"version": "0.8.20",
|
||||
"description": "Calliope Mini editor for PXT",
|
||||
"keywords": [
|
||||
"JavaScript",
|
||||
@ -34,7 +34,7 @@
|
||||
"semantic-ui-less": "^2.2.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"pxt-core": "0.11.14"
|
||||
"pxt-core": "0.11.26"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node node_modules/pxt-core/built/pxt.js travis"
|
||||
|
@ -14,8 +14,8 @@
|
||||
"cloud": {
|
||||
"workspace": false,
|
||||
"packages": true,
|
||||
"sharing": true,
|
||||
"publishing": true,
|
||||
"sharing": false,
|
||||
"publishing": false,
|
||||
"preferredPackages": [
|
||||
],
|
||||
"githubPackages": true
|
||||
@ -55,6 +55,7 @@
|
||||
"loopsBlocks": true,
|
||||
"logicBlocks": true,
|
||||
"variablesBlocks": true,
|
||||
"textBlocks": true,
|
||||
"onStartColor": "#54C9C9",
|
||||
"onStartNamespace": "basic"
|
||||
},
|
||||
|
@ -1728,7 +1728,7 @@ namespace pxsim.visuals {
|
||||
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)));
|
||||
let y = - Math.max(- 1023, Math.min(1023, Math.floor(ay * 1023)));
|
||||
let z2 = 1023 * 1023 - x * x - y * y;
|
||||
let z = Math.floor((z2 > 0 ? -1 : 1) * Math.sqrt(Math.abs(z2)));
|
||||
|
||||
|
Reference in New Issue
Block a user