feat: add refresh button

resolves #82
This commit is contained in:
2024-01-05 00:12:42 +01:00
parent 5fa4b1fd09
commit 06b83f79ef
5 changed files with 32 additions and 12 deletions

View File

@@ -55,6 +55,12 @@ export async function initSerial(manual = false) {
const device = get(serialPort) ?? new CharaDevice()
await device.init(manual)
serialPort.set(device)
sync()
}
export async function sync() {
const device = get(serialPort)
if (!device) return
const chordCount = await device.getChordCount()
syncStatus.set("downloading")