Bump V3.0.22 (#110)

* change simulator svg

* change radio image

* Remove google fonts cdn

* change color of 'advanced' button

* font fix

* font fix 2

* display fix

* change fullsceen simulator bg

* Continuous servo

* handle continuous state

* adding shims

* update rendering for continuous servos

* fixing sim

* fix sig

* typo

* fix sim

* bump pxt

* bump pxt

* rerun travis

* Input blocks revision

- add Button and Pin event types
- merge onPinPressed & onPinReleased in new onPinEvent function
- create new onButtonEvent function

* update input blocks in docs and tests

* remove device_pin_release block

* Hide DAL.x behind Enum

* bring back deprecated blocks, but hide them

* shims and locales files

* fix input.input. typing

* remove buildpr

* bump V3

* update simulator aspect ratio

* add Loudness Block

* revoke loudness block

* Adds soundLevel

To be replaced by pxt-common-packages when DAL is updated.

* Remove P0 & P3 from AnalogPin

Co-authored-by: Juri <gitkraken@juriwolf.de>
This commit is contained in:
Amerlander
2020-09-08 11:04:25 +02:00
committed by GitHub
parent 98d8b2977b
commit 918af4f3ac
233 changed files with 9391 additions and 2739 deletions

View File

@ -0,0 +1,6 @@
{
"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)"
}

View File

@ -0,0 +1,10 @@
{
"LoudnessCondition.Loud|block": "loud",
"LoudnessCondition.Quiet|block": "quiet",
"input.onLoudSound|block": "on loud sound",
"input.setLoudSoundThreshold|block": "set loud sound threshold %value",
"input.soundLevel|block": "sound level",
"input|block": "input",
"{id:category}Input": "Input",
"{id:group}More": "More"
}

14
libs/microphone/pxt.json Normal file
View File

@ -0,0 +1,14 @@
{
"additionalFilePath": "../../node_modules/pxt-common-packages/libs/microphone",
"files": [
"README.md",
"microphone.cpp",
"microphonehw.cpp",
"enums.d.ts",
"shims.d.ts"
],
"hidden": true,
"dependencies": {
"core": "file:../core"
}
}

33
libs/microphone/shims.d.ts vendored Normal file
View File

@ -0,0 +1,33 @@
// Auto-generated. Do not edit.
declare namespace input {
/**
* Registers an event that runs when a loud sound is detected
*/
//% help=input/on-loud-sound
//% blockId=input_on_loud_sound block="on loud sound"
//% parts="microphone"
//% weight=88 blockGap=12 shim=input::onLoudSound
function onLoudSound(handler: () => void): void;
/**
* Reads the loudness through the microphone from 0 (silent) to 255 (loud)
*/
//% help=input/sound-level
//% blockId=device_get_sound_level block="sound level"
//% parts="microphone"
//% weight=34 blockGap=8 shim=input::soundLevel
function soundLevel(): int32;
/**
* Sets the minimum threshold for a loud sound
*/
//% help=input/set-loud-sound-threshold
//% blockId=input_set_loud_sound_threshold block="set loud sound threshold %value"
//% parts="microphone"
//% value.min=1 value.max=255
//% group="More" weight=14 blockGap=8 shim=input::setLoudSoundThreshold
function setLoudSoundThreshold(value: int32): void;
}
// Auto-generated. Do not edit. Really.