Skip to content

Commit 327e635

Browse files
Update LinkOverviewWidget.qml
1 parent b730b27 commit 327e635

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

qml/ui/widgets/LinkOverviewWidget.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ BaseWidget {
3535
property real snrBlockWidth: 12
3636
property real snrBlockHeight: 8
3737
property real snrBlockSkew: 4
38+
property var snrBlockThresholds: [1, 5, 10, 16, 22, 28, 34, 40]
3839

3940
function get_dbm_text() {
4041
var dbm = _ohdSystemGround.current_rx_rssi;
@@ -317,7 +318,7 @@ BaseWidget {
317318
delegate: Shape {
318319
width: snrBlockWidth + snrBlockSkew
319320
height: snrBlockHeight
320-
property bool isActive: m_snr_value >= (index + 1) * 10
321+
property bool isActive: snr_is_valid(m_best_snr_db) && m_best_snr_db >= snrBlockThresholds[index]
321322
property color shapeColor: settings.color_shape
322323

323324
ShapePath {

0 commit comments

Comments
 (0)