[PERF] Host Debug Overlay Isolation

This commit is contained in:
2026-04-10 12:42:15 +01:00
parent 47ab664280
commit b8d33c9e02
8 changed files with 83 additions and 29 deletions
@@ -198,15 +198,19 @@ impl HostRunner {
// Snapshot does not include violations, as they are part of certification (logical end of frame)
// But for visual debug, we can check if there are recent CA tags in logs
let recent_logs = self.firmware.os.log_service.get_recent(10);
let violations_count = recent_logs.iter().filter(|e| e.tag >= 0xCA01 && e.tag <= 0xCA07).count();
let violations_count =
recent_logs.iter().filter(|e| e.tag >= 0xCA01 && e.tag <= 0xCA07).count();
let cert_color = if violations_count > 0 { color_warn } else { color_text };
self.hardware.gfx.draw_text(10, 98, &format!("CERT RECENT: {}", violations_count), cert_color);
self.hardware.gfx.draw_text(
10,
98,
&format!("CERT RECENT: {}", violations_count),
cert_color,
);
if violations_count > 0
&& let Some(event) = recent_logs
.into_iter()
.rev()
.find(|e| e.tag >= 0xCA01 && e.tag <= 0xCA07)
&& let Some(event) =
recent_logs.into_iter().rev().find(|e| e.tag >= 0xCA01 && e.tag <= 0xCA07)
{
let mut msg = event.msg.clone();
if msg.len() > 30 {
@@ -68,7 +68,11 @@ impl HostStats {
cpu_load_audio,
firmware.os.tick_index,
firmware.os.logical_frame_index,
firmware.os.atomic_telemetry.completed_logical_frames.load(std::sync::atomic::Ordering::Relaxed),
firmware
.os
.atomic_telemetry
.completed_logical_frames
.load(std::sync::atomic::Ordering::Relaxed),
);
window.set_title(&title);
}