From 4376d3cefedfa649c20b7244663e4c00ed823554 Mon Sep 17 00:00:00 2001 From: "Matthias L. Jugel" Date: Sat, 4 Feb 2017 14:26:21 +0100 Subject: [PATCH] fix typos, fix accelerometer --- libs/calliope-test/calliope.ts | 6 +++--- libs/core/_locales/core-strings.json | 10 +++++----- pxtarget.json | 2 +- sim/state/accelerometer.ts | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libs/calliope-test/calliope.ts b/libs/calliope-test/calliope.ts index 2b7b5dad..5fa3f3b9 100644 --- a/libs/calliope-test/calliope.ts +++ b/libs/calliope-test/calliope.ts @@ -138,7 +138,7 @@ function getNoteName(frequency: number): string { } } -var notes = [ +let notes = [ note(Note.E, BeatFraction.Quarter), note(Note.E, BeatFraction.Quarter), note(Note.F, BeatFraction.Quarter), note(Note.G, BeatFraction.Quarter), note(Note.G, BeatFraction.Quarter), note(Note.F, BeatFraction.Quarter), note(Note.E, BeatFraction.Quarter), note(Note.D, BeatFraction.Quarter), note(Note.C, BeatFraction.Quarter), @@ -166,8 +166,8 @@ var notes = [ note(Note.C, BeatFraction.Eighth), note(Note.C, BeatFraction.Half) ]; -for (var t = 0; t < notes.length; t++) { +for (let t = 0; t < notes.length; t++) { music.playTone(notes[t][0], notes[t][1]); basic.showString(getNoteName(notes[t][0])); music.rest(whole - notes[t][1]); -} \ No newline at end of file +} diff --git a/libs/core/_locales/core-strings.json b/libs/core/_locales/core-strings.json index 5e5444b0..ea60d955 100644 --- a/libs/core/_locales/core-strings.json +++ b/libs/core/_locales/core-strings.json @@ -88,13 +88,13 @@ "PinPullMode.PullUp|block": "up", "Rotation.Pitch|block": "pitch", "Rotation.Roll|block": "roll", - "String.charAt|block": "char from %this|at %pos", - "String.compare|block": "compare %this| to %that", - "String.concat|block": "join %this|%other", + "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| is empty", + "String.isEmpty|block": "%this=text| is empty", "String.length|block": "length of %VALUE", - "String.substr|block": "substring of %this|from %start|of length %length", + "String.substr|block": "substring of %this=text|from %start|of length %length", "String|block": "String", "basic.clearScreen|block": "clear screen", "basic.color|block": "%c", diff --git a/pxtarget.json b/pxtarget.json index a0c9928b..0108b70e 100644 --- a/pxtarget.json +++ b/pxtarget.json @@ -170,7 +170,7 @@ "yottaTarget": "bbc-microbit-classic-gcc", "yottaCorePackage": "microbit", "githubCorePackage": "calliope-mini/microbit", - "gittag": "2.0.0-rc7-calliope-p3", + "gittag": "2.0.0-rc7-calliope-p6", "serviceId": "microbit" }, "serial": { diff --git a/sim/state/accelerometer.ts b/sim/state/accelerometer.ts index b1a01257..6acbf1a7 100644 --- a/sim/state/accelerometer.ts +++ b/sim/state/accelerometer.ts @@ -223,10 +223,10 @@ namespace pxsim { return DAL.MICROBIT_ACCELEROMETER_EVT_TILT_UP; if (this.getZ() < (-1000 + DAL.MICROBIT_ACCELEROMETER_TILT_TOLERANCE)) - return DAL.MICROBIT_ACCELEROMETER_EVT_FACE_UP; + return DAL.MICROBIT_ACCELEROMETER_EVT_FACE_DOWN; if (this.getZ() > (1000 - DAL.MICROBIT_ACCELEROMETER_TILT_TOLERANCE)) - return DAL.MICROBIT_ACCELEROMETER_EVT_FACE_DOWN; + return DAL.MICROBIT_ACCELEROMETER_EVT_FACE_UP; return 0; }