From 0934aa8d13375996834a9928a08ebeabece30333 Mon Sep 17 00:00:00 2001 From: KuraZuzu Date: Mon, 16 Dec 2024 15:55:57 +0900 Subject: [PATCH 1/7] =?UTF-8?q?ci=E3=81=AEubuntu=E3=81=AE=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=9222.04=E3=81=AB?= =?UTF-8?q?=E5=9B=BA=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8506ae..aa8fa0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build Stack-chan Firmware on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 with: From cadb496da31eb49bddd430d3819f40b211732a56 Mon Sep 17 00:00:00 2001 From: KuraZuzu Date: Mon, 16 Dec 2024 16:03:53 +0900 Subject: [PATCH 2/7] =?UTF-8?q?format=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- firmware/mods/face_tracker/mod.js | 1 - firmware/mods/look_around/mod.js | 1 - firmware/mods/mimic_main/mod.js | 5 ++++- firmware/stackchan/ble/beacon-packet.ts | 4 ++-- firmware/stackchan/main.ts | 12 ++++-------- firmware/stackchan/robot.ts | 2 +- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/firmware/mods/face_tracker/mod.js b/firmware/mods/face_tracker/mod.js index 964cde7..3b3b05d 100644 --- a/firmware/mods/face_tracker/mod.js +++ b/firmware/mods/face_tracker/mod.js @@ -1,4 +1,3 @@ - /** * @brief face tracking mod with UnitV2 * @param {*} robot diff --git a/firmware/mods/look_around/mod.js b/firmware/mods/look_around/mod.js index 6445767..898fbea 100644 --- a/firmware/mods/look_around/mod.js +++ b/firmware/mods/look_around/mod.js @@ -1,7 +1,6 @@ import Timer from 'timer' import { randomBetween, asyncWait } from 'stackchan-util' - export function onRobotCreated(robot) { let isFollowing = false robot.button.a.onChanged = function () { diff --git a/firmware/mods/mimic_main/mod.js b/firmware/mods/mimic_main/mod.js index 39747c9..0d7e00d 100644 --- a/firmware/mods/mimic_main/mod.js +++ b/firmware/mods/mimic_main/mod.js @@ -41,7 +41,10 @@ function onRobotCreated(robot) { service.txt['yaw'] = yaw service.txt['pitch'] = pitch mdns.update(service) - trace(yaw);trace(" ");trace(pitch);trace("\n\r"); + trace(yaw) + trace(' ') + trace(pitch) + trace('\n\r') } }, 100) } diff --git a/firmware/stackchan/ble/beacon-packet.ts b/firmware/stackchan/ble/beacon-packet.ts index 4fb6d50..6a0a661 100644 --- a/firmware/stackchan/ble/beacon-packet.ts +++ b/firmware/stackchan/ble/beacon-packet.ts @@ -43,8 +43,8 @@ export class BeaconDataPacket { success: false, reason: 'invalid length', } - }else{ - trace('${payload}') + } else { + trace('${payload}') } if (payload[0] !== 0x02 || payload[1] !== 0x15) { return { diff --git a/firmware/stackchan/main.ts b/firmware/stackchan/main.ts index 316125b..a62d21a 100644 --- a/firmware/stackchan/main.ts +++ b/firmware/stackchan/main.ts @@ -13,8 +13,7 @@ import { Renderer as SimpleRenderer } from 'simple-face' import { NetworkService } from 'network-service' import Touch from 'touch' import { loadPreferences, asyncWait } from 'stackchan-util' -import TextDecoder from 'text/decoder' - +import TextDecoder from 'text/decoder' function createRobot() { const decoder = new TextDecoder() @@ -24,9 +23,7 @@ function createRobot() { ['voicevox', VoiceVoxTTS], ['elevenlabs', ElevenLabsTTS], ]) - const renderers = new Map Renderer>([ - ['simple', SimpleRenderer], - ]) + const renderers = new Map Renderer>([['simple', SimpleRenderer]]) // TODO: select driver/tts/renderer by mod @@ -34,7 +31,7 @@ function createRobot() { // Servo Driver const driverPrefs = loadPreferences('driver') - const driverKey = "dynamixel" + const driverKey = 'dynamixel' const Driver = DynamixelDriver // TTS @@ -47,7 +44,7 @@ function createRobot() { const rendererKey = rendererPrefs.type ?? 'simple' const Renderer = renderers.get(rendererKey) - if ( !TTS || !Renderer) { + if (!TTS || !Renderer) { for (const [key, klass] of [ [ttsKey, TTS], [rendererKey, Renderer], @@ -59,7 +56,6 @@ function createRobot() { throw new Error(errors.join('\n')) } - const driver = new DynamixelDriver(driverPrefs) const renderer = new Renderer(rendererPrefs) const tts = new TTS(ttsPrefs) diff --git a/firmware/stackchan/robot.ts b/firmware/stackchan/robot.ts index abf0f9d..6a56f53 100644 --- a/firmware/stackchan/robot.ts +++ b/firmware/stackchan/robot.ts @@ -247,7 +247,7 @@ export class Robot { }) } - decode(buffer){ + decode(buffer) { return this.#decoder.decode(buffer) } From b22eafe64c42d3d295067c9de048bccc95dddab9 Mon Sep 17 00:00:00 2001 From: KuraZuzu Date: Mon, 16 Dec 2024 16:08:27 +0900 Subject: [PATCH 3/7] =?UTF-8?q?CI=E3=81=AEgh-pages=E3=81=AB=E9=96=A2?= =?UTF-8?q?=E3=81=99=E3=82=8B=E9=A0=85=E7=9B=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/bundle.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bundle.yml b/.github/workflows/bundle.yml index 7918c70..5a7c91b 100644 --- a/.github/workflows/bundle.yml +++ b/.github/workflows/bundle.yml @@ -1,14 +1,14 @@ name: Bundle Stack-chan Firmware -on: +on: push: branches: - - dev/v1.0 + - main pull_request: branches: - - dev/v1.0 + - main jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 with: @@ -39,7 +39,7 @@ jobs: deploy: needs: build - if: github.event_name == 'push' && github.ref == 'refs/heads/dev/v1.0' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Checkout Pages Branch @@ -62,4 +62,4 @@ jobs: git config --global user.email 'action@github.com' git add . git commit -m "Deploy firmware bundle from ${{ github.sha }}" - git push + git push \ No newline at end of file From 296c260c4f1d42122d268053a73c7164480d5d71 Mon Sep 17 00:00:00 2001 From: KuraZuzu Date: Mon, 16 Dec 2024 16:10:39 +0900 Subject: [PATCH 4/7] =?UTF-8?q?ci=E3=81=AEschematics=E3=81=AB=E3=81=8A?= =?UTF-8?q?=E3=81=91=E3=82=8Bubuntu=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/schematics.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/schematics.yml b/.github/workflows/schematics.yml index 13a122c..eef3752 100644 --- a/.github/workflows/schematics.yml +++ b/.github/workflows/schematics.yml @@ -12,7 +12,7 @@ on: - '.github/workflows/schematics.yml' jobs: build-schematics: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - uses: INTI-CMNB/KiBot@v2_k7 @@ -29,7 +29,7 @@ jobs: deploy-schematics: needs: build-schematics if: github.event_name == 'push' && github.ref == 'refs/heads/dev/v1.0' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout Pages Branch uses: actions/checkout@v3 From 439234686c90d6488267536686018d0a3020225d Mon Sep 17 00:00:00 2001 From: KuraZuzu Date: Mon, 16 Dec 2024 16:16:50 +0900 Subject: [PATCH 5/7] =?UTF-8?q?=E8=A8=AD=E8=A8=88=E5=9B=B3=E3=81=AB?= =?UTF-8?q?=E9=96=A2=E3=81=99=E3=82=8BCI=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/schematics.yml | 54 -------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 .github/workflows/schematics.yml diff --git a/.github/workflows/schematics.yml b/.github/workflows/schematics.yml deleted file mode 100644 index eef3752..0000000 --- a/.github/workflows/schematics.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Generate Stack-chan Schematics Files -on: - push: - paths: - - '**.kicad_sch' - - '**.kicad_pcb' - - '.github/workflows/schematics.yml' - pull_request: - paths: - - '**.kicad_sch' - - '**.kicad_pcb' - - '.github/workflows/schematics.yml' -jobs: - build-schematics: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - - uses: INTI-CMNB/KiBot@v2_k7 - with: - config: schematics/m5-pantilt/m5-pantilt.kibot.yaml - schema: schematics/m5-pantilt/m5-pantilt.kicad_sch - board: schematics/m5-pantilt/m5-pantilt.kicad_pcb - dir: generated - - name: Upload Results - uses: actions/upload-artifact@v2 - with: - name: schematics-files - path: generated - deploy-schematics: - needs: build-schematics - if: github.event_name == 'push' && github.ref == 'refs/heads/dev/v1.0' - runs-on: ubuntu-22.04 - steps: - - name: Checkout Pages Branch - uses: actions/checkout@v3 - with: - ref: gh-pages - - name: Download Schematics Files - uses: actions/download-artifact@v2 - with: - name: schematics-files - path: ./schematics-files - - name: Move Files - run: | - mkdir -p ./web/schematics - rm -rf ./web/schematics/* - mv schematics-files/* ./web/schematics - - name: Commit and Push - run: | - git config --global user.name 'GitHub Action' - git config --global user.email 'action@github.com' - git add . - git commit -m "Deploy schematics files from ${{ github.sha }}" - git push From 85d6e7c920f5f73259f6096c730496c9c6abbcf9 Mon Sep 17 00:00:00 2001 From: KuraZuzu Date: Mon, 16 Dec 2024 16:59:44 +0900 Subject: [PATCH 6/7] =?UTF-8?q?GitHub=20Actions=E3=81=AE=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=922=E3=81=8B=E3=82=893?= =?UTF-8?q?=E3=81=AB=E3=82=A2=E3=83=83=E3=83=97=E3=83=87=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/bundle.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bundle.yml b/.github/workflows/bundle.yml index 5a7c91b..46c191d 100644 --- a/.github/workflows/bundle.yml +++ b/.github/workflows/bundle.yml @@ -19,7 +19,7 @@ jobs: git diff --quiet HEAD^ HEAD -- ./firmware/ || echo "::set-output name=diff_detected::true" - name: Cache build results id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ./firmware/stackchan/tech.moddable.stackchan key: ${{ github.sha }} @@ -32,7 +32,7 @@ jobs: working-directory: ./firmware - name: Upload Firmware Bundle if: steps.diff_check.outputs.diff_detected || steps.cache.outputs.cache-hit != 'true' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: firmware-bundle path: ./firmware/stackchan/tech.moddable.stackchan @@ -47,7 +47,7 @@ jobs: with: ref: gh-pages - name: Download Firmware Bundle - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: firmware-bundle path: ./firmware-bundle From f92c3764fba9d2b77db84d9c4cdfacc9eadefbbe Mon Sep 17 00:00:00 2001 From: KuraZuzu Date: Mon, 16 Dec 2024 17:15:51 +0900 Subject: [PATCH 7/7] =?UTF-8?q?actions=E3=81=AEupload-artifact=E3=81=A8dow?= =?UTF-8?q?nload-artifact=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=82=923=E3=81=8B=E3=82=894=E3=81=AB=E4=B8=8A?= =?UTF-8?q?=E3=81=92=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/bundle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bundle.yml b/.github/workflows/bundle.yml index 46c191d..cee8df6 100644 --- a/.github/workflows/bundle.yml +++ b/.github/workflows/bundle.yml @@ -32,7 +32,7 @@ jobs: working-directory: ./firmware - name: Upload Firmware Bundle if: steps.diff_check.outputs.diff_detected || steps.cache.outputs.cache-hit != 'true' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: firmware-bundle path: ./firmware/stackchan/tech.moddable.stackchan @@ -47,7 +47,7 @@ jobs: with: ref: gh-pages - name: Download Firmware Bundle - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: firmware-bundle path: ./firmware-bundle