Commit
556a926d432dd introduced support for multiple displays in
subdrivers of serial-dmm, but also changed user visible channel numbers
to start from 0. Restore the previous behaviour, start counting from 1
which users may perceive as more natural (serial-dmm used to start at P1
in the past, scopes start with CH1 as well).
if (dmm->packet_parse == sr_metex14_4packets_parse)
dmm->channel_count = 4;
for (ch_idx = 0; ch_idx < dmm->channel_count; ch_idx++) {
- snprintf(ch_name, sizeof(ch_name), "P%zu", ch_idx);
+ size_t ch_num;
+ ch_num = ch_idx + 1;
+ snprintf(ch_name, sizeof(ch_name), "P%zu", ch_num);
sr_channel_new(sdi, ch_idx, SR_CHANNEL_ANALOG, TRUE, ch_name);
}
devices = g_slist_append(devices, sdi);