forked from Blendman974/faceclaw
Convert remaining Java to Kotlin
This commit is contained in:
1 parent
ea9bfae6af
commit
f9724ddcab
118 files changed
+18381
-18119
No files matched your search
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Two expiry paths run side by side: a JS deadline for prompt on-glasses
|
||||
* ringing while the process is awake, and an AlarmManager alarm-clock alarm
|
||||
* (FaceclawAlarms.java) that rings on the phone at the right moment even if
|
||||
* (FaceclawAlarms.kt) that rings on the phone at the right moment even if
|
||||
* the process is asleep or dead. The phone shows the item silently first
|
||||
* and adds its own sound when the glasses cannot carry it (not connected,
|
||||
* not worn, charging, not shown within seconds, or not acknowledged within
|
||||
|
||||
@@ -1326,6 +1326,12 @@ class DashboardController {
|
||||
ring: ringAddress,
|
||||
});
|
||||
this.communicator = communicator;
|
||||
// Size the compositor before anything else is awaited: windows opened
|
||||
// during the bridge start-ups below (the terminal hub, restored apps)
|
||||
// configure their surfaces through this.communicator, and the Java call
|
||||
// queue is FIFO, so enqueuing the screen size first guarantees it lands
|
||||
// ahead of them. Mirrors ensurePreviewDisplay.
|
||||
await communicator.configureCompositorScreen(G2_LENS_WIDTH, G2_LENS_HEIGHT);
|
||||
this.offState = communicator.onStateChange((state) => {
|
||||
if (state.phase !== "connected") resetRingInputFilter();
|
||||
if (state.phase === "unpaired") {
|
||||
@@ -1493,7 +1499,6 @@ class DashboardController {
|
||||
await nightscoutBridge.start();
|
||||
// Register the compositor surfaces: the shell chrome above all windows,
|
||||
// and a surface per live window (only the foreground one is composited).
|
||||
await communicator.configureCompositorScreen(G2_LENS_WIDTH, G2_LENS_HEIGHT);
|
||||
await communicator.configureSurface(SHELL_SURFACE_ID, {
|
||||
x: 0,
|
||||
y: 0,
|
||||
|
||||
@@ -18,7 +18,7 @@ declare const java: any;
|
||||
* - "whisper-base-en": sherpa-onnx's offline Whisper backend, base.en,
|
||||
* int8-quantized. Picked over tiny.en for materially better accuracy
|
||||
* (Whisper's own tiny/base WER gap is real and well documented) on the
|
||||
* reasoning that FaceclawVoiceController.java no longer re-decodes a
|
||||
* reasoning that FaceclawVoiceController.kt no longer re-decodes a
|
||||
* Whisper segment on every live-partial tick — see its ASR_WHISPER_*
|
||||
* comment — so base.en's extra compute is a one-time cost per utterance,
|
||||
* not a cost paid ~1.4x/second while the user is speaking. tiny.en is an
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* TS-side wrapper for the Java FrameTimings singleton (per-frame latency
|
||||
* instrumentation; see FrameTimings.java). Frame ID 0 means "no frame" and is
|
||||
* instrumentation; see FrameTimings.kt). Frame ID 0 means "no frame" and is
|
||||
* ignored by every method, so callers never need to null-check.
|
||||
*
|
||||
* Frames form a tree: pass the causing frame's ID as `parentFrameId` when one
|
||||
|
||||
Reference in new issue
Block a user