mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 17:03:42 +00:00
ota suppor
This commit is contained in:
15
src/routes/(app)/ota-update/+page.svelte
Normal file
15
src/routes/(app)/ota-update/+page.svelte
Normal file
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { serialPort } from "$lib/serial/connection";
|
||||
|
||||
let files: FileList | null = $state(null);
|
||||
|
||||
$effect(() => {
|
||||
const file = files?.[0];
|
||||
if (file && $serialPort) {
|
||||
|
||||
$serialPort.updateFirmware(file);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<input type="file" accept=".bin" bind:files />
|
||||
Reference in New Issue
Block a user