mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 17:03:42 +00:00
auto-sync
This commit is contained in:
@@ -5,3 +5,9 @@ export const serialPort = writable()
|
||||
|
||||
/** @type {import('svelte/store').Writable<Array<{type: 'input' | 'output' | 'system'; value: string}>>} */
|
||||
export const serialLog = writable([])
|
||||
|
||||
/** @type {import('svelte/store').Writable<Array<{actions: number[]; phrase: string}>>} */
|
||||
export const chords = writable([])
|
||||
|
||||
/** @type {import('svelte/store').Writable<boolean>} */
|
||||
export const syncing = writable(false)
|
||||
|
||||
@@ -61,6 +61,7 @@ export class CharaDevice {
|
||||
*/
|
||||
async #read() {
|
||||
return this.#reader.then(async it => {
|
||||
/** @type {string} */
|
||||
const result = await it.read().then(({value}) => value)
|
||||
serialLog.update(it => {
|
||||
it.push({
|
||||
|
||||
Reference in New Issue
Block a user