GUI round 12 (batch 1): black hashrate value, Control Board label, blank placeholder serials, sensible WhatsMiner temps
build-test-release / release (push) Successful in 5m55s
build-test-release / release (push) Successful in 5m55s
- #1: the total-hashrate KPI value renders in the default (black) text colour instead of accent blue (and now dims with focus like the other neutral cards). - #4: the board-code column header is now "Control Board". - #5 (serial): placeholder serials ("N/A", "none", "null", ...) render as an empty cell instead of the literal placeholder. - #3: the Chip-temp cell now prefers each board's board/PCB temperature over the hottest-chip (outlet) reading. WhatsMiner's outlet_chip is the max chip temp (verified live: ~100C on the hottest board of a M30S+ VE40) which read alarmingly high and didn't match the ~60-79C the miner itself reports; the board temperature is the figure the miner's UI shows. Falls back to the chip temp when no board temp is reported. Applies to all makes for consistency. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
This commit is contained in:
@@ -546,7 +546,7 @@ impl Column {
|
|||||||
Column::Serial => "Serial",
|
Column::Serial => "Serial",
|
||||||
Column::ApiVersion => "API ver",
|
Column::ApiVersion => "API ver",
|
||||||
Column::Cpu => "CPU",
|
Column::Cpu => "CPU",
|
||||||
Column::BoardCode => "Board",
|
Column::BoardCode => "Control Board",
|
||||||
Column::Algorithm => "Algorithm",
|
Column::Algorithm => "Algorithm",
|
||||||
Column::Pic => "PIC",
|
Column::Pic => "PIC",
|
||||||
Column::Locked => "Access",
|
Column::Locked => "Access",
|
||||||
|
|||||||
@@ -449,15 +449,19 @@ async fn to_row(miner: &dyn Miner) -> MinerRow {
|
|||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|t| t.as_celsius())
|
.map(|t| t.as_celsius())
|
||||||
.unwrap_or(0.0);
|
.unwrap_or(0.0);
|
||||||
// Per-hashboard chip temperature (hottest chip per board, falling back to
|
// Per-hashboard temperature for the "77 / 64 / 74" Chip-temp cell. Prefer the
|
||||||
// the board/PCB temp), for the "77 / 64 / 74" Chip-temp cell.
|
// board/PCB temperature over the hottest-chip (outlet) reading: WhatsMiner's
|
||||||
|
// outlet_chip is the max chip temp (~100C on the hottest board), which read
|
||||||
|
// alarmingly high and didn't match the temperature the miner itself reports;
|
||||||
|
// the board temperature (~60-79C) is the figure the miner's own UI shows
|
||||||
|
// (round 12 #3). Falls back to the chip temp when no board temp is reported.
|
||||||
let board_temps: Vec<f64> = data
|
let board_temps: Vec<f64> = data
|
||||||
.hashboards
|
.hashboards
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|b| {
|
.filter_map(|b| {
|
||||||
b.outlet_chip_temperature
|
b.board_temperature
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.or(b.board_temperature.as_ref())
|
.or(b.outlet_chip_temperature.as_ref())
|
||||||
.map(|t| t.as_celsius())
|
.map(|t| t.as_celsius())
|
||||||
})
|
})
|
||||||
.filter(|&t| t > 0.0)
|
.filter(|&t| t > 0.0)
|
||||||
@@ -606,7 +610,22 @@ async fn to_row(miner: &dyn Miner) -> MinerRow {
|
|||||||
submodel,
|
submodel,
|
||||||
mac: data.mac.map(|m| m.to_string()).unwrap_or_default(),
|
mac: data.mac.map(|m| m.to_string()).unwrap_or_default(),
|
||||||
hostname: data.hostname.clone().unwrap_or_default(),
|
hostname: data.hostname.clone().unwrap_or_default(),
|
||||||
serial: data.serial_number.clone().unwrap_or_default(),
|
serial: {
|
||||||
|
// Some miners report a placeholder serial ("N/A", "none", ...); show
|
||||||
|
// those as an empty cell rather than the literal placeholder (round 12).
|
||||||
|
let s = data.serial_number.clone().unwrap_or_default();
|
||||||
|
let t = s.trim();
|
||||||
|
if t.is_empty()
|
||||||
|
|| t.eq_ignore_ascii_case("n/a")
|
||||||
|
|| t.eq_ignore_ascii_case("na")
|
||||||
|
|| t.eq_ignore_ascii_case("none")
|
||||||
|
|| t.eq_ignore_ascii_case("null")
|
||||||
|
{
|
||||||
|
String::new()
|
||||||
|
} else {
|
||||||
|
s
|
||||||
|
}
|
||||||
|
},
|
||||||
firmware,
|
firmware,
|
||||||
fw_version,
|
fw_version,
|
||||||
api_version: data.api_version.clone().unwrap_or_default(),
|
api_version: data.api_version.clone().unwrap_or_default(),
|
||||||
|
|||||||
@@ -619,7 +619,9 @@ pub fn build(frame: Widget) -> App {
|
|||||||
let (card_slow, kpi_slow) = mk_card("Slow", ColorKind::Amber, Some(SVG_TURTLE));
|
let (card_slow, kpi_slow) = mk_card("Slow", ColorKind::Amber, Some(SVG_TURTLE));
|
||||||
let (card_not, kpi_not) = mk_card("Not hashing", ColorKind::Red, Some(SVG_WINE_CRACK));
|
let (card_not, kpi_not) = mk_card("Not hashing", ColorKind::Red, Some(SVG_WINE_CRACK));
|
||||||
let (card_paused, kpi_paused) = mk_card("Paused", ColorKind::Blue, Some(SVG_OTTER));
|
let (card_paused, kpi_paused) = mk_card("Paused", ColorKind::Blue, Some(SVG_OTTER));
|
||||||
let (card_hashrate, kpi_hashrate) = mk_card("SHA-256 Hashrate", ColorKind::Accent, Some(SVG_HIVE));
|
// Total-hashrate value renders in the default (black) text colour, not accent
|
||||||
|
// (round 12 #1); it still dims with focus like the other neutral cards.
|
||||||
|
let (card_hashrate, kpi_hashrate) = mk_card("SHA-256 Hashrate", ColorKind::Neutral, Some(SVG_HIVE));
|
||||||
let (_card_power, kpi_power) = mk_card("Est. power", ColorKind::Neutral, Some(SVG_BOLT));
|
let (_card_power, kpi_power) = mk_card("Est. power", ColorKind::Neutral, Some(SVG_BOLT));
|
||||||
drop(mk_card);
|
drop(mk_card);
|
||||||
let _ = (card_hashing, card_slow, card_not, card_paused);
|
let _ = (card_hashing, card_slow, card_not, card_paused);
|
||||||
|
|||||||
Reference in New Issue
Block a user