-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* disable ble, always * disable bluetoot-transport * fixing calliope build * disable calliope on jukebox * try node upgrade * file formatting
- Loading branch information
Showing
17 changed files
with
248 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,7 @@ | |
], | ||
"supportedTargets": [ | ||
"microbit", | ||
"arcade", | ||
"calliopemini" | ||
"arcade" | ||
], | ||
"preferredEditor": "tsprj" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.