Skip to content

Commit

Permalink
fixing calliope build
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Jan 12, 2024
1 parent 479d9ea commit 8d7b090
Show file tree
Hide file tree
Showing 14 changed files with 192 additions and 193 deletions.
1 change: 1 addition & 0 deletions .github/workflows/makecode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- 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"
}
}
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.

68 changes: 68 additions & 0 deletions pccontroller/client.g.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
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");
}
File renamed without changes.
Loading

0 comments on commit 8d7b090

Please sign in to comment.