Skip to content

Commit 334ead1

Browse files
fix: Load from the dso file, it shows an error frequency
1 parent 461f75c commit 334ead1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

DSView/pv/view/dsosignal.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,12 @@ void DsoSignal::paint_mid(QPainter &p, int left, int right, QColor fore, QColor
890890
const uint32_t count = (index == 0) ? status.ch0_cyc_cnt : status.ch1_cyc_cnt;
891891
const bool plevel = (index == 0) ? status.ch0_plevel : status.ch1_plevel;
892892
const bool startXORend = (index == 0) ? (status.ch0_cyc_llen == 0) : (status.ch1_cyc_llen == 0);
893-
const uint16_t total_channels = g_slist_length(_dev_inst->dev_inst()->channels);
893+
uint16_t total_channels = g_slist_length(_dev_inst->dev_inst()->channels);
894+
895+
if (total_channels == 1 && _dev_inst->is_file()){
896+
total_channels++;
897+
}
898+
894899
const double tfactor = (total_channels / enabled_channels) * SR_GHZ(1) * 1.0 / samplerate;
895900

896901
double samples = (index == 0) ? status.ch0_cyc_tlen : status.ch1_cyc_tlen;

0 commit comments

Comments
 (0)