diff --git a/src/main.rs b/src/main.rs index c92f828..06ea365 100644 --- a/src/main.rs +++ b/src/main.rs @@ -266,6 +266,7 @@ fn boot_hal(mut args: impl Iterator) -> Result<(), Box ); let mut client = HalClient::connect(std::path::Path::new(&socket))?; + let label = app::target_label(&config.target); for _ in 0..ticks { let hottest = client.read_temperature_mc(0).ok(); let power_w = client.read_power_w().ok().map(f32::from); @@ -284,6 +285,9 @@ fn boot_hal(mut args: impl Iterator) -> Result<(), Box client.set_fan_target(0, pwm)?; } } + // Publish every period: a client watching the API must see the live operating point, + // not the boot-time snapshot. + status.set_hardware(app::snapshot(&runtime, &label)); if let Some(reason) = runtime.stop_reason() { println!("stopped: {reason:?}"); break;