UI: Fixed no signal logical in signal strength widgets

This commit is contained in:
Vladyslav_Prykhodko 2024-11-29 12:28:57 +02:00
parent 11e29d3725
commit 7ee7395b0f

View File

@ -168,6 +168,7 @@ export class SignalStrengthWidgetComponent implements OnInit, OnDestroy, AfterVi
} }
this.noSignalRssiValue = this.settings.noSignalRssiValue ?? -100; this.noSignalRssiValue = this.settings.noSignalRssiValue ?? -100;
this.rssi = this.noSignalRssiValue;
this.activeBarsColor = ColorProcessor.fromSettings(this.settings.activeBarsColor); this.activeBarsColor = ColorProcessor.fromSettings(this.settings.activeBarsColor);
const inactiveBarsColor = tinycolor(this.settings.inactiveBarsColor); const inactiveBarsColor = tinycolor(this.settings.inactiveBarsColor);
@ -259,7 +260,7 @@ export class SignalStrengthWidgetComponent implements OnInit, OnDestroy, AfterVi
this.tooltipValueText = formatValue(value, this.decimals, this.units, false); this.tooltipValueText = formatValue(value, this.decimals, this.units, false);
} }
} else { } else {
this.rssi = -100; this.rssi = this.noSignalRssiValue;
if (this.showTooltipValue) { if (this.showTooltipValue) {
this.tooltipValueText = 'N/A'; this.tooltipValueText = 'N/A';
} }