Skip to content

Commit

Permalink
disable ble, always (#105)
Browse files Browse the repository at this point in the history
* disable ble, always

* disable bluetoot-transport

* fixing calliope build

* disable calliope on jukebox

* try node upgrade

* file formatting
  • Loading branch information
pelikhan authored Jan 12, 2024
1 parent b16189c commit 82c2f61
Show file tree
Hide file tree
Showing 17 changed files with 248 additions and 226 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/makecode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,20 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
- name: npm install
run: |
npm install -g [email protected]
- run: makecode -u -j --mono-repo -c mkc.json
- run: makecode -u -j --mono-repo -c mkc-maker.json
- run: makecode -u -j --mono-repo -c mkc-arcade.json
- run: makecode -u -j --mono-repo -c mkc-calliope.json
- run: makecode -c mkc.json
- run: makecode -c mkc-maker.json --hw nucleo-f411re
- run: makecode -c mkc-arcade.json --hw F4,D5,N4,N3
Expand Down
2 changes: 1 addition & 1 deletion accelerometer/pxt.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"test.microbit.ts"
],
"fileDependencies": {
"test.microbit.ts": "target:microbit || target:calliopemini"
"test.microbit.ts": "target:microbit"
}
}
File renamed without changes.
3 changes: 1 addition & 2 deletions buzzer-server/pxt.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
],
"supportedTargets": [
"microbit",
"arcade",
"calliopemini"
"arcade"
],
"preferredEditor": "tsprj"
}
3 changes: 1 addition & 2 deletions devices/microbit/pxt.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
"targetId": "microbit"
},
"supportedTargets": [
"microbit",
"calliopemini"
"microbit"
],
"preferredEditor": "tsprj"
}
63 changes: 0 additions & 63 deletions p-ccontroller/constants.ts

This file was deleted.

22 changes: 0 additions & 22 deletions p-ccontroller/pxt.g.json

This file was deleted.

77 changes: 0 additions & 77 deletions p-cmonitor/constants.ts

This file was deleted.

22 changes: 0 additions & 22 deletions p-cmonitor/pxt.g.json

This file was deleted.

86 changes: 86 additions & 0 deletions pccontroller/client.g.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
namespace modules {
/**
* Send various events to PC, including opening a URL, start an app, sending text, etc.
**/
//% fixedInstances blockGap=8
export class PCControllerClient extends jacdac.Client {
constructor(role: string) {
super(jacdac.SRV_PCCONTROLLER, role)
}

/**
* Open a URL in the default browser.
*/
//% group="PC controller"
//% blockId=jacdac_pccontroller_open_url_cmd
//% block="%pccontroller open url $url"
//% weight=100
openUrl(url: string): void {
this.start()
this.sendCommand(
jacdac.JDPacket.jdpacked(
jacdac.PCControllerCmd.OpenUrl,
jacdac.PCControllerCmdPack.OpenUrl,
[url]
)
)
}

/**
* Start an app.
*/
//% group="PC controller"
//% blockId=jacdac_pccontroller_start_app_cmd
//% block="%pccontroller start app $name"
//% weight=99
startApp(name: string): void {
this.start()
this.sendCommand(
jacdac.JDPacket.jdpacked(
jacdac.PCControllerCmd.StartApp,
jacdac.PCControllerCmdPack.StartApp,
[name]
)
)
}

/**
* Send text to the active window.
*/
//% group="PC controller"
//% blockId=jacdac_pccontroller_send_text_cmd
//% block="%pccontroller send text $text"
//% weight=98
sendText(text: string): void {
this.start()
this.sendCommand(
jacdac.JDPacket.jdpacked(
jacdac.PCControllerCmd.SendText,
jacdac.PCControllerCmdPack.SendText,
[text]
)
)
}

/**
* Run a script.
*/
//% group="PC controller"
//% blockId=jacdac_pccontroller_run_script_cmd
//% block="%pccontroller run script $script"
//% weight=97
runScript(script: string): void {
this.start()
this.sendCommand(
jacdac.JDPacket.jdpacked(
jacdac.PCControllerCmd.RunScript,
jacdac.PCControllerCmdPack.RunScript,
[script]
)
)
}
}

//% fixedInstance whenUsed weight=1 block="pccontroller1"
export const PCController1 = new PCControllerClient("PCController1")
}
18 changes: 4 additions & 14 deletions pccontroller/pxt.g.json → pccontroller/pxt.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,11 @@
"name": "jacdac-pccontroller",
"version": "0.0.0",
"description": "Send various events to PC, including opening a URL, start an app, sending text, etc.",
"files": [
"constants.ts",
"client.g.ts"
],
"testFiles": [
"test.ts"
],
"supportedTargets": [
"microbit",
"arcade",
"maker",
"calliopemini"
],
"files": ["constants.ts", "client.g.ts"],
"testFiles": [],
"supportedTargets": ["microbit", "arcade", "maker", "calliopemini"],
"dependencies": {
"core": "*",
"jacdac": "github:microsoft/pxt-jacdac"
}
}
}
Loading

0 comments on commit 82c2f61

Please sign in to comment.