Compare commits

..

43 Commits

Author SHA1 Message Date
Matthias L. Jugel
910987fcea 0.8.25 2017-02-19 11:44:36 +01:00
Matthias L. Jugel
7c8c35a326 fix comments and parameter typo 2017-02-19 11:44:16 +01:00
thinkberg
7ad9a1cab8 0.8.24 2017-02-19 11:22:53 +01:00
thinkberg
97ba83f660 Merge branch 'calliope-mini-2016' of github.com:microsoft/pxt-calliope into calliope-mini-2016 2017-02-19 11:22:49 +01:00
thinkberg
d69bd0e0e4 fix play ringtone (#MINI-32) 2017-02-19 11:19:26 +01:00
Matthias L. Jugel
3e46d4c615 0.8.23 2017-02-18 15:42:01 +01:00
Matthias L. Jugel
2a3f2d4b11 fix 115200 string 2017-02-18 15:41:52 +01:00
Matthias L. Jugel
d9b3f2fbef add 57600 as baud selection 2017-02-18 15:32:21 +01:00
Matthias L. Jugel
978e0fd765 updated for Calliope mini board rev 0.3 (2016) 2017-02-18 15:25:12 +01:00
Sam El-Husseini
00b4e8dc01 Updating small organization logo 2017-02-16 20:45:03 -08:00
Peli de Halleux
7a8f540b27 0.8.22 2017-02-13 15:44:32 -08:00
Peli de Halleux
f04222fecb Bump pxt-core to 0.11.32 2017-02-13 15:44:29 -08:00
thinkberg
ede7c8b29b update to latest version 2017-02-13 19:35:28 +01:00
thinkberg
3dffd14abb revert index ref version 2017-02-13 18:57:35 +01:00
Peli de Halleux
fbf653834e 0.8.21 2017-02-13 09:20:05 -08:00
Peli de Halleux
166014bd92 Bump pxt-core to 0.11.31 2017-02-13 09:20:03 -08:00
Matthias L. Jugel
3811461274 bump index version 2017-02-13 11:45:14 +01:00
Matthias L. Jugel
dbd3837dba 0.8.20 2017-02-13 11:44:15 +01:00
Matthias L. Jugel
db79634446 add comments from pxt-microbit 2017-02-13 11:44:00 +01:00
thinkberg
7f710c7d78 bump and fix serial redirect 2017-02-12 10:31:26 +01:00
thinkberg
ce8bd38cb7 0.8.19 2017-02-12 10:30:41 +01:00
thinkberg
56dc85e6ff picked serial redirection fix from pxt-microbit (issue #961) 2017-02-12 10:26:32 +01:00
thinkberg
60f921c173 Merge remote-tracking branch 'origin/master' 2017-02-11 09:19:58 +01:00
Peli de Halleux
28fc309a64 0.8.18 2017-02-08 21:10:09 -08:00
Peli de Halleux
e28cd3c3c6 Bump pxt-core to 0.11.26 2017-02-08 21:10:07 -08:00
Peli de Halleux
4d2981489d 0.8.17 2017-02-06 22:29:02 -08:00
Peli de Halleux
f7f9a29e55 Bump pxt-core to 0.11.16 2017-02-06 22:29:00 -08:00
Peli de Halleux
be88603d57 enabling text blocks 2017-02-06 22:28:44 -08:00
Peli de Halleux
0dc9f53e30 bumped to 0.8.16 2017-02-06 15:19:32 -08:00
Peli de Halleux
9cb426e060 0.8.16 2017-02-06 14:50:14 -08:00
Peli de Halleux
38c60710d1 disable sharing 2017-02-06 14:49:49 -08:00
Peli de Halleux
5c62e5d697 0.8.15 2017-02-06 14:41:47 -08:00
Peli de Halleux
63268c61a8 Merge branch 'master' of https://github.com/Microsoft/pxt-calliope 2017-02-06 14:41:34 -08:00
Peli de Halleux
0c0c1cdd73 fix simulator y value 2017-02-06 14:41:24 -08:00
guillaumejenkins
3d70526d05 Fix Jenkins build permissions 2017-02-06 14:06:41 -08:00
Matthias L. Jugel
cf1b85f85b 0.8.14 2017-02-06 22:48:37 +01:00
Matthias L. Jugel
1f7ad1f114 add correct serial pins 2017-02-06 22:48:27 +01:00
Matthias L. Jugel
b1d8ab0206 0.8.13 2017-02-06 22:07:56 +01:00
Matthias L. Jugel
8bfa79fd15 update dependency on dal 2017-02-06 22:07:40 +01:00
Peli de Halleux
991aa40f19 0.8.12 2017-02-06 12:10:43 -08:00
Peli de Halleux
279f72c800 Bump pxt-core to 0.11.14 2017-02-06 12:10:41 -08:00
thinkberg
7730b7c18f Merge remote-tracking branch 'origin/master' 2017-02-02 19:31:36 +01:00
thinkberg
9b2fdabdcc fix sharing URL 2017-01-23 09:21:54 +01:00
14 changed files with 54 additions and 43 deletions

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

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

@@ -180,6 +180,7 @@
"music.noteFrequency": "Gets the frequency of a note.",
"music.noteFrequency|param|name": "the note name",
"music.playTone": "Plays a tone through ``speaker`` for the given duration.",
"music.playTone|param|frequency": "pitch of the tone to play in Hertz (Hz)",
"music.playTone|param|ms": "tone duration in milliseconds (ms)",
"music.rest": "Rests (plays nothing) for a specified time through pin ``P0``.",
"music.rest|param|ms": "rest duration in milliseconds (ms)",
@@ -248,8 +249,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.",

View File

@@ -8,6 +8,7 @@
"AcceleratorRange.TwoG": "The accelerator measures forces up to 2 gravity",
"AcceleratorRange.TwoG|block": "2g",
"BaudRate.BaudRate115200|block": "115200",
"BaudRate.BaudRate56700|block": "57600",
"BaudRate.BaudRate9600|block": "9600",
"BeatFraction.Eighth|block": "1/8",
"BeatFraction.Half|block": "1/2",
@@ -94,9 +95,7 @@
"Rotation.Roll|block": "roll",
"String.charAt|block": "char from %this=text|at %pos",
"String.compare|block": "compare %this=text| to %that",
"String.concat|block": "join %this=text|%other",
"String.fromCharCode|block": "text from char code %code",
"String.isEmpty|block": "%this=text| is empty",
"String.length|block": "length of %VALUE",
"String.substr|block": "substring of %this=text|from %start|of length %length",
"String|block": "String",
@@ -168,8 +167,10 @@
"music.setTempo|block": "set tempo to (bpm)|%value",
"music.tempo|block": "tempo (bpm)",
"music|block": "music",
"pins.analogPitch|block": "analog pitch %frequency|for (ms) %ms",
"pins.analogReadPin|block": "analog read|pin %name",
"pins.analogSetPeriod|block": "analog set period|pin %pin|to (µs)%micros",
"pins.analogSetPitchPin|block": "analog set pitch pin %name",
"pins.analogWritePin|block": "analog write|pin %name|to %value",
"pins.digitalReadPin|block": "digital read|pin %name",
"pins.digitalWritePin|block": "digital write|pin %name|to %value",

View File

@@ -7,7 +7,7 @@
"AcceleratorRange.OneG|block": "1g",
"AcceleratorRange.TwoG": "Der Bewegungssensor misst Kräfte bis 2g",
"AcceleratorRange.TwoG|block": "2g",
"BaudRate.BaudRate115200|block": "11520",
"BaudRate.BaudRate115200|block": "115200",
"BaudRate.BaudRate9600|block": "9600",
"BeatFraction.Eighth|block": "1/8",
"BeatFraction.Half|block": "1/2",

1
libs/core/dal.d.ts vendored
View File

@@ -192,6 +192,7 @@ declare const enum DAL {
MICROBIT_SERIAL_EVT_TX_EMPTY = 2,
MICROBIT_UART_S_EVT_TX_EMPTY = 3,
// 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
CALLIOPE_SM_DEFAULT_DUTY_M = 50,
CALLIOPE_SM_DEFAULT_DUTY_S = 100,

17
libs/core/enums.d.ts vendored
View File

@@ -327,21 +327,20 @@ 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
}
declare enum BaudRate {
//% block=115200
BaudRate115200 = 115200,
//% block=57600
BaudRate56700 = 57600,
//% block=9600
BaudRate9600 = 9600,
}

View File

@@ -9,9 +9,13 @@ namespace music {
//% help=music/play-tone weight=90
//% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" icon="\uf025" blockGap=8
//% parts="speaker" async
void playTone(int freqency, int ms) {
uBit.soundmotor.soundOn(freqency);
if(ms > 0) uBit.sleep(ms);
uBit.soundmotor.soundOff();
void playTone(int frequency, int ms) {
if(frequency > 0) uBit.soundmotor.soundOn(frequency);
else uBit.soundmotor.soundOff();
if(ms > 0) {
uBit.sleep(ms);
uBit.soundmotor.soundOff();
}
}
}

View File

@@ -1,20 +1,19 @@
#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 {
//% block=115200
BaudRate115200 = 115200,
//% block=57600
BaudRate56700 = 57600,
//% block=9600
BaudRate9600 = 9600
};
@@ -86,16 +85,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

@@ -555,7 +555,7 @@ declare namespace music {
//% help=music/play-tone weight=90
//% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" icon="\uf025" blockGap=8
//% parts="speaker" async shim=music::playTone
function playTone(freqency: number, ms: number): void;
function playTone(frequency: number, ms: number): void;
}
declare namespace pins {
@@ -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.11",
"version": "0.8.25",
"description": "Calliope Mini editor for PXT",
"keywords": [
"JavaScript",
@@ -34,7 +34,7 @@
"semantic-ui-less": "^2.2.4"
},
"dependencies": {
"pxt-core": "0.11.13"
"pxt-core": "0.11.32"
},
"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"
},
@@ -170,7 +171,7 @@
"yottaTarget": "calliope-mini-classic-gcc",
"yottaCorePackage": "microbit",
"githubCorePackage": "calliope-mini/microbit",
"gittag": "v2.0.0-rc7-calliope-p8_1",
"gittag": "v2.0.0-rc7-calliope-p9-2016-2",
"serviceId": "calliope"
},
"serial": {
@@ -196,7 +197,7 @@
"crowdinProject": "kindscript",
"organization": "Microsoft",
"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",
"browserSupport": [
{

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