Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/bundle.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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 }}
Expand All @@ -32,22 +32,22 @@ 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@v4
with:
name: firmware-bundle
path: ./firmware/stackchan/tech.moddable.stackchan

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
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Download Firmware Bundle
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: firmware-bundle
path: ./firmware-bundle
Expand All @@ -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
54 changes: 0 additions & 54 deletions .github/workflows/schematics.yml

This file was deleted.

1 change: 0 additions & 1 deletion firmware/mods/face_tracker/mod.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/**
* @brief face tracking mod with UnitV2
* @param {*} robot
Expand Down
1 change: 0 additions & 1 deletion firmware/mods/look_around/mod.js
Original file line number Diff line number Diff line change
@@ -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 () {
Expand Down
5 changes: 4 additions & 1 deletion firmware/mods/mimic_main/mod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions firmware/stackchan/ble/beacon-packet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 4 additions & 8 deletions firmware/stackchan/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -24,17 +23,15 @@ function createRobot() {
['voicevox', VoiceVoxTTS],
['elevenlabs', ElevenLabsTTS],
])
const renderers = new Map<string, new (param: unknown) => Renderer>([
['simple', SimpleRenderer],
])
const renderers = new Map<string, new (param: unknown) => Renderer>([['simple', SimpleRenderer]])

// TODO: select driver/tts/renderer by mod

const errors: string[] = []

// Servo Driver
const driverPrefs = loadPreferences('driver')
const driverKey = "dynamixel"
const driverKey = 'dynamixel'
const Driver = DynamixelDriver

// TTS
Expand All @@ -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],
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion firmware/stackchan/robot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export class Robot {
})
}

decode(buffer){
decode(buffer) {
return this.#decoder.decode(buffer)
}

Expand Down
Loading