Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion libs/radio/shims.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
//% color=#E3008C weight=96 icon="\uf012"
declare namespace radio {

/**
* Disables the radio for use as a multipoint sender/receiver.
* Disabling radio will help conserve battery power when it is not in use.
*/
//% help=radio/off shim=radio::off
function off(): void;

/**
* Initialises the radio for use as a multipoint sender/receiver
* Only useful when the radio.off() is used beforehand.
*/
//% help=radio/on shim=radio::on
function on(): void;

/**
* Sends an event over radio to neigboring devices
*/
Expand Down Expand Up @@ -44,7 +58,8 @@ declare namespace radio {
//% help=radio/set-group
//% weight=100
//% blockId=radio_set_group block="radio set group %ID"
//% id.min=0 id.max=255 shim=radio::setGroup
//% id.min=0 id.max=255
//% group="Group" shim=radio::setGroup
function setGroup(id: int32): void;

/**
Expand Down
12,278 changes: 8,369 additions & 3,909 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,21 @@
"docs/static/icons/favicon.ico"
],
"devDependencies": {
"@types/dom-mediacapture-record": "1.0.20",
"@types/marked": "0.3.0",
"@types/node": "8.10.66",
"@types/react": "16.4.7",
"@types/react-dom": "16.0.3",
"@types/web-bluetooth": "0.0.4",
"less": "3.13.1",
"react": "16.8.3",
"react-dom": "16.11.0",
"semantic-ui-less": "2.4.1",
"typescript": "^4.2.3"
"typescript": "4.8.3"
},
"dependencies": {
"pxt-common-packages": "10.1.1",
"pxt-core": "8.1.1",
"webusb": "^1.1.1"
"pxt-common-packages": "13.0.0",
"pxt-core": "12.0.1"
},
"scripts": {
"test": "node node_modules/pxt-core/built/pxt.js travis",
Expand Down
10 changes: 1 addition & 9 deletions pxtarget.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,7 @@
"aspectRatio": 1.0,
"parts": true,
"partsAspectRatio": 0.69,
"dynamicBoardDefinition": true,
"messageSimulators": {
"jacdac": {
"url": "https://microsoft.github.io/jacdac-docs/tools/makecode-sim?webusb=0&parentOrigin=$PARENT_ORIGIN$",
"localHostUrl": "http://localhost:8000/tools/makecode-sim?webusb=0&parentOrigin=$PARENT_ORIGIN$",
"aspectRatio": 0.89,
"permanent": true
}
}
"dynamicBoardDefinition": true
},
"cloud": {
"workspace": false,
Expand Down
6 changes: 3 additions & 3 deletions sim/dalboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace pxsim {
storageState: StorageState;
thermometerState: AnalogSensorState;
thermometerUnitState: TemperatureUnit;
microphoneState: AnalogSensorState;
microphoneState: MicrophoneState;
screenState: ScreenState;
irState: InfraredState;
lcdState: LCDState;
Expand Down Expand Up @@ -103,7 +103,7 @@ namespace pxsim {
}

this.lightState = {};
this.microphoneState = new AnalogSensorState(DAL.DEVICE_ID_MICROPHONE, 52, 120, 75, 96);
this.microphoneState = new MicrophoneState(DAL.DEVICE_ID_MICROPHONE, 52, 120, 75, 96);
this.storageState = new StorageState();
this.lightSensorState = new AnalogSensorState(DAL.DEVICE_ID_LIGHT_SENSOR, 0, 255, 128 / 4, 896 / 4);
this.thermometerState = new AnalogSensorState(DAL.DEVICE_ID_THERMOMETER, -20, 50, 10, 30);
Expand Down Expand Up @@ -278,4 +278,4 @@ namespace pxsim {
}
}
}
}
}
14 changes: 10 additions & 4 deletions sim/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@
"noImplicitAny": true,
"noImplicitReturns": true,
"declaration": true,
"out": "../built/sim.js",
"rootDir": ".",
"outFile": "../built/sim.js",
"rootDir": "..",
"newLine": "LF",
"moduleResolution": "node",
"sourceMap": false,
"typeRoots": ["../node_modules/@types"]
"lib": [
"dom",
"dom.iterable",
"scripthost",
"es2017"
]
}
}
}
14 changes: 11 additions & 3 deletions targetconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"approvedOrgs": ["Microsoft"],
"approvedRepos": [
"microsoft/pxt-jacdac",
"jacdac/pxt-jacdac",
"microsoft/pxt-ml4f",
"Adafruit/pxt-crickit",
"Adafruit/pxt-seesaw",
Expand All @@ -11,20 +12,27 @@
"ElectronicCats/pxt-lora"
],
"preferredRepos": [
"microsoft/pxt-jacdac",
"jacdac/pxt-jacdac",
"Adafruit/pxt-crickit",
"Adafruit/pxt-seesaw",
"ElectronicCats/pxt-bme280",
"ElectronicCats/pxt-airQuality",
"ElectronicCats/pxt-lora"
],
"approvedEditorExtensionUrls": [
"https://microsoft.github.io/jacdac-docs/tools/makecode-editor-extension",
"https://microsoft.github.io/ml4f/"
],
"approvedRepoLib": {
"jacdac/pxt-jacdac": {
"preferred": true,
"simx": {
"sha": "1ef117792fecdb6ce91165cc67ff855e540a589a",
"devUrl": "https://jacdac.github.io/jacdac-docs/tools/makecode-sim/"
}
},
"microsoft/pxt-jacdac": {
"preferred": true
"upgrades": [ "move:jacdac/pxt-jacdac" ],
"hidden": true
},
"microsoft/pxt-ml4f": {},
"adafruit/pxt-crickit": {
Expand Down