sync
This commit is contained in:
36
README.md
36
README.md
@@ -0,0 +1,36 @@
|
||||
# Buzzer
|
||||
|
||||
## Protokoll
|
||||
|
||||
- Aktuelle Protokollversion: **v2**
|
||||
- Firmware sendet die Version über `info` als erstes Feld.
|
||||
- Host (`buzzer_tool`) erwartet ebenfalls **v2** und bricht bei Abweichung mit Fehlermeldung ab.
|
||||
|
||||
### `info` Antwortformat
|
||||
|
||||
`<protocol_version>;<app_version>;<f_frsize>;<f_blocks>;<f_bfree>;<image_status>`
|
||||
|
||||
Beispiel:
|
||||
|
||||
`2;1.4.0;4096;256;120;CONFIRMED`
|
||||
|
||||
## UART Rückgabecodes
|
||||
|
||||
- Erfolg: `OK`
|
||||
- Fehler: `ERR <code>`
|
||||
|
||||
Wichtige Fehlercodes:
|
||||
|
||||
- `1` Ungültiger Befehl
|
||||
- `2` Ungültige Parameter
|
||||
- `3` Befehl/Parameter zu lang
|
||||
- `16` Datei/Verzeichnis nicht gefunden
|
||||
- `21` Kein Speicherplatz mehr frei
|
||||
- `22` Datei zu groß
|
||||
- `32` I/O-Fehler
|
||||
- `33` Timeout
|
||||
- `34` CRC-Fehler
|
||||
- `35` Transfer abgebrochen
|
||||
- `48` Nicht unterstützt
|
||||
- `49` Gerät beschäftigt
|
||||
- `50` Interner Fehler
|
||||
|
||||
24
webpage/.gitignore
vendored
Normal file
24
webpage/.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
||||
|
||||
# jetbrains setting folder
|
||||
.idea/
|
||||
43
webpage/README.md
Normal file
43
webpage/README.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Astro Starter Kit: Minimal
|
||||
|
||||
```sh
|
||||
npm create astro@latest -- --template minimal
|
||||
```
|
||||
|
||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
||||
|
||||
## 🚀 Project Structure
|
||||
|
||||
Inside of your Astro project, you'll see the following folders and files:
|
||||
|
||||
```text
|
||||
/
|
||||
├── public/
|
||||
├── src/
|
||||
│ └── pages/
|
||||
│ └── index.astro
|
||||
└── package.json
|
||||
```
|
||||
|
||||
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
|
||||
|
||||
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
|
||||
|
||||
Any static assets, like images, can be placed in the `public/` directory.
|
||||
|
||||
## 🧞 Commands
|
||||
|
||||
All commands are run from the root of the project, from a terminal:
|
||||
|
||||
| Command | Action |
|
||||
| :------------------------ | :----------------------------------------------- |
|
||||
| `npm install` | Installs dependencies |
|
||||
| `npm run dev` | Starts local dev server at `localhost:4321` |
|
||||
| `npm run build` | Build your production site to `./dist/` |
|
||||
| `npm run preview` | Preview your build locally, before deploying |
|
||||
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
|
||||
| `npm run astro -- --help` | Get help using the Astro CLI |
|
||||
|
||||
## 👀 Want to learn more?
|
||||
|
||||
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
|
||||
15
webpage/astro.config.mjs
Normal file
15
webpage/astro.config.mjs
Normal file
@@ -0,0 +1,15 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from 'astro/config';
|
||||
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
|
||||
import svelte from '@astrojs/svelte';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
vite: {
|
||||
plugins: [tailwindcss()]
|
||||
},
|
||||
|
||||
integrations: [svelte()]
|
||||
});
|
||||
6245
webpage/package-lock.json
generated
Normal file
6245
webpage/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
20
webpage/package.json
Normal file
20
webpage/package.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "webpage",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/svelte": "^7.2.5",
|
||||
"@phosphor-icons/core": "^2.1.1",
|
||||
"@tailwindcss/vite": "^4.2.1",
|
||||
"astro": "^5.17.1",
|
||||
"svelte": "^5.53.5",
|
||||
"tailwindcss": "^4.2.1",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
BIN
webpage/public/favicon.ico
Normal file
BIN
webpage/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 655 B |
9
webpage/public/favicon.svg
Normal file
9
webpage/public/favicon.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 128 128">
|
||||
<path d="M50.4 78.5a75.1 75.1 0 0 0-28.5 6.9l24.2-65.7c.7-2 1.9-3.2 3.4-3.2h29c1.5 0 2.7 1.2 3.4 3.2l24.2 65.7s-11.6-7-28.5-7L67 45.5c-.4-1.7-1.6-2.8-2.9-2.8-1.3 0-2.5 1.1-2.9 2.7L50.4 78.5Zm-1.1 28.2Zm-4.2-20.2c-2 6.6-.6 15.8 4.2 20.2a17.5 17.5 0 0 1 .2-.7 5.5 5.5 0 0 1 5.7-4.5c2.8.1 4.3 1.5 4.7 4.7.2 1.1.2 2.3.2 3.5v.4c0 2.7.7 5.2 2.2 7.4a13 13 0 0 0 5.7 4.9v-.3l-.2-.3c-1.8-5.6-.5-9.5 4.4-12.8l1.5-1a73 73 0 0 0 3.2-2.2 16 16 0 0 0 6.8-11.4c.3-2 .1-4-.6-6l-.8.6-1.6 1a37 37 0 0 1-22.4 2.7c-5-.7-9.7-2-13.2-6.2Z" />
|
||||
<style>
|
||||
path { fill: #000; }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
path { fill: #FFF; }
|
||||
}
|
||||
</style>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 749 B |
0
webpage/src/components/DiskUsage.astro
Normal file
0
webpage/src/components/DiskUsage.astro
Normal file
0
webpage/src/components/FileRow.astro
Normal file
0
webpage/src/components/FileRow.astro
Normal file
73
webpage/src/pages/index.astro
Normal file
73
webpage/src/pages/index.astro
Normal file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
import "../styles/global.css";
|
||||
import DiskUsage from '../components/DiskUsage.astro';
|
||||
import FileRow from '../components/FileRow.astro';
|
||||
---
|
||||
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Buzzer Dashboard v2</title>
|
||||
</head>
|
||||
<body class="bg-slate-900 selection:bg-blue-500/30">
|
||||
<div class="min-h-screen max-w-[1600px] min-w-[1024px] mx-auto text-slate-100 flex flex-col font-sans">
|
||||
|
||||
<header class="h-16 border-b border-slate-700 bg-slate-800 flex items-center justify-between px-8 shrink-0 shadow-lg">
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="h-3 w-3 rounded-full bg-emerald-500 shadow-[0_0_10px_#10b981] animate-pulse"></div>
|
||||
<h1 class="font-bold tracking-tighter text-xl italic">EDI_BUZZER <span class="text-slate-600 not-italic text-xs font-mono ml-2">PROT_V2</span></h1>
|
||||
</div>
|
||||
|
||||
<DiskUsage />
|
||||
|
||||
<button class="px-6 py-2 bg-emerald-600 hover:bg-emerald-500 text-white text-xs font-black rounded-full transition-all shadow-lg hover:shadow-emerald-900/40 active:scale-95 uppercase tracking-widest">
|
||||
Connect
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<main class="flex-1 flex overflow-hidden p-6 gap-6 bg-gradient-to-b from-slate-900 to-slate-950">
|
||||
|
||||
<section class="flex-1 flex flex-col gap-6">
|
||||
<div class="h-48 bg-slate-800/30 border-2 border-dashed border-slate-700 rounded-[2rem] flex flex-col items-center justify-center group hover:border-blue-500/40 transition-all cursor-pointer">
|
||||
<span class="text-slate-500 font-bold uppercase text-[10px] tracking-[0.2em] group-hover:text-blue-400 transition-colors">Drop PC Files</span>
|
||||
</div>
|
||||
<div class="flex-1 bg-slate-800/50 rounded-[2rem] border border-slate-700 flex flex-col overflow-hidden shadow-2xl">
|
||||
<div class="p-5 border-b border-slate-700 bg-slate-800/80 font-black text-[10px] uppercase tracking-[0.2em] text-slate-500">Local Queue</div>
|
||||
<div class="flex-1 overflow-y-auto custom-scrollbar">
|
||||
<FileRow name="Intro_Song.mp3" size="1.2 MB" />
|
||||
<FileRow name="Buzzer_Hit.wav" size="450 KB" selected={true} />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="w-16 flex flex-col items-center justify-center gap-8">
|
||||
<button class="w-14 h-14 bg-blue-600 rounded-2xl shadow-xl hover:bg-blue-500 active:scale-90 transition-all flex items-center justify-center text-2xl">⮕</button>
|
||||
<button class="w-14 h-14 bg-slate-700 rounded-2xl shadow-xl hover:bg-slate-600 active:scale-90 transition-all flex items-center justify-center text-2xl">⬅</button>
|
||||
</section>
|
||||
|
||||
<section class="flex-1 flex flex-col gap-6">
|
||||
<div class="h-48 bg-indigo-950/20 border border-indigo-500/20 rounded-[2rem] p-6">
|
||||
<h3 class="text-indigo-400 text-[10px] font-black uppercase tracking-[0.2em] mb-4">Device Info</h3>
|
||||
<div class="text-[11px] font-mono text-slate-400 space-y-1">
|
||||
<p>Firmware: <span class="text-indigo-300">v0.1.12</span></p>
|
||||
<p>Build: <span class="text-indigo-300">NCS 3.2.1</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 bg-slate-800/50 rounded-[2rem] border border-slate-700 flex flex-col overflow-hidden shadow-2xl">
|
||||
<div class="p-5 border-b border-slate-700 bg-slate-800/80 font-black text-[10px] uppercase tracking-[0.2em] text-slate-500">Flash Storage /lfs/a</div>
|
||||
<div class="flex-1 overflow-y-auto custom-scrollbar">
|
||||
<FileRow name="confirm.bin" size="12 KB" isSystem={true} />
|
||||
<FileRow name="test_sound.bin" size="142 KB" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
<footer class="h-10 bg-black/40 border-t border-slate-800 px-8 flex items-center justify-between font-mono text-[9px] text-emerald-500/50 uppercase tracking-widest">
|
||||
<span>Status: Idle</span>
|
||||
<span class="text-slate-700 italic font-sans">Protocol V2.0 Active</span>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
webpage/src/styles/global.css
Normal file
1
webpage/src/styles/global.css
Normal file
@@ -0,0 +1 @@
|
||||
@import "tailwindcss";
|
||||
5
webpage/svelte.config.js
Normal file
5
webpage/svelte.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import { vitePreprocess } from '@astrojs/svelte';
|
||||
|
||||
export default {
|
||||
preprocess: vitePreprocess(),
|
||||
}
|
||||
5
webpage/tsconfig.json
Normal file
5
webpage/tsconfig.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"include": [".astro/types.d.ts", "**/*"],
|
||||
"exclude": ["dist"]
|
||||
}
|
||||
Reference in New Issue
Block a user