diff --git a/.github/workflows/pxt-buildtarget.yml b/.github/workflows/pxt-buildtarget.yml new file mode 100644 index 00000000..c0726c87 --- /dev/null +++ b/.github/workflows/pxt-buildtarget.yml @@ -0,0 +1,39 @@ +name: pxt-buildtarget + +on: + push: + branches: + - master + create: + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install + run: | + sudo apt-get install xvfb + sudo npm install -g pxt + npm install + - name: pxt ci + run: | + pxt ci + env: + CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }} + PXT_ACCESS_TOKEN: ${{ secrets.PXT_ACCESS_TOKEN }} + PXT_RELEASE_REPO: ${{ secrets.PXT_RELEASE_REPO }} + NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} + CHROME_BIN: chromium-browser + DISPLAY: :99.0 + CI: true \ No newline at end of file diff --git a/libs/core/_locales/core-jsdoc-strings.json b/libs/core/_locales/core-jsdoc-strings.json index 860eb1e0..98d947e3 100644 --- a/libs/core/_locales/core-jsdoc-strings.json +++ b/libs/core/_locales/core-jsdoc-strings.json @@ -439,6 +439,7 @@ "input.runningTimeMicros": "Gets the number of microseconds elapsed since power on.", "input.setAccelerometerRange": "Sets the accelerometer sample range in gravities.", "input.setAccelerometerRange|param|range": "a value describe the maximum strengh of acceleration measured", + "input.soundLevel": "gets the level of loudness in 0-100%", "input.temperature": "Gets the temperature in Celsius degrees (°C).", "led": "Control of the LED screen.", "led.brightness": "Get the screen brightness from 0 (off) to 255 (full bright).", diff --git a/libs/core/_locales/core-strings.json b/libs/core/_locales/core-strings.json index 582d6a69..7e6c79c8 100644 --- a/libs/core/_locales/core-strings.json +++ b/libs/core/_locales/core-strings.json @@ -327,6 +327,7 @@ "input.runningTimeMicros|block": "running time (micros)", "input.runningTime|block": "running time (ms)", "input.setAccelerometerRange|block": "set accelerometer|range %range", + "input.soundLevel|block": "Loudness", "input.temperature|block": "temperature (°C)", "input|block": "input", "led.brightness|block": "brightness", diff --git a/libs/core/enums.d.ts b/libs/core/enums.d.ts index 089ea4e8..5cdd9788 100644 --- a/libs/core/enums.d.ts +++ b/libs/core/enums.d.ts @@ -470,10 +470,8 @@ declare namespace motors { declare const enum AnalogPin { - P0 = 112, // MICROBIT_ID_IO_P12 P1 = 100, // MICROBIT_ID_IO_P0 P2 = 101, // MICROBIT_ID_IO_P1 - P3 = 116, // MICROBIT_ID_IO_P16 C4 = 103, // MICROBIT_ID_IO_P3 C5 = 104, // MICROBIT_ID_IO_P4 C6 = 110, // MICROBIT_ID_IO_P10 diff --git a/libs/core/pins.cpp b/libs/core/pins.cpp index f2fc4103..47eef73a 100644 --- a/libs/core/pins.cpp +++ b/libs/core/pins.cpp @@ -342,7 +342,7 @@ namespace pins { void analogPitch(int frequency, int ms) { // init pins if needed if (NULL == pitchPin) { - pitchPin = getPin((int)AnalogPin::P0); + pitchPin = getPin((int)DigitalPin::P0); #ifdef SOUND_MIRROR_EXTENSION pitchPin2 = &SOUND_MIRROR_EXTENSION; #endif diff --git a/libs/microphone/_locales/microphone-jsdoc-strings.json b/libs/microphone/_locales/microphone-jsdoc-strings.json index 8f875aee..e8c66916 100644 --- a/libs/microphone/_locales/microphone-jsdoc-strings.json +++ b/libs/microphone/_locales/microphone-jsdoc-strings.json @@ -2,5 +2,5 @@ "input": "Events and data from sensors", "input.onLoudSound": "Registers an event that runs when a loud sound is detected", "input.setLoudSoundThreshold": "Sets the minimum threshold for a loud sound", - "input.soundLevel": "Reads the loudness through the microphone from 0 (silent) to 255 (loud)" + "input.soundLevel": "gets the level of loudness in 0-100%\n\nReads the loudness through the microphone from 0 (silent) to 255 (loud)" } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 278a9c13..f728b6d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "pxt-calliope", - "version": "3.0.22", + "version": "3.0.26", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8600f834..46e32662 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pxt-calliope", - "version": "3.0.22", + "version": "3.0.26", "description": "micro:bit target for Microsoft MakeCode (PXT)", "keywords": [ "JavaScript", @@ -46,6 +46,6 @@ }, "dependencies": { "pxt-common-packages": "7.0.4", - "pxt-core": "6.0.20" + "pxt-core": "6.0.23" } } diff --git a/pxtarget.json b/pxtarget.json index 7b52e407..a19b2d0a 100644 --- a/pxtarget.json +++ b/pxtarget.json @@ -35,6 +35,7 @@ "deployDrives": "MINI", "driveName": "MINI", "hexMimeType": "application/x-microbit-hex", + "moveHexEof": true, "openocdScript": "source [find interface/cmsis-dap.cfg]; source [find target/nrf51.cfg]", "flashUsableEnd": 242688, "flashEnd": 242688, @@ -456,5 +457,6 @@ } } }, - "uploadDocs": true + "uploadDocs": true, + "ignoreDocsErrors": true }