Compare commits

...

22 Commits

Author SHA1 Message Date
dbd3837dba 0.8.20 2017-02-13 11:44:15 +01:00
db79634446 add comments from pxt-microbit 2017-02-13 11:44:00 +01:00
7f710c7d78 bump and fix serial redirect 2017-02-12 10:31:26 +01:00
ce8bd38cb7 0.8.19 2017-02-12 10:30:41 +01:00
56dc85e6ff picked serial redirection fix from pxt-microbit (issue #961) 2017-02-12 10:26:32 +01:00
60f921c173 Merge remote-tracking branch 'origin/master' 2017-02-11 09:19:58 +01:00
28fc309a64 0.8.18 2017-02-08 21:10:09 -08:00
e28cd3c3c6 Bump pxt-core to 0.11.26 2017-02-08 21:10:07 -08:00
4d2981489d 0.8.17 2017-02-06 22:29:02 -08:00
f7f9a29e55 Bump pxt-core to 0.11.16 2017-02-06 22:29:00 -08:00
be88603d57 enabling text blocks 2017-02-06 22:28:44 -08:00
0dc9f53e30 bumped to 0.8.16 2017-02-06 15:19:32 -08:00
9cb426e060 0.8.16 2017-02-06 14:50:14 -08:00
38c60710d1 disable sharing 2017-02-06 14:49:49 -08:00
5c62e5d697 0.8.15 2017-02-06 14:41:47 -08:00
63268c61a8 Merge branch 'master' of https://github.com/Microsoft/pxt-calliope 2017-02-06 14:41:34 -08:00
0c0c1cdd73 fix simulator y value 2017-02-06 14:41:24 -08:00
3d70526d05 Fix Jenkins build permissions 2017-02-06 14:06:41 -08:00
cf1b85f85b 0.8.14 2017-02-06 22:48:37 +01:00
1f7ad1f114 add correct serial pins 2017-02-06 22:48:27 +01:00
7730b7c18f Merge remote-tracking branch 'origin/master' 2017-02-02 19:31:36 +01:00
9b2fdabdcc fix sharing URL 2017-01-23 09:21:54 +01:00
9 changed files with 33 additions and 33 deletions

View File

@ -1,3 +1,3 @@
{
"appref": "v0.8.2"
"appref": "v0.8.19"
}

View File

@ -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}")
}

View File

@ -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
View File

@ -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
}

View File

@ -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);
}
}

View File

@ -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

View File

@ -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"

View File

@ -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"
},

View File

@ -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)));