Project

General

Profile

User Story #48 » 0010-feat-host-expose-MofeEngineHost.antennaDelays-StateF.patch

knight8241, 08/07/2026 18:32

View differences:

androidApp/src/main/java/com/aether/mofe/platform/MofeEngineHost.kt
package com.aether.mofe.platform
import android.util.Log
import com.aether.mofe.engine.AntennaDelayCalibrator
import com.aether.mofe.engine.CoordinateFrameManager
import com.aether.mofe.engine.MofeBuilder
import com.aether.mofe.engine.MofeListener
......
* refreshed on the maintenance tick. A MISSING link is why the constellation won't fully solve. */
val anchorLinks: StateFlow<InterAnchorLinkReport> = _anchorLinks.asStateFlow()
private val _antennaDelays = MutableStateFlow<AntennaDelayCalibrator.Result?>(null)
/** Latest antenna-delay calibration (per-device delays + residual RMS / edges used / ok) for
* the mesh-health UI, refreshed on the maintenance tick. null until a calibration exists. */
val antennaDelays: StateFlow<AntennaDelayCalibrator.Result?> = _antennaDelays.asStateFlow()
/** Instrumentation + state capture — the engine's multi-observer fusion output,
* surfaced to logcat AND to the flows above for the HUD/health pane to consume. */
private val logListener = object : MofeListener {
......
// Refresh inter-anchor link health for the mesh-health UI (slow-changing).
_anchorLinks.value = runCatching { eng.interAnchorLinkReport() }
.getOrDefault(InterAnchorLinkReport.EMPTY)
// Latest antenna-delay calibration for the mesh-health UI.
_antennaDelays.value = runCatching { eng.antennaDelayCalibration() }.getOrNull()
}
}
}
    (1-1/1)