mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-10 02:33:04 +02:00
Add duty cycle display to repeaters. Closes #308.
This commit is contained in:
@@ -74,6 +74,11 @@ export function RadioSettingsPane({
|
||||
/>
|
||||
<KvRow label="TX Power" value={data.tx_power != null ? `${data.tx_power} dBm` : '—'} />
|
||||
<KvRow label="Airtime Factor" value={data.airtime_factor ?? '—'} />
|
||||
{/* Duty cycle limit is firmware >= 1.15 only; omit the row entirely on
|
||||
older nodes rather than showing an empty placeholder. */}
|
||||
{data.duty_cycle_limit != null && (
|
||||
<KvRow label="Duty Cycle Limit" value={data.duty_cycle_limit} />
|
||||
)}
|
||||
<KvRow label="Repeat Mode" value={data.repeat_enabled ?? '—'} />
|
||||
<KvRow label="Max Flood Hops" value={data.flood_max ?? '—'} />
|
||||
</div>
|
||||
|
||||
@@ -499,6 +499,7 @@ describe('RepeaterDashboard', () => {
|
||||
radio: '910.5250244,62.5,7,5',
|
||||
tx_power: '20',
|
||||
airtime_factor: '0',
|
||||
duty_cycle_limit: '100.0%',
|
||||
repeat_enabled: '1',
|
||||
flood_max: '3',
|
||||
};
|
||||
|
||||
@@ -336,6 +336,7 @@ describe('useRepeaterDashboard', () => {
|
||||
radio: null,
|
||||
tx_power: null,
|
||||
airtime_factor: null,
|
||||
duty_cycle_limit: null,
|
||||
repeat_enabled: null,
|
||||
flood_max: null,
|
||||
});
|
||||
|
||||
@@ -489,6 +489,9 @@ export interface RepeaterRadioSettingsResponse {
|
||||
radio: string | null;
|
||||
tx_power: string | null;
|
||||
airtime_factor: string | null;
|
||||
// Configured duty-cycle limit (e.g. "25.0%"), firmware-derived from airtime_factor.
|
||||
// Only present on firmware >= 1.15; null on older nodes.
|
||||
duty_cycle_limit: string | null;
|
||||
repeat_enabled: string | null;
|
||||
flood_max: string | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user