mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:27:33 +00:00
feat: Pluto board name + hardware telemetry in status bar
- Status bar / web now show Pluto/LibreSDR model + serial instead of "Unknown Board" (BoardDisplayName in controller; UI just renders it). - Field 3 shows AD936x chip temperature + RX RSSI for Pluto (no PA → Supply only for openHPSDR). Polled via backend.ReadTelemetry (~2 Hz), filtered for sensor glitches (plausibility window + slew-limit, with anti-stick) — fixes rare bogus -15°C readings. - Add libiio binding iio_channel_attr_read_double. - Remove stale root pluto_integration.MD (superseded by doc/PLUTO_INTEGRATION_PLAN.md). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,8 @@ unit BoardUtils;
|
||||
interface
|
||||
|
||||
function BoardTypeName(BoardType: Integer): string;
|
||||
// Короткое человекочитаемое имя AD936x-платы по hw_model (Pluto / LibreSDR / прочие).
|
||||
function PlutoModelName(const HwModel: string): string;
|
||||
// Индекс диапазона по частоте. Pluto=True → VHF/UHF план, иначе HF (openHPSDR).
|
||||
function FreqToBandIdx(Hz: Double; Pluto: Boolean = False): Integer;
|
||||
// Короткое имя диапазона для кнопки (зависит от плана).
|
||||
@@ -61,6 +63,19 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function PlutoModelName(const HwModel: string): string;
|
||||
var
|
||||
L: string;
|
||||
begin
|
||||
// hw_model клонов AD936x обычно содержит маркер платы. Узнаём Pluto/LibreSDR,
|
||||
// иначе показываем сырой hw_model, а при его отсутствии — обобщённое имя.
|
||||
L := LowerCase(HwModel);
|
||||
if Pos('libre', L) > 0 then Result := 'LibreSDR'
|
||||
else if Pos('pluto', L) > 0 then Result := 'PlutoSDR'
|
||||
else if HwModel <> '' then Result := HwModel
|
||||
else Result := 'AD936x SDR';
|
||||
end;
|
||||
|
||||
function FreqToBandIdx(Hz: Double; Pluto: Boolean): Integer;
|
||||
var
|
||||
i: Integer;
|
||||
|
||||
Reference in New Issue
Block a user