v0.5.4: alles per Code (leerer Start, Editor zuerst, Schicht-Fix)
Browse files
app/src/com/killerboss/eos/OsEngine.kt
CHANGED
|
@@ -15,9 +15,10 @@ import org.tensorflow.lite.Interpreter
|
|
| 15 |
import org.tensorflow.lite.nnapi.NnApiDelegate
|
| 16 |
|
| 17 |
// E-OS v5 Engine — Glass-Frame-Generator (512x1088 Output).
|
| 18 |
-
//
|
| 19 |
-
//
|
| 20 |
-
//
|
|
|
|
| 21 |
//
|
| 22 |
// v5.1-Fix ("KI-Init fehlgeschlagen: RuntimeException" bei jeder Modelldatei):
|
| 23 |
// * Das v5-Modell hat NCHW-I/O ([1,3,544,256] -> [1,3,1088,512]); die alte warmup()-Pruefung
|
|
@@ -278,9 +279,9 @@ class OsEngine(private val ctx: Context) {
|
|
| 278 |
stateBuf.clear()
|
| 279 |
var i = 0
|
| 280 |
while (i < STATE) { stateBuf.putFloat(i * 4, 0f); i++ }
|
| 281 |
-
stateBuf.putFloat(st.
|
| 282 |
stateBuf.putFloat(8 * 4, st.trans)
|
| 283 |
-
stateBuf.putFloat(9 * 4, st.
|
| 284 |
val rf = st.rippleFloats()
|
| 285 |
i = 0
|
| 286 |
while (i < 8) { stateBuf.putFloat((10 + i) * 4, rf[i]); i++ }
|
|
@@ -295,7 +296,7 @@ class OsEngine(private val ctx: Context) {
|
|
| 295 |
stateBuf.putFloat(24 * 4, st.musicLevel)
|
| 296 |
stateBuf.putFloat((25 + st.weatherCond) * 4, 1f)
|
| 297 |
stateBuf.putFloat(29 * 4, if (st.musicPlaying) 1f else 0f)
|
| 298 |
-
stateBuf.putFloat(30 * 4, if (st.
|
| 299 |
stateBuf.putFloat(31 * 4, (st.tsec() * 0.13f) % 1f)
|
| 300 |
}
|
| 301 |
|
|
|
|
| 15 |
import org.tensorflow.lite.nnapi.NnApiDelegate
|
| 16 |
|
| 17 |
// E-OS v5 Engine — Glass-Frame-Generator (512x1088 Output).
|
| 18 |
+
// Schicht 1: Layout aus dem User-Code (UiScript) = Modell-Input (Hint).
|
| 19 |
+
// Bei Schicht 1 AUS bleibt der Hint LEER (nur Wasser-Ripples).
|
| 20 |
+
// Schicht 2: NPU/CPU-Modell rendert ALLE sichtbaren Pixel (Glas + Wasser).
|
| 21 |
+
// Schicht 3: Overlay Text/Infos (Code) — OsPainter.drawOverlay.
|
| 22 |
//
|
| 23 |
// v5.1-Fix ("KI-Init fehlgeschlagen: RuntimeException" bei jeder Modelldatei):
|
| 24 |
// * Das v5-Modell hat NCHW-I/O ([1,3,544,256] -> [1,3,1088,512]); die alte warmup()-Pruefung
|
|
|
|
| 279 |
stateBuf.clear()
|
| 280 |
var i = 0
|
| 281 |
while (i < STATE) { stateBuf.putFloat(i * 4, 0f); i++ }
|
| 282 |
+
stateBuf.putFloat(st.glasIdx() * 4, 1f) // Glas-Stil der aktuellen Seite (0..7)
|
| 283 |
stateBuf.putFloat(8 * 4, st.trans)
|
| 284 |
+
stateBuf.putFloat(9 * 4, st.fromGlasIdx() / 7f)
|
| 285 |
val rf = st.rippleFloats()
|
| 286 |
i = 0
|
| 287 |
while (i < 8) { stateBuf.putFloat((10 + i) * 4, rf[i]); i++ }
|
|
|
|
| 296 |
stateBuf.putFloat(24 * 4, st.musicLevel)
|
| 297 |
stateBuf.putFloat((25 + st.weatherCond) * 4, 1f)
|
| 298 |
stateBuf.putFloat(29 * 4, if (st.musicPlaying) 1f else 0f)
|
| 299 |
+
stateBuf.putFloat(30 * 4, if (st.pressFlash) 1f else 0f)
|
| 300 |
stateBuf.putFloat(31 * 4, (st.tsec() * 0.13f) % 1f)
|
| 301 |
}
|
| 302 |
|