Compare commits

..
15 Commits
Author SHA1 Message Date
admin 5f60ea3841 Refactor: sys_status in separate component ausgelagert 2025-12-11 01:16:06 +01:00
admin 882f7d6784 Refactor: http_portal in separate component ausgelagert 2025-12-11 01:09:34 +01:00
admin 5fccab5aff Refactor: storage in separate component ausgelagert 2025-12-11 00:56:54 +01:00
admin 707df025b8 Refactor: dns_captive als eigenständige ESP-IDF-Komponente ausgelagert
- dns_captive.c/.h nach components/dns_captive verschoben
- Neues CMakeLists.txt für Komponente ergänzt
- src/CMakeLists.txt angepasst (komponentenbasiert, REQUIRES dns_captive)
- Projektstruktur bereinigt und klar modularisiert
2025-12-11 00:42:59 +01:00
admin b7f6325dea Refactoring: Module entkoppelt und Aufrufe über main zentralisiert
wifi_mgr vollständig von http_portal und dns_captive entkoppelt
- Neues Callback-Interface in http_portal implementiert
- Callback-Initialisierung in main.c hinzugefügt (WiFi-Creds, Device-Info)
- dns_captive in eigenes Modul ausgelagert (dns_captive.h ergänzt)
- Alte Vorwärtsdeklarationen entfernt und öffentliche API in wifi_mgr.h ergänzt
- Startreihenfolge der Module neu strukturiert (Orchestrierung in main.c)
- Projektabhängigkeiten vereinfacht und Zyklus zwischen Modulen aufgelöst
2025-12-10 22:14:55 +01:00
eugen 6225906851 sen5x Module in eigenes Component verschoben 2025-12-04 15:57:57 +01:00
admin 63dbc4a5cd images hinzugefügt 2025-11-25 18:53:16 +01:00
eugen 6dc0968f88 Datasheets hinzugefügt 2025-11-24 18:35:34 +01:00
eugen 6b1ca06c91 Treiberarchiv hinzugefügt 2025-11-24 18:31:30 +01:00
eugen f04e18a366 Schriftarten verlagert 2025-11-24 18:14:47 +01:00
eugen b5502d0249 Schriftarten hinzugefügt 2025-11-24 18:14:01 +01:00
eugen f79ac90eb5 Pythonskripte für mDNS und uninstall hinzugefügt 2025-11-24 18:11:26 +01:00
eugen 40a62bf023 Schrifft für nanoPSX in cad hinzugefügt; Windowsinstallation hinzugefügt 2025-11-24 18:04:33 +01:00
admin 0ff204fd63 eez hinzugefügt 2025-11-24 01:48:47 +01:00
admin f46c75d405 cad hinzugefügt 2025-11-24 01:37:34 +01:00
92 changed files with 217485 additions and 2778 deletions
View File
BIN
View File
Binary file not shown.
+53
View File
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg1"
inkscape:version="1.4 (86a8ad7, 2024-10-11)"
sodipodi:docname="nanoPSX.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="mm"
inkscape:zoom="2.2501035"
inkscape:cx="395.75958"
inkscape:cy="449.97931"
inkscape:window-width="1920"
inkscape:window-height="1137"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs1" />
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1">
<text
xml:space="preserve"
style="font-style:italic;font-size:27.2145px;font-family:Pigiarniq;-inkscape-font-specification:'Pigiarniq, Italic';text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;opacity:0.371681;fill:none;fill-opacity:0;stroke:#000000;stroke-width:0.1;stroke-linecap:round"
x="46.894733"
y="125.05263"
id="text1"><tspan
sodipodi:role="line"
id="tspan1"
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.2145px;font-family:Pigiarniq;-inkscape-font-specification:'Pigiarniq, Italic';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.1;fill:none"
x="46.894733"
y="125.05263">nanoPSX</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
View File
Binary file not shown.
+34510
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
+167729
View File
File diff suppressed because it is too large Load Diff
+4678
View File
File diff suppressed because it is too large Load Diff
+4202
View File
File diff suppressed because it is too large Load Diff
Executable
+996
View File
@@ -0,0 +1,996 @@
solid ascii
facet normal 1.953640e-01 -9.807308e-01 0.000000e+00
outer loop
vertex 1.157977e+01 -2.255061e+01 -7.800003e+00
vertex 1.173283e+01 -2.252012e+01 -8.300002e+00
vertex 1.173283e+01 -2.252012e+01 -7.300004e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex 1.222648e+01 -2.178088e+01 -8.300002e+00
vertex 1.216567e+01 -2.208704e+01 -8.300002e+00
vertex -1.227195e+01 -2.178774e+01 -8.300002e+00
endloop
endfacet
facet normal 2.802079e-04 -1.000000e+00 -6.507516e-10
outer loop
vertex -2.251063e-02 -2.258431e+01 -7.800003e+00
vertex -1.147173e+01 -2.258752e+01 -8.300002e+00
vertex 1.142670e+01 -2.258110e+01 -8.300002e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex 1.173283e+01 -2.252012e+01 -8.300002e+00
vertex 1.142670e+01 -2.258110e+01 -8.300002e+00
vertex -1.227195e+01 -2.178774e+01 -8.300002e+00
endloop
endfacet
facet normal -9.807296e-01 -1.953699e-01 0.000000e+00
outer loop
vertex -1.224146e+01 -2.194081e+01 -7.800003e+00
vertex -1.221097e+01 -2.209387e+01 -8.300002e+00
vertex -1.221097e+01 -2.209387e+01 -7.300004e+00
endloop
endfacet
facet normal -9.999999e-01 -2.802309e-04 9.546130e-07
outer loop
vertex -1.227848e+01 1.501878e+00 -7.800001e+00
vertex -1.228500e+01 2.479150e+01 -8.299997e+00
vertex -1.227195e+01 -2.178774e+01 -8.300002e+00
endloop
endfacet
facet normal -9.999999e-01 -2.802103e-04 0.000000e+00
outer loop
vertex -1.227848e+01 1.501878e+00 -7.800001e+00
vertex -1.227195e+01 -2.178774e+01 -8.300002e+00
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
endloop
endfacet
facet normal 9.808400e-01 -1.948151e-01 -3.699727e-07
outer loop
vertex 1.219607e+01 -2.193396e+01 -7.800003e+00
vertex 1.216567e+01 -2.208704e+01 -8.300002e+00
vertex 1.222648e+01 -2.178088e+01 -8.300002e+00
endloop
endfacet
facet normal -9.807306e-01 -1.953652e-01 -1.497794e-06
outer loop
vertex -1.224146e+01 -2.194081e+01 -7.800003e+00
vertex -1.227195e+01 -2.178774e+01 -8.300002e+00
vertex -1.221097e+01 -2.209387e+01 -8.300002e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex -1.221097e+01 -2.209387e+01 -8.300002e+00
vertex -1.177789e+01 -2.252670e+01 -8.300002e+00
vertex -1.203748e+01 -2.235336e+01 -8.300002e+00
endloop
endfacet
facet normal -9.807315e-01 -1.953605e-01 -0.000000e+00
outer loop
vertex -1.224146e+01 -2.194081e+01 -7.800003e+00
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
vertex -1.227195e+01 -2.178774e+01 -8.300002e+00
endloop
endfacet
facet normal -8.313134e-01 -5.558038e-01 0.000000e+00
outer loop
vertex -1.212422e+01 -2.222361e+01 -7.800003e+00
vertex -1.203748e+01 -2.235336e+01 -8.300002e+00
vertex -1.203748e+01 -2.235336e+01 -7.300004e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex -1.227195e+01 -2.178774e+01 -8.300002e+00
vertex -1.147173e+01 -2.258752e+01 -8.300002e+00
vertex -1.221097e+01 -2.209387e+01 -8.300002e+00
endloop
endfacet
facet normal -8.313140e-01 -5.558031e-01 -2.625587e-07
outer loop
vertex -1.212422e+01 -2.222361e+01 -7.800003e+00
vertex -1.221097e+01 -2.209387e+01 -8.300002e+00
vertex -1.203748e+01 -2.235336e+01 -8.300002e+00
endloop
endfacet
facet normal -1.948128e-01 -9.808405e-01 0.000000e+00
outer loop
vertex -1.162481e+01 -2.255711e+01 -7.800003e+00
vertex -1.147173e+01 -2.258752e+01 -8.300002e+00
vertex -1.147173e+01 -2.258752e+01 -7.300004e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex 1.142670e+01 -2.258110e+01 -8.300002e+00
vertex -1.147173e+01 -2.258752e+01 -8.300002e+00
vertex -1.227195e+01 -2.178774e+01 -8.300002e+00
endloop
endfacet
facet normal -8.313144e-01 -5.558025e-01 -0.000000e+00
outer loop
vertex -1.212422e+01 -2.222361e+01 -7.800003e+00
vertex -1.221097e+01 -2.209387e+01 -7.300004e+00
vertex -1.221097e+01 -2.209387e+01 -8.300002e+00
endloop
endfacet
facet normal 1.943541e-07 1.199650e-07 -1.000000e+00
outer loop
vertex 1.221979e+01 2.078772e+00 -8.299999e+00
vertex 1.222648e+01 -2.178088e+01 -8.300002e+00
vertex 7.611846e+00 1.594458e+00 -8.300000e+00
endloop
endfacet
facet normal 2.802079e-04 -1.000000e+00 0.000000e+00
outer loop
vertex -2.251063e-02 -2.258431e+01 -7.800003e+00
vertex 1.142670e+01 -2.258110e+01 -8.300002e+00
vertex 1.142670e+01 -2.258110e+01 -7.300004e+00
endloop
endfacet
facet normal -5.553374e-01 -8.316251e-01 0.000000e+00
outer loop
vertex -1.190768e+01 -2.244003e+01 -7.800003e+00
vertex -1.177789e+01 -2.252670e+01 -8.300002e+00
vertex -1.177789e+01 -2.252670e+01 -7.300004e+00
endloop
endfacet
facet normal -1.948269e-01 -9.808376e-01 -0.000000e+00
outer loop
vertex -1.162481e+01 -2.255711e+01 -7.800003e+00
vertex -1.177789e+01 -2.252670e+01 -7.300004e+00
vertex -1.177789e+01 -2.252670e+01 -8.300002e+00
endloop
endfacet
facet normal -1.948198e-01 -9.808390e-01 -2.243689e-06
outer loop
vertex -1.162481e+01 -2.255711e+01 -7.800003e+00
vertex -1.177789e+01 -2.252670e+01 -8.300002e+00
vertex -1.147173e+01 -2.258752e+01 -8.300002e+00
endloop
endfacet
facet normal 2.802079e-04 -9.999999e-01 0.000000e+00
outer loop
vertex -2.251063e-02 -2.258431e+01 -7.800003e+00
vertex -1.147173e+01 -2.258752e+01 -7.300004e+00
vertex -1.147173e+01 -2.258752e+01 -8.300002e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex -1.147173e+01 -2.258752e+01 -8.300002e+00
vertex -1.177789e+01 -2.252670e+01 -8.300002e+00
vertex -1.221097e+01 -2.209387e+01 -8.300002e+00
endloop
endfacet
facet normal -5.553346e-01 -8.316270e-01 1.062179e-06
outer loop
vertex -1.190768e+01 -2.244003e+01 -7.800003e+00
vertex -1.203748e+01 -2.235336e+01 -8.300002e+00
vertex -1.177789e+01 -2.252670e+01 -8.300002e+00
endloop
endfacet
facet normal 9.808398e-01 -1.948163e-01 0.000000e+00
outer loop
vertex 1.219607e+01 -2.193396e+01 -7.800003e+00
vertex 1.216567e+01 -2.208704e+01 -7.300004e+00
vertex 1.216567e+01 -2.208704e+01 -8.300002e+00
endloop
endfacet
facet normal 5.557968e-01 -8.313181e-01 0.000000e+00
outer loop
vertex 1.186258e+01 -2.243337e+01 -7.800003e+00
vertex 1.199232e+01 -2.234663e+01 -8.300002e+00
vertex 1.199232e+01 -2.234663e+01 -7.300004e+00
endloop
endfacet
facet normal 9.808402e-01 -1.948140e-01 0.000000e+00
outer loop
vertex 1.219607e+01 -2.193396e+01 -7.800003e+00
vertex 1.222648e+01 -2.178088e+01 -8.300002e+00
vertex 1.222648e+01 -2.178088e+01 -7.300004e+00
endloop
endfacet
facet normal -8.922910e-08 6.398150e-08 -1.000000e+00
outer loop
vertex 7.611846e+00 1.594458e+00 -8.300000e+00
vertex 1.222648e+01 -2.178088e+01 -8.300002e+00
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
endloop
endfacet
facet normal 8.316317e-01 -5.553275e-01 0.000000e+00
outer loop
vertex 1.207900e+01 -2.221683e+01 -7.800003e+00
vertex 1.199232e+01 -2.234663e+01 -7.300004e+00
vertex 1.199232e+01 -2.234663e+01 -8.300002e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex 1.199232e+01 -2.234663e+01 -8.300002e+00
vertex 1.173283e+01 -2.252012e+01 -8.300002e+00
vertex -1.227195e+01 -2.178774e+01 -8.300002e+00
endloop
endfacet
facet normal 3.591652e-08 1.023813e-07 -1.000000e+00
outer loop
vertex -1.228500e+01 2.479150e+01 -8.299997e+00
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
vertex -1.227195e+01 -2.178774e+01 -8.300002e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex 1.216567e+01 -2.208704e+01 -8.300002e+00
vertex 1.199232e+01 -2.234663e+01 -8.300002e+00
vertex -1.227195e+01 -2.178774e+01 -8.300002e+00
endloop
endfacet
facet normal 5.557982e-01 -8.313172e-01 5.370561e-07
outer loop
vertex 1.186258e+01 -2.243337e+01 -7.800003e+00
vertex 1.173283e+01 -2.252012e+01 -8.300002e+00
vertex 1.199232e+01 -2.234663e+01 -8.300002e+00
endloop
endfacet
facet normal -5.553318e-01 -8.316289e-01 -0.000000e+00
outer loop
vertex -1.190768e+01 -2.244003e+01 -7.800003e+00
vertex -1.203748e+01 -2.235336e+01 -7.300004e+00
vertex -1.203748e+01 -2.235336e+01 -8.300002e+00
endloop
endfacet
facet normal -3.064736e-11 1.093449e-07 -1.000000e+00
outer loop
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
vertex 1.222648e+01 -2.178088e+01 -8.300002e+00
vertex -1.227195e+01 -2.178774e+01 -8.300002e+00
endloop
endfacet
facet normal 8.316280e-01 -5.553332e-01 2.112395e-06
outer loop
vertex 1.207900e+01 -2.221683e+01 -7.800003e+00
vertex 1.199232e+01 -2.234663e+01 -8.300002e+00
vertex 1.216567e+01 -2.208704e+01 -8.300002e+00
endloop
endfacet
facet normal 1.000000e+00 2.801910e-04 0.000000e+00
outer loop
vertex 1.222314e+01 -9.851052e+00 -7.800002e+00
vertex 1.222648e+01 -2.178088e+01 -7.300004e+00
vertex 1.222648e+01 -2.178088e+01 -8.300002e+00
endloop
endfacet
facet normal 9.999999e-01 2.802309e-04 -9.536661e-07
outer loop
vertex 1.222314e+01 -9.851052e+00 -7.800002e+00
vertex 1.222648e+01 -2.178088e+01 -8.300002e+00
vertex 1.221979e+01 2.078772e+00 -8.299999e+00
endloop
endfacet
facet normal 1.953699e-01 -9.807296e-01 1.873721e-06
outer loop
vertex 1.157977e+01 -2.255061e+01 -7.800003e+00
vertex 1.142670e+01 -2.258110e+01 -8.300002e+00
vertex 1.173283e+01 -2.252012e+01 -8.300002e+00
endloop
endfacet
facet normal 5.557997e-01 -8.313163e-01 0.000000e+00
outer loop
vertex 1.186258e+01 -2.243337e+01 -7.800003e+00
vertex 1.173283e+01 -2.252012e+01 -7.300004e+00
vertex 1.173283e+01 -2.252012e+01 -8.300002e+00
endloop
endfacet
facet normal 8.316242e-01 -5.553388e-01 0.000000e+00
outer loop
vertex 1.207900e+01 -2.221683e+01 -7.800003e+00
vertex 1.216567e+01 -2.208704e+01 -8.300002e+00
vertex 1.216567e+01 -2.208704e+01 -7.300004e+00
endloop
endfacet
facet normal 1.953758e-01 -9.807284e-01 0.000000e+00
outer loop
vertex 1.157977e+01 -2.255061e+01 -7.800003e+00
vertex 1.142670e+01 -2.258110e+01 -7.300004e+00
vertex 1.142670e+01 -2.258110e+01 -8.300002e+00
endloop
endfacet
facet normal 7.071067e-01 1.225341e-07 -7.071068e-01
outer loop
vertex 7.861846e+00 7.195271e+00 -8.049999e+00
vertex 7.611846e+00 1.594458e+00 -8.300000e+00
vertex 7.611846e+00 1.260118e+01 -8.299998e+00
endloop
endfacet
facet normal -4.644116e-11 1.657095e-07 -1.000000e+00
outer loop
vertex 5.416704e+00 1.310403e+01 -8.299998e+00
vertex 7.611846e+00 1.594458e+00 -8.300000e+00
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
endloop
endfacet
facet normal 7.071071e-01 9.072717e-08 -7.071065e-01
outer loop
vertex 7.861846e+00 7.195271e+00 -8.049999e+00
vertex 8.111846e+00 1.647010e+00 -7.800000e+00
vertex 7.611846e+00 1.594458e+00 -8.300000e+00
endloop
endfacet
facet normal -1.045283e-01 9.945220e-01 -1.479396e-07
outer loop
vertex 1.221979e+01 2.078772e+00 -8.299999e+00
vertex 7.611846e+00 1.594458e+00 -8.300000e+00
vertex 8.111846e+00 1.647010e+00 -7.800000e+00
endloop
endfacet
facet normal 3.969645e-08 1.732894e-07 -1.000000e+00
outer loop
vertex 7.611846e+00 1.260118e+01 -8.299998e+00
vertex 7.611846e+00 1.594458e+00 -8.300000e+00
vertex 5.416704e+00 1.310403e+01 -8.299998e+00
endloop
endfacet
facet normal -1.045283e-01 9.945219e-01 0.000000e+00
outer loop
vertex 1.221979e+01 2.078772e+00 -8.299999e+00
vertex 8.111846e+00 1.647010e+00 -7.800000e+00
vertex 8.111846e+00 1.647010e+00 -7.300002e+00
endloop
endfacet
facet normal 9.999999e-01 2.802708e-04 -0.000000e+00
outer loop
vertex 1.222314e+01 -9.851052e+00 -7.800002e+00
vertex 1.221979e+01 2.078772e+00 -8.299999e+00
vertex 1.221979e+01 2.078772e+00 -7.300002e+00
endloop
endfacet
facet normal -1.045283e-01 9.945220e-01 0.000000e+00
outer loop
vertex 1.221979e+01 2.078772e+00 -7.300002e+00
vertex 1.221979e+01 2.078772e+00 -8.299999e+00
vertex 8.111846e+00 1.647010e+00 -7.300002e+00
endloop
endfacet
facet normal 1.000000e+00 2.802101e-04 9.534234e-07
outer loop
vertex 1.221460e+01 2.060253e+01 -7.799999e+00
vertex 1.221597e+01 1.570670e+01 -8.299998e+00
vertex 1.221323e+01 2.549836e+01 -8.299997e+00
endloop
endfacet
facet normal 1.000000e+00 2.803075e-04 0.000000e+00
outer loop
vertex 1.221460e+01 2.060253e+01 -7.799999e+00
vertex 1.221597e+01 1.570670e+01 -7.300000e+00
vertex 1.221597e+01 1.570670e+01 -8.299998e+00
endloop
endfacet
facet normal -1.048722e-07 2.082973e-08 -1.000000e+00
outer loop
vertex -1.223179e+01 2.505939e+01 -8.299997e+00
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
vertex -1.228500e+01 2.479150e+01 -8.299997e+00
endloop
endfacet
facet normal -6.485803e-08 4.331049e-08 -1.000000e+00
outer loop
vertex -1.208012e+01 2.528653e+01 -8.299997e+00
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
vertex -1.223179e+01 2.505939e+01 -8.299997e+00
endloop
endfacet
facet normal -3.846582e-08 5.753344e-08 -1.000000e+00
outer loop
vertex -1.185306e+01 2.543833e+01 -8.299997e+00
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
vertex -1.208012e+01 2.528653e+01 -8.299997e+00
endloop
endfacet
facet normal 5.591929e-01 -8.290375e-01 4.293063e-07
outer loop
vertex 1.221597e+01 1.570670e+01 -8.299998e+00
vertex 8.111846e+00 1.293843e+01 -7.799999e+00
vertex 7.611846e+00 1.260118e+01 -8.299998e+00
endloop
endfacet
facet normal -1.396867e-08 7.012171e-08 -1.000000e+00
outer loop
vertex -1.158520e+01 2.549169e+01 -8.299997e+00
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
vertex -1.185306e+01 2.543833e+01 -8.299997e+00
endloop
endfacet
facet normal -9.999999e-01 -2.802315e-04 0.000000e+00
outer loop
vertex 5.414967e+00 1.930120e+01 -7.799999e+00
vertex 5.416704e+00 1.310403e+01 -8.299998e+00
vertex 5.416704e+00 1.310403e+01 -7.300001e+00
endloop
endfacet
facet normal 0.000000e+00 9.739661e-08 -1.000000e+00
outer loop
vertex 1.221323e+01 2.549836e+01 -8.299997e+00
vertex 1.221597e+01 1.570670e+01 -8.299998e+00
vertex 5.413230e+00 2.549836e+01 -8.299997e+00
endloop
endfacet
facet normal -2.802564e-04 1.000000e+00 0.000000e+00
outer loop
vertex -4.829637e-02 1.310250e+01 -7.800000e+00
vertex 5.416704e+00 1.310403e+01 -7.300001e+00
vertex 5.416704e+00 1.310403e+01 -8.299998e+00
endloop
endfacet
facet normal -2.802564e-04 1.000000e+00 0.000000e+00
outer loop
vertex -4.829637e-02 1.310250e+01 -7.800000e+00
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
endloop
endfacet
facet normal -2.802564e-04 9.999999e-01 -3.408327e-10
outer loop
vertex -4.829637e-02 1.310250e+01 -7.800000e+00
vertex 5.416704e+00 1.310403e+01 -8.299998e+00
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
endloop
endfacet
facet normal 9.999999e-01 2.802746e-04 0.000000e+00
outer loop
vertex -5.515032e+00 1.929718e+01 -7.799999e+00
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
endloop
endfacet
facet normal -9.999999e-01 -2.802316e-04 6.011294e-10
outer loop
vertex 5.414967e+00 1.930120e+01 -7.799999e+00
vertex 5.413230e+00 2.549836e+01 -8.299997e+00
vertex 5.416704e+00 1.310403e+01 -8.299998e+00
endloop
endfacet
facet normal -2.157557e-11 7.695623e-08 -1.000000e+00
outer loop
vertex -5.516768e+00 2.549339e+01 -8.299997e+00
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
vertex -1.158520e+01 2.549169e+01 -8.299997e+00
endloop
endfacet
facet normal 9.999999e-01 2.802361e-04 4.773700e-07
outer loop
vertex -5.515032e+00 1.929718e+01 -7.799999e+00
vertex -5.513295e+00 1.310097e+01 -8.299998e+00
vertex -5.516768e+00 2.549339e+01 -8.299997e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex 1.221597e+01 1.570670e+01 -8.299998e+00
vertex 7.611846e+00 1.260118e+01 -8.299998e+00
vertex 5.416704e+00 1.310403e+01 -8.299998e+00
endloop
endfacet
facet normal -2.945013e-08 7.693617e-08 -1.000000e+00
outer loop
vertex 5.413230e+00 2.549836e+01 -8.299997e+00
vertex 1.221597e+01 1.570670e+01 -8.299998e+00
vertex 5.416704e+00 1.310403e+01 -8.299998e+00
endloop
endfacet
facet normal 7.071064e-01 9.072726e-08 -7.071071e-01
outer loop
vertex 7.861846e+00 7.195271e+00 -8.049999e+00
vertex 7.611846e+00 1.260118e+01 -8.299998e+00
vertex 8.111846e+00 1.293843e+01 -7.799999e+00
endloop
endfacet
facet normal 5.591929e-01 -8.290375e-01 0.000000e+00
outer loop
vertex 1.221597e+01 1.570670e+01 -7.300000e+00
vertex 8.111846e+00 1.293843e+01 -7.300001e+00
vertex 1.221597e+01 1.570670e+01 -8.299998e+00
endloop
endfacet
facet normal 5.591929e-01 -8.290376e-01 0.000000e+00
outer loop
vertex 1.221597e+01 1.570670e+01 -8.299998e+00
vertex 8.111846e+00 1.293843e+01 -7.300001e+00
vertex 8.111846e+00 1.293843e+01 -7.799999e+00
endloop
endfacet
facet normal -9.808400e-01 1.948146e-01 0.000000e+00
outer loop
vertex -1.225840e+01 2.492544e+01 -7.799998e+00
vertex -1.228500e+01 2.479150e+01 -8.299997e+00
vertex -1.228500e+01 2.479150e+01 -7.299999e+00
endloop
endfacet
facet normal -9.808400e-01 1.948146e-01 0.000000e+00
outer loop
vertex -1.225840e+01 2.492544e+01 -7.799998e+00
vertex -1.223179e+01 2.505939e+01 -8.299997e+00
vertex -1.228500e+01 2.479150e+01 -8.299997e+00
endloop
endfacet
facet normal -8.316252e-01 5.553374e-01 -7.910898e-07
outer loop
vertex -1.215596e+01 2.517296e+01 -7.799998e+00
vertex -1.208012e+01 2.528653e+01 -8.299997e+00
vertex -1.223179e+01 2.505939e+01 -8.299997e+00
endloop
endfacet
facet normal -5.557988e-01 8.313168e-01 0.000000e+00
outer loop
vertex -1.196659e+01 2.536243e+01 -7.799998e+00
vertex -1.185306e+01 2.543833e+01 -7.299999e+00
vertex -1.185306e+01 2.543833e+01 -8.299997e+00
endloop
endfacet
facet normal -5.558053e-01 8.313125e-01 0.000000e+00
outer loop
vertex -1.196659e+01 2.536243e+01 -7.799998e+00
vertex -1.208012e+01 2.528653e+01 -8.299997e+00
vertex -1.208012e+01 2.528653e+01 -7.299999e+00
endloop
endfacet
facet normal -5.558020e-01 8.313147e-01 -1.050240e-06
outer loop
vertex -1.196659e+01 2.536243e+01 -7.799998e+00
vertex -1.185306e+01 2.543833e+01 -8.299997e+00
vertex -1.208012e+01 2.528653e+01 -8.299997e+00
endloop
endfacet
facet normal -1.953667e-01 9.807302e-01 0.000000e+00
outer loop
vertex -1.171913e+01 2.546501e+01 -7.799998e+00
vertex -1.185306e+01 2.543833e+01 -8.299997e+00
vertex -1.185306e+01 2.543833e+01 -7.299999e+00
endloop
endfacet
facet normal -9.808400e-01 1.948146e-01 0.000000e+00
outer loop
vertex -1.225840e+01 2.492544e+01 -7.799998e+00
vertex -1.223179e+01 2.505939e+01 -7.299999e+00
vertex -1.223179e+01 2.505939e+01 -8.299997e+00
endloop
endfacet
facet normal -1.953681e-01 9.807300e-01 0.000000e+00
outer loop
vertex -1.171913e+01 2.546501e+01 -7.799998e+00
vertex -1.158520e+01 2.549169e+01 -7.299999e+00
vertex -1.158520e+01 2.549169e+01 -8.299997e+00
endloop
endfacet
facet normal -1.953674e-01 9.807302e-01 1.875426e-07
outer loop
vertex -1.171913e+01 2.546501e+01 -7.799998e+00
vertex -1.158520e+01 2.549169e+01 -8.299997e+00
vertex -1.185306e+01 2.543833e+01 -8.299997e+00
endloop
endfacet
facet normal -9.999999e-01 -2.802316e-04 -0.000000e+00
outer loop
vertex 5.414967e+00 1.930120e+01 -7.799999e+00
vertex 5.413230e+00 2.549836e+01 -7.299999e+00
vertex 5.413230e+00 2.549836e+01 -8.299997e+00
endloop
endfacet
facet normal 0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex 8.813231e+00 2.549836e+01 -7.799998e+00
vertex 1.221323e+01 2.549836e+01 -7.299999e+00
vertex 1.221323e+01 2.549836e+01 -8.299997e+00
endloop
endfacet
facet normal 0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex 8.813231e+00 2.549836e+01 -7.799998e+00
vertex 5.413230e+00 2.549836e+01 -8.299997e+00
vertex 5.413230e+00 2.549836e+01 -7.299999e+00
endloop
endfacet
facet normal 0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex 8.813231e+00 2.549836e+01 -7.799998e+00
vertex 1.221323e+01 2.549836e+01 -8.299997e+00
vertex 5.413230e+00 2.549836e+01 -8.299997e+00
endloop
endfacet
facet normal 9.999999e-01 2.801977e-04 5.344356e-10
outer loop
vertex -5.515032e+00 1.929718e+01 -7.799999e+00
vertex -5.516768e+00 2.549339e+01 -8.299997e+00
vertex -5.516768e+00 2.549339e+01 -7.299999e+00
endloop
endfacet
facet normal -2.803615e-04 9.999999e-01 1.534703e-10
outer loop
vertex -8.550983e+00 2.549254e+01 -7.799998e+00
vertex -5.516768e+00 2.549339e+01 -8.299997e+00
vertex -1.158520e+01 2.549169e+01 -8.299997e+00
endloop
endfacet
facet normal -8.316268e-01 5.553350e-01 0.000000e+00
outer loop
vertex -1.215596e+01 2.517296e+01 -7.799998e+00
vertex -1.223179e+01 2.505939e+01 -8.299997e+00
vertex -1.223179e+01 2.505939e+01 -7.299999e+00
endloop
endfacet
facet normal -2.800473e-04 9.999999e-01 1.907352e-06
outer loop
vertex -8.550983e+00 2.549254e+01 -7.799998e+00
vertex -5.516768e+00 2.549339e+01 -7.299999e+00
vertex -5.516768e+00 2.549339e+01 -8.299997e+00
endloop
endfacet
facet normal -2.803615e-04 9.999999e-01 0.000000e+00
outer loop
vertex -8.550983e+00 2.549254e+01 -7.799998e+00
vertex -1.158520e+01 2.549169e+01 -8.299997e+00
vertex -1.158520e+01 2.549169e+01 -7.299999e+00
endloop
endfacet
facet normal -9.999999e-01 -2.802513e-04 -0.000000e+00
outer loop
vertex -1.227848e+01 1.501878e+00 -7.800001e+00
vertex -1.228500e+01 2.479150e+01 -7.299999e+00
vertex -1.228500e+01 2.479150e+01 -8.299997e+00
endloop
endfacet
facet normal 1.000000e+00 2.801127e-04 -0.000000e+00
outer loop
vertex 1.221460e+01 2.060253e+01 -7.799999e+00
vertex 1.221323e+01 2.549836e+01 -8.299997e+00
vertex 1.221323e+01 2.549836e+01 -7.299999e+00
endloop
endfacet
facet normal -8.316236e-01 5.553398e-01 0.000000e+00
outer loop
vertex -1.215596e+01 2.517296e+01 -7.799998e+00
vertex -1.208012e+01 2.528653e+01 -7.299999e+00
vertex -1.208012e+01 2.528653e+01 -8.299997e+00
endloop
endfacet
facet normal 7.071068e-01 5.972228e-08 -7.071068e-01
outer loop
vertex 7.861846e+00 7.195271e+00 -8.049999e+00
vertex 8.111846e+00 1.293843e+01 -7.799999e+00
vertex 8.111846e+00 1.647010e+00 -7.800000e+00
endloop
endfacet
facet normal -5.553346e-01 -8.316270e-01 -1.050244e-06
outer loop
vertex -1.190768e+01 -2.244003e+01 -7.800003e+00
vertex -1.177789e+01 -2.252670e+01 -7.300004e+00
vertex -1.203748e+01 -2.235336e+01 -7.300004e+00
endloop
endfacet
facet normal -1.948198e-01 -9.808390e-01 2.237722e-06
outer loop
vertex -1.162481e+01 -2.255711e+01 -7.800003e+00
vertex -1.147173e+01 -2.258752e+01 -7.300004e+00
vertex -1.177789e+01 -2.252670e+01 -7.300004e+00
endloop
endfacet
facet normal 9.808400e-01 -1.948151e-01 3.759400e-07
outer loop
vertex 1.219607e+01 -2.193396e+01 -7.800003e+00
vertex 1.222648e+01 -2.178088e+01 -7.300004e+00
vertex 1.216567e+01 -2.208704e+01 -7.300004e+00
endloop
endfacet
facet normal -9.807306e-01 -1.953652e-01 1.497794e-06
outer loop
vertex -1.224146e+01 -2.194081e+01 -7.800003e+00
vertex -1.221097e+01 -2.209387e+01 -7.300004e+00
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
endloop
endfacet
facet normal 1.953699e-01 -9.807296e-01 -1.867753e-06
outer loop
vertex 1.157977e+01 -2.255061e+01 -7.800003e+00
vertex 1.173283e+01 -2.252012e+01 -7.300004e+00
vertex 1.142670e+01 -2.258110e+01 -7.300004e+00
endloop
endfacet
facet normal 5.557982e-01 -8.313172e-01 -5.251215e-07
outer loop
vertex 1.186258e+01 -2.243337e+01 -7.800003e+00
vertex 1.199232e+01 -2.234663e+01 -7.300004e+00
vertex 1.173283e+01 -2.252012e+01 -7.300004e+00
endloop
endfacet
facet normal 8.316280e-01 -5.553332e-01 -2.124329e-06
outer loop
vertex 1.207900e+01 -2.221683e+01 -7.800003e+00
vertex 1.216567e+01 -2.208704e+01 -7.300004e+00
vertex 1.199232e+01 -2.234663e+01 -7.300004e+00
endloop
endfacet
facet normal 2.802079e-04 -1.000000e+00 0.000000e+00
outer loop
vertex -2.251063e-02 -2.258431e+01 -7.800003e+00
vertex 1.142670e+01 -2.258110e+01 -7.300004e+00
vertex -1.147173e+01 -2.258752e+01 -7.300004e+00
endloop
endfacet
facet normal -8.313140e-01 -5.558031e-01 2.625587e-07
outer loop
vertex -1.212422e+01 -2.222361e+01 -7.800003e+00
vertex -1.203748e+01 -2.235336e+01 -7.300004e+00
vertex -1.221097e+01 -2.209387e+01 -7.300004e+00
endloop
endfacet
facet normal 1.000000e+00 2.802309e-04 9.536648e-07
outer loop
vertex 1.222314e+01 -9.851052e+00 -7.800002e+00
vertex 1.221979e+01 2.078772e+00 -7.300002e+00
vertex 1.222648e+01 -2.178088e+01 -7.300004e+00
endloop
endfacet
facet normal -9.999999e-01 -2.802309e-04 -9.558927e-07
outer loop
vertex -1.227848e+01 1.501878e+00 -7.800001e+00
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
vertex -1.228500e+01 2.479150e+01 -7.299999e+00
endloop
endfacet
facet normal 1.000000e+00 0.000000e+00 0.000000e+00
outer loop
vertex 8.111846e+00 7.292722e+00 -7.550000e+00
vertex 8.111846e+00 1.647010e+00 -7.800000e+00
vertex 8.111846e+00 1.293843e+01 -7.799999e+00
endloop
endfacet
facet normal 1.000000e+00 0.000000e+00 0.000000e+00
outer loop
vertex 8.111846e+00 7.292722e+00 -7.550000e+00
vertex 8.111846e+00 1.647010e+00 -7.300002e+00
vertex 8.111846e+00 1.647010e+00 -7.800000e+00
endloop
endfacet
facet normal -2.802564e-04 1.000000e+00 3.408324e-10
outer loop
vertex -4.829637e-02 1.310250e+01 -7.800000e+00
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
vertex 5.416704e+00 1.310403e+01 -7.300001e+00
endloop
endfacet
facet normal 1.000000e+00 2.802101e-04 -9.534234e-07
outer loop
vertex 1.221460e+01 2.060253e+01 -7.799999e+00
vertex 1.221323e+01 2.549836e+01 -7.299999e+00
vertex 1.221597e+01 1.570670e+01 -7.300000e+00
endloop
endfacet
facet normal 9.999999e-01 2.802362e-04 -4.767691e-07
outer loop
vertex -5.515032e+00 1.929718e+01 -7.799999e+00
vertex -5.516768e+00 2.549339e+01 -7.299999e+00
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
endloop
endfacet
facet normal -1.000000e+00 -2.802316e-04 -3.005649e-10
outer loop
vertex 5.414967e+00 1.930120e+01 -7.799999e+00
vertex 5.416704e+00 1.310403e+01 -7.300001e+00
vertex 5.413230e+00 2.549836e+01 -7.299999e+00
endloop
endfacet
facet normal 1.000000e+00 0.000000e+00 -0.000000e+00
outer loop
vertex 8.111846e+00 7.292722e+00 -7.550000e+00
vertex 8.111846e+00 1.293843e+01 -7.799999e+00
vertex 8.111846e+00 1.293843e+01 -7.300001e+00
endloop
endfacet
facet normal -9.808400e-01 1.948146e-01 0.000000e+00
outer loop
vertex -1.225840e+01 2.492544e+01 -7.799998e+00
vertex -1.228500e+01 2.479150e+01 -7.299999e+00
vertex -1.223179e+01 2.505939e+01 -7.299999e+00
endloop
endfacet
facet normal -2.800472e-04 9.999999e-01 1.907329e-06
outer loop
vertex -8.550983e+00 2.549254e+01 -7.799998e+00
vertex -1.158520e+01 2.549169e+01 -7.299999e+00
vertex -5.516768e+00 2.549339e+01 -7.299999e+00
endloop
endfacet
facet normal -0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex 8.813231e+00 2.549836e+01 -7.799998e+00
vertex 5.413230e+00 2.549836e+01 -7.299999e+00
vertex 1.221323e+01 2.549836e+01 -7.299999e+00
endloop
endfacet
facet normal -5.558020e-01 8.313147e-01 1.050240e-06
outer loop
vertex -1.196659e+01 2.536243e+01 -7.799998e+00
vertex -1.208012e+01 2.528653e+01 -7.299999e+00
vertex -1.185306e+01 2.543833e+01 -7.299999e+00
endloop
endfacet
facet normal -1.953674e-01 9.807302e-01 -1.841328e-07
outer loop
vertex -1.171913e+01 2.546501e+01 -7.799998e+00
vertex -1.185306e+01 2.543833e+01 -7.299999e+00
vertex -1.158520e+01 2.549169e+01 -7.299999e+00
endloop
endfacet
facet normal -8.316252e-01 5.553374e-01 7.910898e-07
outer loop
vertex -1.215596e+01 2.517296e+01 -7.799998e+00
vertex -1.223179e+01 2.505939e+01 -7.299999e+00
vertex -1.208012e+01 2.528653e+01 -7.299999e+00
endloop
endfacet
facet normal 1.000000e+00 0.000000e+00 0.000000e+00
outer loop
vertex 8.111846e+00 7.292722e+00 -7.550000e+00
vertex 8.111846e+00 1.293843e+01 -7.300001e+00
vertex 8.111846e+00 1.647010e+00 -7.300002e+00
endloop
endfacet
facet normal -0.000000e+00 0.000000e+00 1.000000e+00
outer loop
vertex 1.222648e+01 -2.178088e+01 -7.300004e+00
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
vertex 1.216567e+01 -2.208704e+01 -7.300004e+00
endloop
endfacet
facet normal 1.050226e-08 -9.992250e-08 1.000000e+00
outer loop
vertex 1.221979e+01 2.078772e+00 -7.300002e+00
vertex 8.111846e+00 1.647010e+00 -7.300002e+00
vertex 1.222648e+01 -2.178088e+01 -7.300004e+00
endloop
endfacet
facet normal 3.453364e-08 -1.023615e-07 1.000000e+00
outer loop
vertex -1.228500e+01 2.479150e+01 -7.299999e+00
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
endloop
endfacet
facet normal -1.825128e-08 -1.049725e-07 1.000000e+00
outer loop
vertex 8.111846e+00 1.647010e+00 -7.300002e+00
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
vertex 1.222648e+01 -2.178088e+01 -7.300004e+00
endloop
endfacet
facet normal 2.681644e-11 -9.567682e-08 1.000000e+00
outer loop
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
vertex 1.222648e+01 -2.178088e+01 -7.300004e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 1.000000e+00
outer loop
vertex -1.147173e+01 -2.258752e+01 -7.300004e+00
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
vertex -1.177789e+01 -2.252670e+01 -7.300004e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 1.000000e+00
outer loop
vertex 1.216567e+01 -2.208704e+01 -7.300004e+00
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
vertex 1.199232e+01 -2.234663e+01 -7.300004e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 1.000000e+00
outer loop
vertex 1.199232e+01 -2.234663e+01 -7.300004e+00
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
vertex 1.173283e+01 -2.252012e+01 -7.300004e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 1.000000e+00
outer loop
vertex 1.173283e+01 -2.252012e+01 -7.300004e+00
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
vertex 1.142670e+01 -2.258110e+01 -7.300004e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 1.000000e+00
outer loop
vertex 1.142670e+01 -2.258110e+01 -7.300004e+00
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
vertex -1.147173e+01 -2.258752e+01 -7.300004e+00
endloop
endfacet
facet normal -0.000000e+00 -0.000000e+00 1.000000e+00
outer loop
vertex -1.227195e+01 -2.178774e+01 -7.300004e+00
vertex -1.221097e+01 -2.209387e+01 -7.300004e+00
vertex -1.177789e+01 -2.252670e+01 -7.300004e+00
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 1.000000e+00
outer loop
vertex -1.177789e+01 -2.252670e+01 -7.300004e+00
vertex -1.221097e+01 -2.209387e+01 -7.300004e+00
vertex -1.203748e+01 -2.235336e+01 -7.300004e+00
endloop
endfacet
facet normal 2.332680e-11 -8.323378e-08 1.000000e+00
outer loop
vertex 5.416704e+00 1.310403e+01 -7.300001e+00
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
vertex 8.111846e+00 1.647010e+00 -7.300002e+00
endloop
endfacet
facet normal -5.189548e-09 -8.446005e-08 1.000000e+00
outer loop
vertex 8.111846e+00 1.293843e+01 -7.300001e+00
vertex 5.416704e+00 1.310403e+01 -7.300001e+00
vertex 8.111846e+00 1.647010e+00 -7.300002e+00
endloop
endfacet
facet normal 2.095299e-08 -1.051825e-07 1.000000e+00
outer loop
vertex -1.158520e+01 2.549169e+01 -7.299999e+00
vertex -1.185306e+01 2.543833e+01 -7.299999e+00
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
endloop
endfacet
facet normal 3.232708e-11 -1.154344e-07 1.000000e+00
outer loop
vertex -5.516768e+00 2.549339e+01 -7.299999e+00
vertex -1.158520e+01 2.549169e+01 -7.299999e+00
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
endloop
endfacet
facet normal -9.700132e-09 -1.578699e-07 1.000000e+00
outer loop
vertex 1.221597e+01 1.570670e+01 -7.300000e+00
vertex 5.416704e+00 1.310403e+01 -7.300001e+00
vertex 8.111846e+00 1.293843e+01 -7.300001e+00
endloop
endfacet
facet normal 5.769867e-08 -8.630008e-08 1.000000e+00
outer loop
vertex -1.185306e+01 2.543833e+01 -7.299999e+00
vertex -1.208012e+01 2.528653e+01 -7.299999e+00
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
endloop
endfacet
facet normal 9.728713e-08 -6.496578e-08 1.000000e+00
outer loop
vertex -1.208012e+01 2.528653e+01 -7.299999e+00
vertex -1.223179e+01 2.505939e+01 -7.299999e+00
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
endloop
endfacet
facet normal 1.573083e-07 -3.124460e-08 1.000000e+00
outer loop
vertex -1.223179e+01 2.505939e+01 -7.299999e+00
vertex -1.228500e+01 2.479150e+01 -7.299999e+00
vertex -5.513295e+00 1.310097e+01 -7.300001e+00
endloop
endfacet
facet normal -2.594791e-08 -1.154239e-07 1.000000e+00
outer loop
vertex 5.413230e+00 2.549836e+01 -7.299999e+00
vertex 5.416704e+00 1.310403e+01 -7.300001e+00
vertex 1.221597e+01 1.570670e+01 -7.300000e+00
endloop
endfacet
facet normal 0.000000e+00 -9.739662e-08 1.000000e+00
outer loop
vertex 1.221323e+01 2.549836e+01 -7.299999e+00
vertex 5.413230e+00 2.549836e+01 -7.299999e+00
vertex 1.221597e+01 1.570670e+01 -7.300000e+00
endloop
endfacet
endsolid
BIN
View File
Binary file not shown.
Binary file not shown.
+188
View File
@@ -0,0 +1,188 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="refresh" content="5;url=http://fontsgeek.com/fonts/pigiarniq-italic?ref=readme">
<title>Pigiarniq ItalicFontsgeek</title>
<style>
/* -------------------------------------
GLOBAL
------------------------------------- */
* {
margin:0;
padding:0;
font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
font-size: 100%;
line-height: 1.6;
}
img {
max-width: 100%;
}
body {
-webkit-font-smoothing:antialiased;
-webkit-text-size-adjust:none;
width: 100%!important;
height: 100%;
background:#DDD;
}
/* -------------------------------------
ELEMENTS
------------------------------------- */
a {
color: #348eda;
}
.btn-primary, .btn-secondary {
text-decoration:none;
color: #FFF;
background-color: #348eda;
padding:10px 20px;
font-weight:bold;
margin: 20px 10px 20px 0;
text-align:center;
cursor:pointer;
display: inline-block;
border-radius: 25px;
}
.btn-secondary{
background: #aaa;
}
.last {
margin-bottom: 0;
}
.first{
margin-top: 0;
}
/* -------------------------------------
BODY
------------------------------------- */
table.body-wrap {
width: 100%;
padding: 20px;
}
table.body-wrap .container{
border: 1px solid #f0f0f0;
}
/* -------------------------------------
FOOTER
------------------------------------- */
table.footer-wrap {
width: 100%;
clear:both!important;
}
.footer-wrap .container p {
font-size:12px;
color:#666;
}
table.footer-wrap a{
color: #999;
}
/* -------------------------------------
TYPOGRAPHY
------------------------------------- */
h1,h2,h3{
font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; line-height: 1.1; margin-bottom:15px; color:#000;
margin: 40px 0 10px;
line-height: 1.2;
font-weight:200;
}
h1 {
font-size: 36px;
}
h2 {
font-size: 28px;
}
h3 {
font-size: 22px;
}
p, ul {
margin-bottom: 10px;
font-weight: normal;
font-size:14px;
}
ul li {
margin-left:5px;
list-style-position: inside;
}
/* ---------------------------------------------------
RESPONSIVENESS
Nuke it from orbit. It's the only way to be sure.
------------------------------------------------------ */
/* Set a max-width, and make it display as block so it will automatically stretch to that width, but will also shrink down on a phone or something */
.container {
display:block!important;
max-width:600px!important;
margin:0 auto!important; /* makes it centered */
clear:both!important;
}
/* This should also be a block element, so that it will fill 100% of the .container */
.content {
padding:20px;
max-width:600px;
margin:0 auto;
display:block;
}
/* Let's make sure tables in the content area are 100% wide */
.content table {
width: 100%;
}
</style>
</head>
<body bgcolor="#f6f6f6">
<!-- body -->
<table class="body-wrap">
<tr>
<td></td>
<td class="container" bgcolor="#FFFFFF">
<!-- content -->
<div class="content">
<table>
<tr>
<td>
<h1>Pigiarniq Italic</h1>
<p>This font was downloaded from <a href="http://fontsgeek.com?ref=readme">fontsgeek.com</a> . You can visit <a href="http://fontsgeek.com?ref=readme">fontsgeek.com</a> for thousands of free fonts.</p>
<p><a href="http://fontsgeek.com/fonts/pigiarniq-italic?ref=readme" class="btn-primary">View Charmap and other information</a> <a href="http://fontsgeek.com?ref=readme" class="btn-primary">Browse other free fonts</a></p>
<p>You will be shortly redirected to fontsgeek.</p>
</td>
</tr>
</table>
</div>
<!-- /content -->
</td>
<td></td>
</tr>
</table>
<!-- /body -->
</body>
</html>
BIN
View File
Binary file not shown.
+96
View File
@@ -0,0 +1,96 @@
-------------------------------
UBUNTU FONT LICENCE Version 1.0
-------------------------------
PREAMBLE
This licence allows the licensed fonts to be used, studied, modified and
redistributed freely. The fonts, including any derivative works, can be
bundled, embedded, and redistributed provided the terms of this licence
are met. The fonts and derivatives, however, cannot be released under
any other licence. The requirement for fonts to remain under this
licence does not require any document created using the fonts or their
derivatives to be published under this licence, as long as the primary
purpose of the document is not to be a vehicle for the distribution of
the fonts.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this licence and clearly marked as such. This may
include source files, build scripts and documentation.
"Original Version" refers to the collection of Font Software components
as received under this licence.
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to
a new environment.
"Copyright Holder(s)" refers to all individuals and companies who have a
copyright ownership of the Font Software.
"Substantially Changed" refers to Modified Versions which can be easily
identified as dissimilar to the Font Software by users of the Font
Software comparing the Original Version with the Modified Version.
To "Propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification and with or without charging
a redistribution fee), making available to the public, and in some
countries other activities as well.
PERMISSION & CONDITIONS
This licence does not grant any rights under trademark law and all such
rights are reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of the Font Software, to propagate the Font Software, subject to
the below conditions:
1) Each copy of the Font Software must contain the above copyright
notice and this licence. These can be included either as stand-alone
text files, human-readable headers or in the appropriate machine-
readable metadata fields within text or binary files as long as those
fields can be easily viewed by the user.
2) The font name complies with the following:
(a) The Original Version must retain its name, unmodified.
(b) Modified Versions which are Substantially Changed must be renamed to
avoid use of the name of the Original Version or similar names entirely.
(c) Modified Versions which are not Substantially Changed must be
renamed to both (i) retain the name of the Original Version and (ii) add
additional naming elements to distinguish the Modified Version from the
Original Version. The name of such Modified Versions must be the name of
the Original Version, with "derivative X" where X represents the name of
the new work, appended to that name.
3) The name(s) of the Copyright Holder(s) and any contributor to the
Font Software shall not be used to promote, endorse or advertise any
Modified Version, except (i) as required by this licence, (ii) to
acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with
their explicit written permission.
4) The Font Software, modified or unmodified, in part or in whole, must
be distributed entirely under this licence, and must not be distributed
under any other licence. The requirement for fonts to remain under this
licence does not affect any document created using the Font Software,
except any version of the Font Software extracted from a document
created using the Font Software may only be distributed under this
licence.
TERMINATION
This licence becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
DEALINGS IN THE FONT SOFTWARE.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
-10
View File
@@ -1,10 +0,0 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,9 @@
idf_component_register(
SRCS
"src/dns_captive.c"
INCLUDE_DIRS
"include"
REQUIRES
lwip
esp_netif
)
@@ -1,3 +1,4 @@
// File: dns_captive.c
#include <string.h>
#include <stdio.h>
#include <inttypes.h>
@@ -0,0 +1,12 @@
idf_component_register(
SRCS
"src/http_portal.c"
INCLUDE_DIRS
"include"
REQUIRES
esp_wifi
esp_http_server
esp_netif
storage
)
@@ -0,0 +1,27 @@
// http_portal.h
#pragma once
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "esp_err.h"
// Callbacks, die das Portal nach außen benutzt
typedef struct {
bool (*load_sta_creds)(char **ssid, char **pass); // optional, wenn du es später brauchst
void (*save_sta_creds_and_reconnect)(const char *ssid, const char *pass);
void (*save_device_info)(
const char *devicename,
const char *token,
const char *bucket,
const char *org
);
} portal_http_callbacks_t;
// HTTP-Portal starten / stoppen
esp_err_t portal_http_start(EventGroupHandle_t wifi_events,
EventBits_t bit_gotip,
EventBits_t bit_fail,
const char* ap_ssid,
const portal_http_callbacks_t *cb);
void portal_http_stop(void);
@@ -14,9 +14,7 @@
#include "http_portal.h"
#include "storage.h"
// Diese beiden werden vom WiFi-Manager bereitgestellt (in wifi_mgr.c definiert)
bool wifi_mgr_load_sta_creds(char **out_ssid, char **out_pass);
void wifi_mgr_save_sta_creds_and_reconnect(const char* ssid, const char* pass);
static portal_http_callbacks_t s_cb;
static void __attribute__((unused)) log_one_hdr(httpd_req_t *req, const char* key) {
size_t len = httpd_req_get_hdr_value_len(req, key);
@@ -34,9 +32,6 @@ static void __attribute__((unused)) log_one_hdr(httpd_req_t *req, const char* ke
}
}
// Geräteeigenschaften speichern (in wifi_mgr.c implementieren)
void wifi_mgr_save_device_info(const char* devicename, const char* token, const char* bucket, const char* org);
static const char *TAG = "portal_http";
static httpd_handle_t s_http = NULL;
@@ -460,16 +455,21 @@ static esp_err_t save_post(httpd_req_t *req) {
log_resp_basic("save_post", "200 OK", "text/html; charset=utf-8", (int)strlen(saved_html));
httpd_resp_send(req, saved_html, HTTPD_RESP_USE_STRLEN);
// Geräteeigenschaften speichern
wifi_mgr_save_device_info(
dev,
(token && token[0]) ? token : NULL, // NULL = nicht geändert
(bucket && bucket[0]) ? bucket : NULL,
(org && org[0]) ? org : NULL
);
// Geräteeigenschaften speichern (über Callback)
if (s_cb.save_device_info) {
s_cb.save_device_info(
dev,
(token && token[0]) ? token : NULL, // NULL = nicht geändert
(bucket && bucket[0]) ? bucket : NULL,
(org && org[0]) ? org : NULL
);
}
// STA-Creds speichern & reconnect (über Callback)
if (s_cb.save_sta_creds_and_reconnect) {
s_cb.save_sta_creds_and_reconnect(ssid, pass);
}
// STA-Creds speichern & reconnect
wifi_mgr_save_sta_creds_and_reconnect(ssid, pass);
s_force_captive = false; // Captive beenden; OS darf 204 sehen
// Cleanup (Erfolgsweg)
@@ -653,8 +653,12 @@ static httpd_handle_t start_http(void) {
esp_err_t portal_http_start(EventGroupHandle_t wifi_events,
EventBits_t bit_gotip,
EventBits_t bit_fail,
const char* ap_ssid)
const char* ap_ssid,
const portal_http_callbacks_t *cb)
{
if (s_http) return ESP_OK;
if (!cb) return ESP_ERR_INVALID_ARG;
s_cb = *cb;
if (s_http) return ESP_OK;
s_wifi_events = wifi_events;
s_BIT_GOTIP = bit_gotip;
+14
View File
@@ -0,0 +1,14 @@
idf_component_register(
SRCS
"sen5x_i2c.c"
"sensirion_common.c"
"sensirion_i2c.c"
"sensirion_i2c_hal.c"
"i2cdev.c"
INCLUDE_DIRS
"."
REQUIRES
driver
freertos
log
)
@@ -0,0 +1,9 @@
idf_component_register(
SRCS
"src/storage.c"
INCLUDE_DIRS
"include"
REQUIRES
nvs_flash
)
@@ -0,0 +1,8 @@
idf_component_register(
SRCS
"src/sys_status.c"
INCLUDE_DIRS
"include"
REQUIRES
)
@@ -1,8 +1,9 @@
#include "sys_status.h"
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "esp_check.h"
#include "sys_status.h"
static EventGroupHandle_t s_status_group = NULL;
void sys_status_init(void)
+13 -23
View File
@@ -1,24 +1,14 @@
set(app_sources
"main.c"
"lv_fs_port.c"
"net_influx.c"
"net_mdns.c"
"sen5x_app.c"
"wifi_mgr.c"
)
idf_component_register(
SRCS
"main.c"
"lv_fs_port.c"
"i2cdev.c"
"sensirion_common.c"
"sensirion_i2c.c"
"sensirion_i2c_hal.c"
"sen5x_i2c.c"
"sen5x_app.c"
"wifi_mgr.c"
"http_portal.c"
"storage.c"
"dns_captive.c"
"net_mdns.c"
"net_influx.c"
"sys_status.c"
INCLUDE_DIRS
"."
REQUIRES
driver
freertos
log
)
SRCS ${app_sources}
INCLUDE_DIRS "."
REQUIRES dns_captive storage
)
-18
View File
@@ -1,18 +0,0 @@
#pragma once
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "esp_err.h"
#include "esp_http_server.h"
// Startet den HTTP-Captive-Portal Server.
// - wifi_events: EventGroup, die vom WiFi-Manager gepflegt wird
// - bit_gotip: Bitmaske für "STA hat IP"
// - bit_fail: Bitmaske für "STA Verbindung fehlgeschlagen"
// - ap_ssid: SSID des SoftAP (für Anzeige im HTML)
esp_err_t portal_http_start(EventGroupHandle_t wifi_events,
EventBits_t bit_gotip,
EventBits_t bit_fail,
const char* ap_ssid);
// Stoppt den HTTP-Server (optional)
void portal_http_stop(void);
+57 -15
View File
@@ -5,7 +5,6 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "wifi_mgr.h"
#include "sen5x_app.h"
#include "storage.h"
@@ -42,7 +41,32 @@
#include "images.h"
#include "screens.h" // <-- Zugriff auf objects.* und tick_screen()
// Entfernt: extern lv_obj_t *ui_wifi/influx/mdns;
#include "wifi_mgr.h"
#include "dns_captive.h"
#include "http_portal.h"
// --- Callback-Implementierungen für das Portal ---
static bool app_load_sta_creds(char **ssid, char **pass)
{
// Wenn du das Portal später mal /scan oder Default-SSID aus NVS ziehen lassen willst
return storage_load_wifi_creds(ssid, pass);
}
static void app_save_sta_creds_and_reconnect(const char *ssid, const char *pass)
{
wifi_mgr_save_sta_creds_and_reconnect(ssid, pass);
}
static void app_save_device_info(
const char *devicename,
const char *token,
const char *bucket,
const char *org)
{
storage_save_device_name(devicename);
storage_save_influx_softap(org, bucket, token);
}
// ---------- Status-Icons updaten: nutzt die in screens.c erzeugten Objekte ----------
static void ui_update_status_icons(void)
@@ -308,14 +332,10 @@ static void button_init(void)
// Beim Loslassen nach langem Drücken -> wirklich resetten
iot_button_register_cb(g_btn, BUTTON_LONG_PRESS_UP, NULL, reset_button_cb, NULL);
}
/* ==================== app_main (unverändert, plus Button-Reset) ==================== */
/* ==================== main ==================== */
void app_main(void)
{
/*
esp_log_level_set("storage", ESP_LOG_NONE);
*/
esp_log_level_set("*", ESP_LOG_NONE);
@@ -324,7 +344,7 @@ void app_main(void)
sys_status_set_influx_ok(false);
sys_status_set_mdns_ok(false);
// 0) NVS zuerst
// NVS zuerst
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
@@ -332,21 +352,21 @@ void app_main(void)
}
ESP_ERROR_CHECK(ret);
// --- Storage/WiFi wie gehabt ---
// --- Storage
ESP_ERROR_CHECK(storage_init());
storage_debug_dump();
// WiFi Manager initialisieren
wifi_mgr_init();
wifi_mgr_start();
ESP_ERROR_CHECK(i2cdev_init());
// 1) I2C-Bus initialisieren (bsp_i2c.h)
// I2C-Bus initialisieren (bsp_i2c.h)
i2c_master_bus_handle_t i2c_bus_handle = bsp_i2c_init();
// 2) Diesen Bus von i2cdev "adoptieren", damit SEN5x denselben Bus nutzt
// Diesen Bus von i2cdev "adoptieren", damit SEN5x denselben Bus nutzt
ESP_ERROR_CHECK(i2cdev_adopt_bus(0, i2c_bus_handle, 18, 19)); // Port 0, SDA=18, SCL=19
// 3) Restliche Peripherie
// Restliche Peripherie
bsp_spi_init();
bsp_battery_init();
// bsp_qmi8658_init(i2c_bus_handle);
@@ -370,7 +390,29 @@ void app_main(void)
lv_timer_t *ui_timer = lv_timer_create(ui_tick_cb, 1000, NULL);
(void)ui_timer;
// 4) SEN5x
// WiFi AP+STA starten
wifi_mgr_start();
// AP-Netif an DNS weitergeben
dns_captive_set_ap_netif(wifi_mgr_get_ap_netif());
// Captive-DNS starten
ESP_ERROR_CHECK(dns_captive_start());
portal_http_callbacks_t cb = {
.load_sta_creds = app_load_sta_creds,
.save_sta_creds_and_reconnect= app_save_sta_creds_and_reconnect,
.save_device_info = app_save_device_info
};
ESP_ERROR_CHECK(portal_http_start(
wifi_mgr_get_event_group(),
wifi_mgr_evt_sta_got_ip(),
wifi_mgr_evt_sta_fail(),
"nanoPSX",
&cb
));
// SEN5x
const sen5x_i2c_cfg_t cfg = {
.addr = 0x69,
.port = 0,
@@ -382,7 +424,7 @@ void app_main(void)
};
ESP_ERROR_CHECK(sen5x_app_init(&cfg));
// 5) Task starten
// Task starten
xTaskCreate(sen5x_app_task, "sen5x_task", 4096, NULL, 5, NULL);
for (;;) vTaskDelay(pdMS_TO_TICKS(1000));
+1 -1
View File
@@ -160,7 +160,7 @@ bool net_mdns_find_service_url(const char* service, const char* proto,
}
if (!txt_ok) continue;
if (r->instance_name && strncmp(r->instance_name, "influxdb2-", 9) != 0) {
if (r->instance_name && strncmp(r->instance_name, "myapp-", 5) != 0) {
continue; // falsche Instanz, weitersuchen
}
+17 -14
View File
@@ -19,13 +19,10 @@
#include "http_portal.h"
#include "wifi_mgr.h"
#include "storage.h" // NVS-Zugriffe
#include "storage.h"
#include "net_mdns.h"
#include "sys_status.h"
// Captive-DNS ist in http_portal.c implementiert:
void dns_captive_start(void);
void dns_captive_stop(void);
#include "dns_captive.h"
// ---------- Konfig ----------
#define SOFTAP_SSID "nanoPSX"
@@ -304,8 +301,6 @@ static void wifi_start_ap_sta(void) {
// ---------- Öffentliche API ----------
void wifi_mgr_init(void) {
// NVS (neu über storage)
ESP_ERROR_CHECK(storage_init());
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());
@@ -326,16 +321,24 @@ void wifi_mgr_init(void) {
}
void wifi_mgr_start(void) {
// AP+STA hochfahren
wifi_start_ap_sta();
ESP_LOGI(TAG, "WiFi AP+STA gestartet.");
}
// HTTP-Portal starten (erzwingt Captive bis Save, s. http_portal.c)
ESP_ERROR_CHECK(portal_http_start(wifi_events, EVT_STA_GOTIP, EVT_STA_FAIL, SOFTAP_SSID));
EventGroupHandle_t wifi_mgr_get_event_group(void) {
return wifi_events;
}
// DNS/Captive starten
(void)dns_captive_start();
EventBits_t wifi_mgr_evt_sta_got_ip(void) {
return EVT_STA_GOTIP;
}
ESP_LOGI(TAG, "Bereit. Verbinde dich mit '%s' und öffne beliebige Seite – das Portal erscheint.", SOFTAP_SSID);
EventBits_t wifi_mgr_evt_sta_fail(void) {
return EVT_STA_FAIL;
}
esp_netif_t *wifi_mgr_get_ap_netif(void) {
return netif_ap;
}
// ---------- Hilfsfunktionen ----------
@@ -360,7 +363,7 @@ static void mdns_discover_task(void *arg) {
const TickType_t kDelay = pdMS_TO_TICKS(60000); // 60 s
for (;;) {
// Erst offizieller Service, dann Fallback auf HTTP:8086
esp_err_t err = net_mdns_autodiscover_and_store("_influxdb2", "_tcp", -1,
esp_err_t err = net_mdns_autodiscover_and_store("_myapp", "_tcp", -1,
NULL, NULL, 2000);
if (err != ESP_OK) {
err = net_mdns_autodiscover_and_store("_http", "_tcp", 8086,
+13
View File
@@ -10,6 +10,19 @@ void wifi_mgr_init(void);
// Startet AP+STA, HTTP-Server und DNS-Server, und stößt ggf. eine STA-Verbindung an.
void wifi_mgr_start(void);
// vorhandene Funktionen, die du schon hattest
bool wifi_mgr_load_sta_creds(char **out_ssid, char **out_pass);
void wifi_mgr_save_sta_creds_and_reconnect(const char* ssid, const char* pass);
void wifi_mgr_save_device_info(const char* devicename,
const char* token,
const char* bucket,
const char* org);
// NEU: Getter für main.c
EventGroupHandle_t wifi_mgr_get_event_group(void);
EventBits_t wifi_mgr_evt_sta_got_ip(void);
EventBits_t wifi_mgr_evt_sta_fail(void);
esp_netif_t *wifi_mgr_get_ap_netif(void);
#ifdef __cplusplus
}
-238
View File
@@ -1,238 +0,0 @@
// File: src/http_portal.c
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "esp_log.h"
#include "esp_wifi.h"
#include "esp_http_server.h"
#include "http_portal.h"
#include "storage.h"
// Provided by WiFi Manager (defined in wifi_mgr.c)
bool wifi_mgr_load_sta_creds(char **out_ssid, char **out_pass);
void wifi_mgr_save_sta_creds_and_reconnect(const char* ssid, const char* pass);
// NEW: Save device properties (implemented in wifi_mgr.c)
void wifi_mgr_save_device_info(const char* devicename, const char* token, const char* bucket, const char* org);
static char* html_escape(const char* s) {
if (!s) return strdup("");
size_t len = 0;
for (const char* p = s; *p; ++p) {
switch(*p){ case '&': len+=5; break; case '<': case '>': len+=4; break; case '"': case '\'': len+=6; break; default: len+=1; }
}
char* out = (char*)malloc(len+1); if(!out) return NULL;
char* o = out;
for (const char* p = s; *p; ++p) {
switch(*p){
case '&': memcpy(o,"&amp;",5); o+=5; break;
case '<': memcpy(o,"&lt;",4); o+=4; break;
case '>': memcpy(o,"&gt;",4); o+=4; break;
case '"': memcpy(o,"&quot;",6);o+=6; break;
case '\'':memcpy(o,"&#39;",5); o+=5; break;
default: *o++ = *p;
}
}
*o = '\0';
return out;
}
static const char *TAG = "portal_http";
static httpd_handle_t s_http = NULL;
static EventGroupHandle_t s_wifi_events = NULL;
static EventBits_t s_BIT_GOTIP = 0;
static EventBits_t s_BIT_FAIL = 0;
static char s_ap_ssid[33] = {0};
// ---------- HTML (template with placeholders) ----------
static const char form_html_tpl[] =
"<!doctype html><html><head><meta charset='utf-8'/>"
"<meta name='viewport' content='width=device-width,initial-scale=1'/>"
"<title>Wi-Fi Setup</title>"
"<style>body{font-family:system-ui,Arial;margin:2rem;line-height:1.4}"
"label{display:block;margin-top:1rem}input,select{padding:.5rem;width:100%%;max-width:28rem}"
"button{margin-top:1rem;padding:.6rem 1rem;border:0;border-radius:.6rem;background:#0b6cff;color:#fff;}"
".card{max-width:32rem;padding:1rem 1.25rem;border:1px solid #e5e5e5;border-radius:1rem;box-shadow:0 2px 10px rgba(0,0,0,.04)}"
".row{display:flex;gap:.5rem;align-items:center;max-width:28rem}"
".muted{color:#666;font-size:.9em}</style>"
"</head><body><div class='card'>"
"<h1>Wi-Fi Configuration</h1>"
"<p>Connected to <b>%s</b>. Choose your Wi-Fi network or enter it manually:</p>"
"<div class='row'><select id='nets'></select><button id='refresh' type='button'>Refresh</button></div>"
"<form method='POST' action='/save'>"
"<label>SSID*<input id='ssid' name='ssid' required></label>"
"<label>Password*<input name='pass' type='password' required></label>"
"<label>Device Name*<input id='dev' name='dev' required value='%s' placeholder=''></label>"
"<label>Organization (optional)<input id='org' name='org' placeholder='' value='%s'></label>"
"<label>Bucket (optional)<input id='bucket' name='bucket' placeholder='' value='%s'></label>"
"<label>Token<input id='token' name='token' placeholder=''></label>"
"<button type='submit'>Save & Connect</button>"
"</form>"
"<p class='muted'>After saving, the device will connect to your Wi-Fi network. "
"The access point will automatically shut down shortly afterward.</p>"
"</div>"
"<script>"
"async function load(){try{"
" let r=await fetch('/scan'); if(!r.ok) throw 0; let a=await r.json();"
" let s=document.getElementById('nets'); s.innerHTML='';"
" a.sort((x,y)=>y.rssi-x.rssi);"
" a.forEach(n=>{let o=document.createElement('option');"
" o.value=n.ssid; o.textContent=n.ssid+' ('+n.rssi+' dBm)'; s.appendChild(o);});"
" if(a.length && !document.getElementById('ssid').value){"
" document.getElementById('ssid').value=a[0].ssid;}"
"}catch(e){console.log(e);}}"
"document.getElementById('refresh').onclick=load;"
"document.getElementById('nets').onchange=function(){document.getElementById('ssid').value=this.value;};"
"load();"
"</script>"
"</body></html>";
static const char saved_html[] =
"<!doctype html><html><head><meta charset='utf-8'/>"
"<meta name='viewport' content='width=device-width,initial-scale=1'/>"
"<title>Saved</title></head><body>"
"<h1>✔️ Saved</h1>"
"<p>The credentials have been saved. The device is now connecting to your Wi-Fi…</p>"
"<script>setTimeout(()=>location.href='/status',1500)</script>"
"</body></html>";
static const char status_tpl[] =
"<!doctype html><html><head><meta charset='utf-8'/>"
"<meta name='viewport' content='width=device-width,initial-scale=1'/>"
"<title>Status</title></head><body>"
"<h1>Connection Status</h1>"
"<p>%s</p>"
"<p><a href='/'>Back</a></p>"
"</body></html>";
// ---------- simple URL decoder ----------
static int hexval(char c){ if(c>='0'&&c<='9')return c-'0'; if(c>='a'&&c<='f')return 10+c-'a'; if(c>='A'&&c<='F')return 10+c-'A'; return -1; }
static void urldecode(char* s){
char* o = s;
for(char* i=s; *i; ++i){
if(*i=='+'){ *o++=' '; }
else if(*i=='%' && hexval(i[1])>=0 && hexval(i[2])>=0){ *o++ = (char)((hexval(i[1])<<4)|hexval(i[2])); i+=2; }
else { *o++=*i; }
}
*o='\0';
}
// ---------- HTTP Handlers ----------
static esp_err_t root_get(httpd_req_t *req) {
char *org = NULL, *bucket = NULL, *token = NULL;
if (!storage_get_effective_influx(&org, &bucket, &token)) {
org = strdup("");
bucket = strdup("");
token = strdup("");
if (!org || !bucket || !token) {
if (org) free(org);
if (bucket) free(bucket);
if (token) free(token);
return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "oom");
}
}
char *dev_raw = NULL;
if (!storage_get_effective_device_name(&dev_raw)) {
dev_raw = strdup("");
if (!dev_raw) {
free(org); free(bucket); free(token);
return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "oom");
}
}
char *dev_esc = html_escape(dev_raw);
char *org_esc = html_escape(org ? org : "");
char *bucket_esc = html_escape(bucket ? bucket : "");
if (!dev_esc || !org_esc || !bucket_esc) {
if (dev_esc) free(dev_esc);
if (org_esc) free(org_esc);
if (bucket_esc) free(bucket_esc);
free(org); free(bucket); free(token);
free(dev_raw);
return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "oom");
}
int need = snprintf(NULL, 0, form_html_tpl,
s_ap_ssid,
dev_esc,
org_esc,
bucket_esc);
if (need < 0) {
free(org); free(bucket); free(token);
free(dev_raw);
free(dev_esc); free(org_esc); free(bucket_esc);
return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "format error");
}
char *page = (char*)malloc((size_t)need + 1);
if (!page) {
free(org); free(bucket); free(token);
free(dev_raw);
free(dev_esc); free(org_esc); free(bucket_esc);
return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "oom");
}
snprintf(page, (size_t)need + 1, form_html_tpl,
s_ap_ssid,
dev_esc,
org_esc,
bucket_esc);
httpd_resp_set_type(req, "text/html; charset=utf-8");
esp_err_t r = httpd_resp_send(req, page, HTTPD_RESP_USE_STRLEN);
free(page);
free(org); free(bucket); free(token);
free(dev_raw);
free(dev_esc); free(org_esc); free(bucket_esc);
return r;
}
static esp_err_t captive_ok(httpd_req_t *req) {
EventBits_t bits = xEventGroupGetBits(s_wifi_events);
if (bits & s_BIT_GOTIP) {
httpd_resp_set_status(req, "204 No Content");
httpd_resp_set_type(req, "text/plain");
return httpd_resp_send(req, NULL, 0);
} else {
httpd_resp_set_type(req, "text/html; charset=utf-8");
const char msg[] = "<html><body>OK</body></html>";
return httpd_resp_send(req, msg, HTTPD_RESP_USE_STRLEN);
}
}
static esp_err_t status_get(httpd_req_t *req) {
EventBits_t bits = xEventGroupGetBits(s_wifi_events);
const char *msg = (bits & s_BIT_GOTIP) ? "✅ Connected to external Wi-Fi."
: (bits & s_BIT_FAIL) ? "❌ Connection failed. Please check your credentials."
: "⏳ Connecting...";
int need = snprintf(NULL, 0, status_tpl, msg);
if (need < 0) return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "format error");
char *page = (char*)malloc((size_t)need + 1);
if (!page) return httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "oom");
snprintf(page, (size_t)need + 1, status_tpl, msg);
httpd_resp_set_type(req, "text/html; charset=utf-8");
esp_err_t r = httpd_resp_send(req, page, HTTPD_RESP_USE_STRLEN);
free(page);
return r;
}
static esp_err_t favicon_get(httpd_req_t *req) {
httpd_resp_set_status(req, "204 No Content");
httpd_resp_set_type(req, "image/x-icon");
return httpd_resp_send(req, NULL, 0);
}
// The rest of the logic (save_post, scan_get, start_http, portal_http_start, portal_http_stop)
// remains IDENTICAL to your provided code above — only text/UI changes were made.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+8 -3
View File
@@ -1,8 +1,13 @@
{
"folders": [
{ "name": "nanopsx-root", "path": "."},
{ "name": "firmware", "path": "firmware" },
{ "name": "desktop-app", "path": "desktop-app" }
{
"name": "nanopsx-root",
"path": "."
},
{
"name": "firmware",
"path": "firmware"
}
],
"settings": {
// Optional: hier könntest du später projektweite Settings reinpacken
Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
- mit Administratorrechten wird angefordert …
+14
View File
@@ -0,0 +1,14 @@
INFLUXDB_INIT_URL=http://localhost:8086
INFLUXDB_INIT_TOKEN=0946c41441a85088b38d39da6ed06d75a
INFLUXDB_INIT_ADMIN_TOKEN=0946c41441a85088b38d39da6ed06d75a
INFLUXDB_INIT_MODE=setup
INFLUXDB_INIT_USERNAME=admin
INFLUXDB_INIT_PASSWORD=12345678
INFLUXDB_INIT_ORG=myorg
INFLUXDB_INIT_BUCKET=nanoPSX
INFLUX_URL=http://localhost:8086
INFLUX_TOKEN=0946c41441a85088b38d39da6ed06d75a
INFLUX_ORG=myorg
INFLUX_BUCKET=nanoPSX
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+383
View File
@@ -0,0 +1,383 @@
:: =============================================================
:: Selbst-Elevation – verlangt Adminrechte, falls nicht vorhanden
:: =============================================================
@echo off
net session >nul 2>&1
if %errorlevel% NEQ 0 (
echo -> Neustart mit Administratorrechten wird angefordert …
powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
exit /b
)
:: -------------------- ab hier läuft das Skript erhöht --------------------
chcp 65001 >nul
title Installation: InfluxDB 2
setlocal DisableDelayedExpansion
echo ==============================================================
echo InfluxDB 2 und InfluxDBmDNS werden installiert - bitte etwas Geduld …
echo ==============================================================
rem ----------------------------------------------------------------
rem 0) Konstanten / Service-Namen
rem ----------------------------------------------------------------
set "TARGET=C:\Program Files\InfluxDB2"
set "PD=%ProgramData%\InfluxDB2"
set "SVC_DB=InfluxDB2"
set "SVC_MDNS=InfluxDBmDNS"
set "EXE_DB=%TARGET%\influxd.exe"
set "EXE_MDNS=%TARGET%\InfluxDBmDNS.exe"
set "NSSM=%TARGET%\nssm.exe"
set "LOG_DB_OUT=%PD%\influxd.out.log"
set "LOG_DB_ERR=%PD%\influxd.err.log"
set "LOG_MDNS_OUT=%PD%\influxmdns.out.log"
set "LOG_MDNS_ERR=%PD%\influxmdns.err.log"
rem ----------------------------------------------------------------
rem 1) Konfigurationsdatei einlesen
rem ----------------------------------------------------------------
echo.
echo [1/7] Konfiguration einlesen …
set "CFG_FILE=%~dp0config.txt"
if not exist "%CFG_FILE%" (
echo [FEHLER] %CFG_FILE% nicht gefunden!
pause & exit /b 1
)
for /f "usebackq eol=# tokens=1* delims==" %%A in ("%CFG_FILE%") do (
if not "%%~A"=="" (
for /f "tokens=* delims= " %%X in ("%%~B") do set "%%~A=%%~X"
)
)
rem Kurz-Aliase
set "URL=%INFLUXDB_INIT_URL%"
set "TOKEN=%INFLUXDB_INIT_TOKEN%"
set "ADMIN_TOKEN=%INFLUXDB_INIT_ADMIN_TOKEN%"
set "USER=%INFLUXDB_INIT_USERNAME%"
set "PASS=%INFLUXDB_INIT_PASSWORD%"
set "ORG=%INFLUXDB_INIT_ORG%"
set "BUCKET=%INFLUXDB_INIT_BUCKET%"
rem ----------------------------------------------------------------
rem 2) Dateien kopieren (mit Prozess-Check und Retry-Logik)
rem ----------------------------------------------------------------
echo.
echo [2/7] Dateien vorbereiten und kopieren …
echo Zielordner "%TARGET%" anlegen …
if not exist "%TARGET%" (
mkdir "%TARGET%" || (
echo [FEHLER] Ordner konnte nicht angelegt werden.
pause & exit /b 1
)
)
echo ProgramData-Ordner sicherstellen …
if not exist "%PD%" (
mkdir "%PD%" >nul 2>&1
if errorlevel 1 (
echo [FEHLER] Konnte "%PD%" nicht anlegen.
echo Bitte Rechte/Antivirus/Ransomware-Schutz pruefen.
pause
exit /b 1
)
)
rem Schreibrechte testen
echo test>"%PD%\write.test" 2>nul
if errorlevel 1 (
echo [FEHLER] Keine Schreibrechte in "%PD%".
echo Bitte Rechte/Antivirus/Ransomware-Schutz pruefen.
pause
exit /b 1
)
echo Beende blockierende Prozesse …
rem --- sicher mDNS stoppen (falls vorhanden/laufend), sonst nur Prozess killen ---
call :stop_service_safe "%SVC_MDNS%" 30 "InfluxDBmDNS.exe"
rem --- sicher DB stoppen (falls vorhanden/laufend), sonst nur Prozess killen ---
call :stop_service_safe "%SVC_DB%" 30 "influxd.exe"
rem Selbstkopie vermeiden, falls Script bereits aus dem Zielordner gestartet wurde
if /I "%~dp0"=="%TARGET%\" (
echo Quelle und Ziel sind identisch - Kopieren uebersprungen.
set "copy_success=1"
goto :copy_done
)
echo Dateien kopieren (max. 3 Versuche) …
set "copy_success=0"
for /l %%i in (1,1,3) do (
xcopy "%~dp0*" "%TARGET%\" /E /I /Y /Q >nul && (
set "copy_success=1"
goto :copy_done
)
if %%i lss 3 (
echo Versuch %%i fehlgeschlagen - neuer Versuch in 2 Sekunden …
timeout /t 2 >nul
echo Erneutes Beenden blockierender Prozesse …
taskkill /IM influxd.exe /F >nul 2>&1
taskkill /IM InfluxDBmDNS.exe /F >nul 2>&1
)
)
:copy_done
if %copy_success% neq 1 (
echo [FEHLER] Kopieren nach 3 Versuchen fehlgeschlagen.
echo Mögliche Ursachen:
echo 1. Dateien werden durch andere Prozesse gesperrt
echo 2. Fehlende Administratorrechte
echo 3. Antivirensoftware blockiert den Zugriff
pause & exit /b 1
)
rem ----------------------------------------------------------------
rem 3) PATH anpassen
rem ----------------------------------------------------------------
echo.
echo [3/7] PATH-Variable prüfen …
set "PATH_PAD=;%PATH%;"
echo %PATH_PAD% | find /I ";%TARGET%;" >nul
if errorlevel 1 (
setx PATH "%PATH%;%TARGET%" >nul && echo -> Ordner in PATH eingetragen.
) else (
echo -> Ordner bereits im PATH.
)
rem ----------------------------------------------------------------
rem 4) Dienste installieren/aktualisieren (NSSM), konfigurieren & Recovery
rem ----------------------------------------------------------------
echo.
echo [4a/7] Dienste anlegen/aktualisieren …
if not exist "%NSSM%" (
echo [FEHLER] nssm.exe nicht gefunden in "%TARGET%".
pause & exit /b 1
)
rem ---- InfluxDB2 (install/update & config) ----
sc.exe query "%SVC_DB%" >nul 2>&1
if %errorlevel%==0 (
echo -> Dienst "%SVC_DB%" existiert bereits. Aktualisiere Eigenschaften …
"%NSSM%" set "%SVC_DB%" Application "%EXE_DB%" >nul
) else (
echo -> Installiere neuen Dienst "%SVC_DB%" …
"%NSSM%" install "%SVC_DB%" "%EXE_DB%"
if errorlevel 1 (
echo [FEHLER] NSSM-Installation von %SVC_DB% fehlgeschlagen.
pause & exit /b 1
)
)
"%NSSM%" set "%SVC_DB%" AppDirectory "%TARGET%" >nul
"%NSSM%" set "%SVC_DB%" AppStdout "%LOG_DB_OUT%" >nul
"%NSSM%" set "%SVC_DB%" AppStderr "%LOG_DB_ERR%" >nul
"%NSSM%" set "%SVC_DB%" AppRotateFiles 1 >nul
"%NSSM%" set "%SVC_DB%" AppRotateOnline 1 >nul
"%NSSM%" set "%SVC_DB%" AppRotateBytes 10485760 >nul
"%NSSM%" set "%SVC_DB%" AppStopMethodSkip 0 >nul
sc.exe config "%SVC_DB%" start= delayed-auto obj= "LocalSystem" DisplayName= "InfluxDB 2 Server" >nul
sc.exe failure "%SVC_DB%" reset= 86400 actions= restart/5000/restart/5000/restart/600000 >nul
rem ---- InfluxDBmDNS (install/update & config) ----
sc.exe query "%SVC_MDNS%" >nul 2>&1
if %errorlevel%==0 (
echo -> Dienst "%SVC_MDNS%" existiert bereits. Aktualisiere Eigenschaften …
"%NSSM%" set "%SVC_MDNS%" Application "%EXE_MDNS%" >nul
) else (
echo -> Installiere neuen Dienst "%SVC_MDNS%" …
"%NSSM%" install "%SVC_MDNS%" "%EXE_MDNS%"
if errorlevel 1 (
echo [FEHLER] NSSM-Installation von %SVC_MDNS% fehlgeschlagen.
pause & exit /b 1
)
)
"%NSSM%" set "%SVC_MDNS%" AppDirectory "%TARGET%" >nul
"%NSSM%" set "%SVC_MDNS%" AppStdout "%LOG_MDNS_OUT%" >nul
"%NSSM%" set "%SVC_MDNS%" AppStderr "%LOG_MDNS_ERR%" >nul
"%NSSM%" set "%SVC_MDNS%" AppRotateFiles 1 >nul
"%NSSM%" set "%SVC_MDNS%" AppRotateOnline 1 >nul
"%NSSM%" set "%SVC_MDNS%" AppRotateBytes 10485760 >nul
"%NSSM%" set "%SVC_MDNS%" AppStopMethodSkip 0 >nul
"%NSSM%" set "%SVC_DB%" AppPriority HIGH_PRIORITY_CLASS
rem Starttyp/Anzeigename & Abhängigkeit (mDNS nach DB)
sc.exe config "%SVC_MDNS%" start= delayed-auto obj= "LocalSystem" DisplayName= "InfluxDB2 Announce" depend= %SVC_DB% >nul
sc.exe failure "%SVC_MDNS%" reset= 86400 actions= restart/5000/restart/5000/restart/600000 >nul
sc.exe config "%SVC_DB%" depend= Tcpip
rem Windows-Firewall: InfluxDB-Port zulassen (eingehend)
netsh advfirewall firewall show rule name="InfluxDB 8086 In" | findstr /I "No rules match" >nul && ^
netsh advfirewall firewall add rule name="InfluxDB 8086 In" dir=in action=allow protocol=TCP localport=8086 >nul
rem mDNS (UDP 5353) zulassen (eingehend)
netsh advfirewall firewall show rule name="mDNS 5353 In" | findstr /I "No rules match" >nul && ^
netsh advfirewall firewall add rule name="mDNS 5353 In" dir=in action=allow protocol=UDP localport=5353 >nul
echo.
echo [4b/7] Energieeinstellungen fuer 24/7-Betrieb setzen ...
:: Hibernate komplett aus (verhindert unerwartetes Wegnicken/Hiberfile)
powercfg /hibernate off
:: Auf Netzbetrieb: niemals Standby, niemals Monitor-Sleep
powercfg -change -standby-timeout-ac 0
powercfg -change -monitor-timeout-ac 0
:: Optional: auch auf Akku, falls Laptop
powercfg -change -standby-timeout-dc 0
powercfg -change -monitor-timeout-dc 0
:: High Performance/Ultimative Leistung aktivieren (wo vorhanden)
powercfg -setactive SCHEME_MIN
:: Diagnose ausgeben (sollte zeigen, dass kein Standby-Timer gesetzt ist)
powercfg /getactivescheme
powercfg /query
rem ----------------------------------------------------------------
rem 5) Dienste starten (Re-Start) + Health-Check
rem ----------------------------------------------------------------
echo.
echo [5/7] Dienste starten …
echo Stoppe ggf. laufende Instanzen …
sc.exe stop "%SVC_DB%" >nul 2>&1
sc.exe stop "%SVC_MDNS%" >nul 2>&1
timeout /t 2 >nul
echo Starte InfluxDB2 …
sc.exe start "%SVC_DB%" >nul 2>&1
timeout /t 2 >nul
echo Starte InfluxDBmDNS (haengt von InfluxDB2 ab) …
sc.exe start "%SVC_MDNS%" >nul 2>&1
timeout /t 2 >nul
echo Fuehre kurzen Health-Check durch (nicht fatal) …
powershell -NoProfile -Command ^
"$u=[uri]'%URL%'; try { $r=Invoke-WebRequest -Uri ($u.AbsoluteUri.TrimEnd('/') + '/health') -UseBasicParsing -TimeoutSec 5; if($r.StatusCode -ge 200 -and $r.StatusCode -lt 500){ exit 0 } else { exit 1 } } catch { exit 1 }" ^
>nul 2>&1
if errorlevel 1 (
echo [WARNUNG] /health nicht bestaetigt - fahre fort. Pruefe später ggf. "%LOG_DB_ERR%"
)
rem ----------------------------------------------------------------
rem 6) InfluxDB2 konfigurieren (Setup falls noch nicht erfolgt)
rem ----------------------------------------------------------------
echo.
echo [6/7] InfluxDB2 konfigurieren …
echo Warte, bis %URL% erreichbar ist …
powershell -NoProfile -Command ^
"$u=[uri]'%URL%'; while(-not (Test-NetConnection $u.Host -Port $u.Port).TcpTestSucceeded){Start-Sleep 2}"
echo Fuehre Setup/Provisioning aus …
"%TARGET%\influx.exe" setup --host "%URL%" --token "%ADMIN_TOKEN%" --org "%ORG%" --bucket "%BUCKET%" --username "%USER%" --password "%PASS%" --retention 0 --force
rem ----------------------------------------------------------------
rem 6) Dashboard-Template importieren
rem ----------------------------------------------------------------
echo.
echo [7/7] Dashboard-Template importieren …
timeout /t 8 /nobreak >nul
"%TARGET%\influx.exe" apply -f "%~dp0template.yml" --force yes --host "%URL%" --org "%ORG%" --token "%ADMIN_TOKEN%"
if errorlevel 1 (
echo [FEHLER] Dashboard-Import fehlgeschlagen.
pause & exit /b 1
)
rem -- Web-UI oeffnen (robust) --
set "OPEN_URL=%URL%"
rem erst Explorer versuchen
start "" "%OPEN_URL%" >nul 2>&1
if errorlevel 1 (
rem Fallback: PowerShell
powershell -NoProfile -Command "Start-Process '%OPEN_URL%'" >nul 2>&1
)
echo.
echo ==============================================================
echo Installation abgeschlossen! --^> %URL%
echo Benutzer: %USER%
echo Hinweis: Passwort steht in der config.txt
echo ==============================================================
echo Druecken Sie eine beliebige Taste, um das Fenster zu schliessen …
pause >nul
endlocal & exit /b
:: -------------------------------------------------
:: stop_service_safe <Dienstname> <TimeoutSek> <Prozess.exe>
:: - Stoppt Dienst nur wenn RUNNING
:: - Wartet bis STOPPED (oder bis Timeout)
:: - Killt zusätzlich den Prozessnamen (falls noch da)
:: -------------------------------------------------
:stop_service_safe
setlocal EnableDelayedExpansion
set "SVC=%~1"
set "WTO=%~2"
set "PROC=%~3"
rem Existiert der Dienst?
sc.exe query "%SVC%" >nul 2>&1
if errorlevel 1 (
rem Dienst existiert nicht -> nur Prozess ggf. killen
goto :kill_only
)
rem Läuft der Dienst?
sc.exe query "%SVC%" | find /I "STATE" | find /I "RUNNING" >nul
if not errorlevel 1 (
sc.exe stop "%SVC%" >nul 2>&1
call :wait_service "%SVC%" "%WTO%"
)
:kill_only
rem Prozess ggf. beenden (Fehler egal, Output stumm)
tasklist /FI "IMAGENAME eq %PROC%" | find /I "%PROC%" >nul 2>&1 && ^
taskkill /IM "%PROC%" /F >nul 2>&1
endlocal & exit /b 0
:: -------------------------------------------------
:: wait_service <Dienstname> <TimeoutSek>
:: - Wartet bis STATE = STOPPED (oder Dienst fehlt)
:: - Bricht nach Timeout Sekunden ab (ohne Fehler)
:: -------------------------------------------------
:wait_service
setlocal EnableDelayedExpansion
set "WSVC=%~1"
set "WTO=%~2"
if "%WTO%"=="" set "WTO=30"
set /a tries=0
:ws_loop
rem Falls Dienst gar nicht (mehr) existiert -> fertig
sc.exe query "%WSVC%" >nul 2>&1
if errorlevel 1 goto :ws_done
rem Prüfen ob STOPPED
sc.exe query "%WSVC%" | find /I "STATE" | find /I "STOPPED" >nul
if not errorlevel 1 goto :ws_done
set /a tries+=1
if !tries! LSS %WTO% (timeout /t 1 >nul & goto :ws_loop)
:ws_done
endlocal & exit /b 0
+1
View File
File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.
+239
View File
@@ -0,0 +1,239 @@
apiVersion: influxdata.com/v2alpha1
kind: Bucket
metadata:
name: upbeat-mcnulty-368001
spec:
name: nanoPSX
---
apiVersion: influxdata.com/v2alpha1
kind: Dashboard
metadata:
name: gifted-merkle-368003
spec:
charts:
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: PM in µg/m³
name: "y"
scale: linear
colorizeRows: true
colors:
- hex: '#31C0F6'
id: gn8opD8FYHpdP9l6CXhi_
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: JXNrl7rhdmj6MpdzdV4Hr
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: 64BlYjHQG4cyQCVq6ZPXW
name: Nineteen Eighty Four
type: scale
geom: line
height: 5
heightRatio: 0.38
hoverDimension: auto
kind: Xy
legendColorizeRows: true
legendOpacity: 1
legendOrientationThreshold: -1
name: Particulate Matter
opacity: 1
orientationThreshold: 1e+08
position: overlaid
queries:
- query: |-
from(bucket: "nanoPSX")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "air")
|> filter(fn: (r) => r["device"] == "Sensor")
|> filter(fn: (r) => r["_field"] == "pm1" or r["_field"] == "pm10" or r["_field"] == "pm2_5" or r["_field"] == "pm4")
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")
show: true
staticLegend:
colorizeRows: true
heightRatio: 0.38
opacity: 1
orientationThreshold: 1e+08
show: true
widthRatio: 1
width: 12
widthRatio: 1
xCol: _time
yCol: _value
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: VOC Index
name: "y"
scale: linear
colorizeRows: true
colors:
- hex: '#31C0F6'
id: xDO4vx9SvCUHiSlUnKoNg
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: K1DajEvwAhjl77hA-Foxl
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: -W0sWt6s79pGyEZylQve4
name: Nineteen Eighty Four
type: scale
geom: line
height: 5
heightRatio: 0.19094488188976377
hoverDimension: auto
kind: Xy
legendColorizeRows: true
legendOpacity: 1
legendOrientationThreshold: 1e+08
name: Volatile Organic Compounds
opacity: 1
orientationThreshold: 1e+08
position: overlaid
queries:
- query: |-
from(bucket: "nanoPSX")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "air")
|> filter(fn: (r) => r["device"] == "Sensor")
|> filter(fn: (r) => r["_field"] == "voc")
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")
show: true
staticLegend:
colorizeRows: true
heightRatio: 0.19094488188976377
opacity: 1
orientationThreshold: 1e+08
show: true
widthRatio: 1
width: 4
widthRatio: 1
xCol: _time
yCol: _value
yPos: 5
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: T in °C
name: "y"
scale: linear
colorizeRows: true
colors:
- hex: '#31C0F6'
id: xDO4vx9SvCUHiSlUnKoNg
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: K1DajEvwAhjl77hA-Foxl
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: -W0sWt6s79pGyEZylQve4
name: Nineteen Eighty Four
type: scale
geom: line
height: 5
heightRatio: 0.19094488188976377
hoverDimension: auto
kind: Xy
legendColorizeRows: true
legendOpacity: 1
legendOrientationThreshold: 1e+08
name: Temperature
opacity: 1
orientationThreshold: 1e+08
position: overlaid
queries:
- query: |-
from(bucket: "nanoPSX")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "air")
|> filter(fn: (r) => r["device"] == "Sensor")
|> filter(fn: (r) => r["_field"] == "temp")
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")
show: true
staticLegend:
colorizeRows: true
heightRatio: 0.19094488188976377
opacity: 1
orientationThreshold: 1e+08
show: true
widthRatio: 1
width: 4
widthRatio: 1
xCol: _time
xPos: 4
yCol: _value
yPos: 5
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: RH in %
name: "y"
scale: linear
colorizeRows: true
colors:
- hex: '#31C0F6'
id: xDO4vx9SvCUHiSlUnKoNg
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: K1DajEvwAhjl77hA-Foxl
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: -W0sWt6s79pGyEZylQve4
name: Nineteen Eighty Four
type: scale
geom: line
height: 5
heightRatio: 0.19094488188976377
hoverDimension: auto
kind: Xy
legendColorizeRows: true
legendOpacity: 1
legendOrientationThreshold: 1e+08
name: Relative Humidity
opacity: 1
orientationThreshold: 1e+08
position: overlaid
queries:
- query: |-
from(bucket: "nanoPSX")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "air")
|> filter(fn: (r) => r["device"] == "Sensor")
|> filter(fn: (r) => r["_field"] == "rh" or r["_field"] == "hum")
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")
show: true
staticLegend:
colorizeRows: true
heightRatio: 0.19094488188976377
opacity: 1
orientationThreshold: 1e+08
show: true
widthRatio: 1
width: 4
widthRatio: 1
xCol: _time
xPos: 8
yCol: _value
yPos: 5
name: nanoPSX
BIN
View File
Binary file not shown.
+76
View File
@@ -0,0 +1,76 @@
# announce.py
from zeroconf import ServiceInfo, Zeroconf
import socket
import re
import sys
import time
import signal
SERVICE_TYPE = "_influxdb2._tcp.local."
PORT = 8086
# ---------------- helpers ----------------
def get_lan_ip() -> str:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
s.connect(("8.8.8.8", 80))
ip = s.getsockname()[0]
finally:
s.close()
return ip
def mdns_safe_hostname(name: str) -> str:
name = name.strip().lower()
name = re.sub(r"[^a-z0-9-]", "-", name)
name = re.sub(r"-{2,}", "-", name)
name = name.strip("-") or "host"
return name
# ---------------- main ----------------
stop = False
def handle_signal(sig, frame):
global stop
stop = True
def main():
raw_host = socket.gethostname()
host = mdns_safe_hostname(raw_host)
try:
ip = get_lan_ip()
except Exception as e:
sys.exit(1)
server_fqdn = f"{host}.local."
instance_name = f"influxdb2-{host}.{SERVICE_TYPE}"
txt = {"role": "primary", "path": "/", "ver": "1.0.0"}
info = ServiceInfo(
type_=SERVICE_TYPE,
name=instance_name,
addresses=[socket.inet_aton(ip)],
port=PORT,
properties=txt,
server=server_fqdn,
)
zc = Zeroconf()
signal.signal(signal.SIGINT, handle_signal)
signal.signal(signal.SIGTERM, handle_signal)
try:
# hier kannst du evtl. in ein Logfile schreiben, statt print
print(f"Announce {instance_name} @ {ip}:{PORT}")
zc.register_service(info)
while not stop:
time.sleep(1)
finally:
try:
zc.unregister_service(info)
finally:
zc.close()
print("Zeroconf: beendet.")
if __name__ == "__main__":
main()
+34
View File
@@ -0,0 +1,34 @@
from zeroconf import Zeroconf, ServiceBrowser
SERVICE = "_myapp._tcp.local."
class Listener:
def __init__(self, zc: Zeroconf):
self.zc = zc
def add_service(self, zc, type_, name):
print("ADD ", name)
info = zc.get_service_info(type_, name, timeout=3000)
if info:
addrs = [ "%d.%d.%d.%d" % tuple(a) for a in info.addresses ]
print(" Host: ", info.server)
print(" IPs: ", addrs)
print(" Port: ", info.port)
# TXT-Records
props = { k.decode(): v.decode() for k, v in info.properties.items() }
print(" TXT: ", props)
else:
print(" (keine Details auflösbar)")
def remove_service(self, zc, type_, name):
print("REM ", name)
def update_service(self, zc, type_, name):
print("UPD ", name)
zc = Zeroconf()
try:
ServiceBrowser(zc, SERVICE, Listener(zc))
input("Browsing… Enter zum Beenden\n")
finally:
zc.close()
+186
View File
@@ -0,0 +1,186 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import shutil
import subprocess
import ctypes
import shlex
import time
import re
from pathlib import Path
from typing import Optional
# ----------------------------- Helpers -----------------------------
def run(cmd: str, check: bool = False, capture: bool = False) -> subprocess.CompletedProcess:
"""Führt einen Shell-Befehl aus, loggt ihn und gibt das Ergebnis zurück."""
print(f"> {cmd}")
result = subprocess.run(cmd, shell=True, text=True,
stdout=subprocess.PIPE if capture else None,
stderr=subprocess.STDOUT if capture else None)
if capture and result.stdout:
print(result.stdout.strip())
if check and result.returncode != 0:
raise RuntimeError(f"Befehl fehlgeschlagen (Exit {result.returncode}): {cmd}")
return result
def ensure_admin() -> None:
"""Erhöht bei Bedarf die Rechte via UAC und startet das Skript neu."""
try:
if os.name != "nt":
print("Dieses Skript kann nur unter Windows ausgeführt werden.")
sys.exit(1)
if not ctypes.windll.shell32.IsUserAnAdmin():
script = os.path.abspath(__file__)
params = ' '.join(shlex.quote(arg) for arg in sys.argv[1:])
ctypes.windll.shell32.ShellExecuteW(
None, "runas", sys.executable, f'"{script}" {params}', None, 1
)
sys.exit(0)
except Exception as e:
print(f"Fehler bei der Anforderung von Administratorrechten: {e}")
sys.exit(1)
# ----------------------------- Processes -----------------------------
def stop_process(image_name: str) -> None:
"""Beendet einen Prozess anhand des Image-Namens (ohne .exe)."""
run(f'taskkill /IM "{image_name}.exe" /F /T')
# ----------------------------- Services -----------------------------
_state_re = re.compile(r"STATE\s*:\s*\d+\s+(\w+)", re.IGNORECASE)
def service_exists(name: str) -> bool:
r = run(f'sc.exe query "{name}"', capture=True)
return r.returncode == 0 and "FAILED" not in (r.stdout or "")
def get_service_state(name: str) -> Optional[str]:
r = run(f'sc.exe query "{name}"', capture=True)
if r.returncode != 0:
return None
m = _state_re.search(r.stdout or "")
return m.group(1).upper() if m else None
def wait_for_service_state(name: str, target: str, timeout_s: int = 45) -> bool:
"""Wartet, bis der Dienst den gewünschten Zustand erreicht (z.B. STOPPED)."""
deadline = time.time() + timeout_s
target = target.upper()
while time.time() < deadline:
st = get_service_state(name)
if st is None and target == "DELETED":
return True
if st == target:
return True
time.sleep(1.5)
return False
def stop_service(name: str, timeout_s: int = 45) -> None:
if not service_exists(name):
print(f'Dienst nicht vorhanden: {name} (übersprungen)')
return
state = get_service_state(name)
if state == "STOPPED":
print(f'Dienst bereits gestoppt: {name}')
else:
run(f'sc.exe stop "{name}"')
if not wait_for_service_state(name, "STOPPED", timeout_s):
print(f'⚠️ Timeout beim Stoppen von {name} (fahre fort)')
def delete_service(name: str, timeout_s: int = 30) -> None:
if not service_exists(name):
print(f'Dienst nicht vorhanden: {name} (übersprungen)')
return
run(f'sc.exe delete "{name}"')
# Warten, bis sc query fehlschlägt -> gilt als gelöscht
deadline = time.time() + timeout_s
while time.time() < deadline:
if not service_exists(name):
print(f'Dienst gelöscht: {name}')
return
time.sleep(1.5)
print(f'⚠️ Timeout beim Löschen von {name} (sc query liefert weiterhin Erfolg)')
def stop_and_delete_service(name: str) -> None:
stop_service(name)
delete_service(name)
# ----------------------------- Filesystem -----------------------------
def _on_rm_error(func, path, exc_info):
try:
os.chmod(path, 0o700)
func(path)
except Exception:
pass
def remove_dir(path: Path) -> None:
"""Löscht rekursiv ein Verzeichnis, falls vorhanden (mit Retry bei Sperren)."""
if not path.exists():
print(f"Verzeichnis nicht gefunden (übersprungen): {path}")
return
for attempt in range(3):
try:
shutil.rmtree(path, onerror=_on_rm_error)
print(f"Verzeichnis entfernt: {path}")
return
except Exception as e:
print(f"Fehler beim Entfernen von {path} (Versuch {attempt+1}/3): {e}")
time.sleep(1.5)
print(f"⚠️ Konnte Verzeichnis nicht entfernen: {path}")
# ----------------------------- Main -----------------------------
def main() -> None:
ensure_admin()
# 1) Prozesse beenden (best effort)
stop_process("influxd")
stop_process("serial_to_influxdb")
# 2) Dienste in richtiger Reihenfolge entfernen
# Hinweis: laut Vorgabe hängt InfluxDBmDNS von InfluxDB2 ab,
# deshalb zuerst mDNS entfernen, dann InfluxDB2.
stop_and_delete_service("InfluxDBmDNS")
# Warten, damit abhängige Aufräumarbeiten von mDNS fertig sind
time.sleep(2.0)
stop_and_delete_service("InfluxDB2")
# Optional: euer eigener Dienst, falls vorhanden
stop_and_delete_service("SerialToInfluxService")
# 3) Verzeichnisse löschen
# - Systemprofile: C:\Windows\System32\config\systemprofile\.influxdbv2
# - Benutzerprofil: C:\Users\%USER%\.influxdbv2
# - Program Files: C:\Program Files\InfluxDB2
# - ProgramData: C:\ProgramData\InfluxDB2
systemprofile_influx = Path(r"C:\Windows\System32\config\systemprofile\.influxdbv2")
user_influx = Path(os.path.expandvars(r"%USERPROFILE%")) / ".influxdbv2"
program_files = Path(os.environ.get("ProgramFiles", r"C:\Program Files"))
pf_influx = program_files / "InfluxDB2"
# (Optional) Falls jemand in PF(x86) installiert hat:
program_files_x86 = Path(os.environ.get("ProgramFiles(x86)", r"C:\Program Files (x86)"))
pf86_influx = program_files_x86 / "InfluxDB2"
# NEU: ProgramData-Ordner
program_data = Path(os.environ.get("ProgramData", r"C:\ProgramData"))
pd_influx = program_data / "InfluxDB2"
for p in [systemprofile_influx, user_influx, pf_influx, pf86_influx, pd_influx]:
remove_dir(p)
# Abschlussmeldung
msg = "Alle Komponenten wurden (bestmöglich) deinstalliert."
print(msg)
try:
ctypes.windll.user32.MessageBoxW(None, msg, "Deinstallation abgeschlossen", 0x40)
except Exception:
pass
if __name__ == "__main__":
main()