struct srd_decoder_instance *di;
char **pdtokens, **pdtok, *pd_name;
struct srd_decoder_instance *di;
char **pdtokens, **pdtok, *pd_name;
g_datalist_init(&pd_ann_visible);
pdtokens = g_strsplit(pdstring, ",", -1);
g_datalist_init(&pd_ann_visible);
pdtokens = g_strsplit(pdstring, ",", -1);
- pd_name = g_strdup(g_hash_table_lookup(pd, "sigrok_key"));
- g_hash_table_remove(pd, "sigrok_key");
- if (!(di = srd_instance_new(pd_name, pd))) {
+ pd_name = g_strdup(g_hash_table_lookup(pd_opthash, "sigrok_key"));
+ g_hash_table_remove(pd_opthash, "sigrok_key");
+ if (!(di = srd_instance_new(pd_name, pd_opthash))) {
}
/* Any keys left in the options hash are probes, where the key
* is the probe name as specified in the decoder class, and the
* value is the probe number i.e. the order in which the PD's
* incoming samples are arranged. */
}
/* Any keys left in the options hash are probes, where the key
* is the probe name as specified in the decoder class, and the
* value is the probe number i.e. the order in which the PD's
* incoming samples are arranged. */
- if (!g_datalist_get_data(&pd_ann_visible, pdata->pdo->proto_id)) {
- /* not in the list of PDs whose annotations we're showing */
+ if (!g_datalist_get_data(&pd_ann_visible, pdata->pdo->di->instance_id)) {
+ /* Not in the list of PDs whose annotations we're showing. */
if (opt_loglevel > SR_LOG_WARN)
printf("%"PRIu64"-%"PRIu64" ", pdata->start_sample, pdata->end_sample);
printf("%s: ", pdata->pdo->proto_id);
if (opt_loglevel > SR_LOG_WARN)
printf("%"PRIu64"-%"PRIu64" ", pdata->start_sample, pdata->end_sample);
printf("%s: ", pdata->pdo->proto_id);