asic-rs telemetry T3-temps: board temperature thresholds (critical / shutdown)
build-test-release / release (push) Successful in 16m3s
build-test-release / release (push) Successful in 16m3s
Round 19 #10 telemetry extension. Adds the board temperature safety thresholds ("board dangerous temp" from item #10). Core (asic-rs-core): - New DataField::TemperatureLimits; MinerData gains temp_critical and temp_shutdown (Celsius). - Rides the existing GetFluidTemperature trait via a defaulted parse_temperature_limits method returning (critical, shutdown) -- no supertrait blast radius; parse_data wires both fields in. Backend: - ePIC: summary /Misc Critical Temp + Shutdown Temp (already-fetched summary). - Antminer/WhatsMiner expose no thresholds; LuxOS needs an unwired tempctrl command (no fixture) and VNish/Braiins need live verification -> left for a live-verified pass, all inherit (None, None). GUI: two new columns (Critical temp / Shutdown temp), right-aligned, Temperature category, auto-hidden when empty. MinerRow gains temp_critical_c / temp_shutdown_c; to_row reads them. ALL_COLUMNS 68 -> 70. Fixture test for epic asserts the parsed thresholds. Patch 0028. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
This commit is contained in:
@@ -563,6 +563,10 @@ pub struct MinerRow {
|
||||
/// (round 11 #17).
|
||||
pub env_temp_c: f64,
|
||||
pub outlet_temp_c: f64,
|
||||
/// Board temperature safety thresholds in Celsius (round 19 #10, T3); `None`
|
||||
/// when the firmware does not report them (ePIC today).
|
||||
pub temp_critical_c: Option<f64>,
|
||||
pub temp_shutdown_c: Option<f64>,
|
||||
/// Individual cooling-fan RPMs (empty if unknown). PSU fan is tracked
|
||||
/// separately below since it is not part of the cooling-fan set.
|
||||
pub fan_rpms: Vec<f64>,
|
||||
@@ -1109,6 +1113,10 @@ pub enum Column {
|
||||
FluidTemp,
|
||||
EnvTemp,
|
||||
OutletTemp,
|
||||
/// Board temperature safety thresholds (round 19 #10, T3). Populated where the
|
||||
/// firmware reports them (ePIC today); auto-hidden when empty.
|
||||
CriticalTemp,
|
||||
ShutdownTemp,
|
||||
PsuFan,
|
||||
/// PSU identity + rated voltage envelope (round 17 R5). Populated where the
|
||||
/// firmware exposes PSU info (ePIC today).
|
||||
@@ -1167,7 +1175,7 @@ pub enum Column {
|
||||
|
||||
/// Every column, in registry order. Ip first, then the default-visible set
|
||||
/// (UI-SPEC order), then all remaining metrics.
|
||||
pub const ALL_COLUMNS: [Column; 68] = [
|
||||
pub const ALL_COLUMNS: [Column; 70] = [
|
||||
Column::Ip,
|
||||
Column::Hashrate,
|
||||
Column::Hashrate1m,
|
||||
@@ -1195,6 +1203,8 @@ pub const ALL_COLUMNS: [Column; 68] = [
|
||||
Column::FluidTemp,
|
||||
Column::EnvTemp,
|
||||
Column::OutletTemp,
|
||||
Column::CriticalTemp,
|
||||
Column::ShutdownTemp,
|
||||
Column::PsuFan,
|
||||
Column::PsuVersion,
|
||||
Column::PsuSerial,
|
||||
@@ -1301,6 +1311,8 @@ impl Column {
|
||||
Column::FluidTemp => "Fluid temp",
|
||||
Column::EnvTemp => "Env temp",
|
||||
Column::OutletTemp => "Outlet temp",
|
||||
Column::CriticalTemp => "Critical temp",
|
||||
Column::ShutdownTemp => "Shutdown temp",
|
||||
Column::PsuFan => "PSU fan (RPM)",
|
||||
Column::PsuVersion => "PSU version",
|
||||
Column::PsuSerial => "PSU serial",
|
||||
@@ -1347,6 +1359,7 @@ impl Column {
|
||||
}
|
||||
Column::Power => 90,
|
||||
Column::ChipTemp | Column::FluidTemp | Column::EnvTemp | Column::OutletTemp => 95,
|
||||
Column::CriticalTemp | Column::ShutdownTemp => 105,
|
||||
Column::Fan1 | Column::Fan2 | Column::Fan3 | Column::Fan4 | Column::PsuFan => 90,
|
||||
Column::FanSpeedPercent => 80,
|
||||
Column::Target => 110,
|
||||
@@ -1409,6 +1422,8 @@ impl Column {
|
||||
| Column::FluidTemp
|
||||
| Column::EnvTemp
|
||||
| Column::OutletTemp
|
||||
| Column::CriticalTemp
|
||||
| Column::ShutdownTemp
|
||||
| Column::Fan1
|
||||
| Column::Fan2
|
||||
| Column::Fan3
|
||||
@@ -1496,6 +1511,8 @@ impl Column {
|
||||
Column::FluidTemp => SortKey::Num(r.fluid_temp_c),
|
||||
Column::EnvTemp => SortKey::Num(r.env_temp_c),
|
||||
Column::OutletTemp => SortKey::Num(r.outlet_temp_c),
|
||||
Column::CriticalTemp => SortKey::Num(r.temp_critical_c.unwrap_or(none)),
|
||||
Column::ShutdownTemp => SortKey::Num(r.temp_shutdown_c.unwrap_or(none)),
|
||||
Column::Fan1 => SortKey::Num(r.fan_rpms.first().copied().unwrap_or(none)),
|
||||
Column::Fan2 => SortKey::Num(r.fan_rpms.get(1).copied().unwrap_or(none)),
|
||||
Column::Fan3 => SortKey::Num(r.fan_rpms.get(2).copied().unwrap_or(none)),
|
||||
@@ -1595,6 +1612,8 @@ impl Column {
|
||||
Column::FluidTemp => num(r.fluid_temp_c, 1, " C"),
|
||||
Column::EnvTemp => num(r.env_temp_c, 1, " C"),
|
||||
Column::OutletTemp => num(r.outlet_temp_c, 1, " C"),
|
||||
Column::CriticalTemp => r.temp_critical_c.map(|v| num(v, 0, " C")).unwrap_or_default(),
|
||||
Column::ShutdownTemp => r.temp_shutdown_c.map(|v| num(v, 0, " C")).unwrap_or_default(),
|
||||
// Per-fan RPM: blank (not "-") when the fan index is absent, so a miner
|
||||
// with fewer fans leaves the extra Fan columns empty and auto-hide can
|
||||
// drop them (round 19 #8).
|
||||
@@ -1716,7 +1735,8 @@ impl Column {
|
||||
| Column::TuningPercent | Column::BestShare | Column::SessionBestShare
|
||||
| Column::Uptime | Column::Target | Column::BoardHashrate | Column::BoardVoltage
|
||||
| Column::BoardFrequency => (3, "Performance"),
|
||||
Column::ChipTemp | Column::FluidTemp | Column::EnvTemp | Column::OutletTemp => {
|
||||
Column::ChipTemp | Column::FluidTemp | Column::EnvTemp | Column::OutletTemp
|
||||
| Column::CriticalTemp | Column::ShutdownTemp => {
|
||||
(4, "Temperature")
|
||||
}
|
||||
Column::Fan1 | Column::Fan2 | Column::Fan3 | Column::Fan4 | Column::PsuFan
|
||||
|
||||
@@ -1151,6 +1151,8 @@ async fn to_row(miner: &dyn Miner) -> MinerRow {
|
||||
fluid_temp_c,
|
||||
env_temp_c,
|
||||
outlet_temp_c,
|
||||
temp_critical_c: data.temp_critical,
|
||||
temp_shutdown_c: data.temp_shutdown,
|
||||
fan_rpms,
|
||||
fan_speed_percent: data.fan_speed_percent,
|
||||
psu_fan_rpm,
|
||||
|
||||
Reference in New Issue
Block a user