X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decode.c;h=2e831f74ee1985a735e3da027a933ea2d3328bca;hb=24278d3e7f6baeb32bcc6f52bc2e934d3a658b32;hp=7712ea10a2a2580df9e6297446581381f3f9c520;hpb=7a638873128dedfcad1e77d87c3d2c25516abaf2;p=sigrok-cli.git diff --git a/decode.c b/decode.c index 7712ea1..2e831f7 100644 --- a/decode.c +++ b/decode.c @@ -250,9 +250,13 @@ static void map_pd_inst_channels(void *key, void *value, void *user_data) void map_pd_channels(struct sr_dev_inst *sdi) { + GSList *channels; + + channels = sr_dev_inst_channels_get(sdi); + if (pd_channel_maps) { g_hash_table_foreach(pd_channel_maps, &map_pd_inst_channels, - sdi->channels); + channels); g_hash_table_destroy(pd_channel_maps); pd_channel_maps = NULL; } @@ -465,7 +469,7 @@ void show_pd_annotations(struct srd_proto_data *pdata, void *cb_data) show = FALSE; for (l = ann_list; l; l = l->next) { if (GPOINTER_TO_INT(l->data) == -1 - || GPOINTER_TO_INT(l->data) == pda->ann_format) { + || GPOINTER_TO_INT(l->data) == pda->ann_class) { show = TRUE; break; } @@ -484,7 +488,7 @@ void show_pd_annotations(struct srd_proto_data *pdata, void *cb_data) } else { /* Protocol decoder id, annotation class, * all annotation strings. */ - ann_descr = g_slist_nth_data(dec->annotations, pda->ann_format); + ann_descr = g_slist_nth_data(dec->annotations, pda->ann_class); printf(" %s: %s:", pdata->pdo->proto_id, ann_descr[0]); for (i = 0; pda->ann_text[i]; i++) printf(" \"%s\"", pda->ann_text[i]);