void MainWindow::on_actionAbout_triggered()
{
GSList *l;
- struct sr_dev_plugin **plugins;
+ struct sr_dev_driver **drivers;
struct sr_input_format **inputs;
struct sr_output_format **outputs;
struct srd_decoder *dec;
.arg(QApplication::organizationDomain());
s.append("<b>" + tr("Supported hardware drivers:") + "</b><table>");
- plugins = sr_hw_list();
- for (int i = 0; plugins[i]; ++i) {
+ drivers = sr_hw_list();
+ for (int i = 0; drivers[i]; ++i) {
s.append(QString("<tr><td><i>%1</i></td><td>%2</td></tr>")
- .arg(QString(plugins[i]->name))
- .arg(QString(plugins[i]->longname)));
+ .arg(QString(drivers[i]->name))
+ .arg(QString(drivers[i]->longname)));
}
s.append("</table><p>");
ui->comboBoxLA->clear();
for (int i = 0; i < num_devs; ++i) {
dev = (struct sr_dev *)g_slist_nth_data(devs, i);
- ui->comboBoxLA->addItem(dev->plugin->name); /* TODO: Full name */
+ ui->comboBoxLA->addItem(dev->driver->name); /* TODO: Full name */
}
if (num_devs == 0) {
return;
} else if (num_devs == 1) {
s = tr("Found supported logic analyzer: ");
- s.append(dev->plugin->name);
+ s.append(dev->driver->name);
statusBar()->showMessage(s, 2000);
} else {
/* TODO: Allow user to select one of the devices. */
s = tr("Found multiple logic analyzers: ");
for (int i = 0; i < num_devs; ++i) {
dev = (struct sr_dev *)g_slist_nth_data(devs, i);
- s.append(dev->plugin->name);
+ s.append(dev->driver->name);
if (i != num_devs - 1)
s.append(", ");
}
setCurrentLA(0 /* TODO */);
- di_num_probes = (char *)dev->plugin->dev_info_get(
- dev->plugin_index, SR_DI_NUM_PROBES);
+ di_num_probes = (char *)dev->driver->dev_info_get(
+ dev->driver_index, SR_DI_NUM_PROBES);
if (di_num_probes != NULL) {
setNumChannels(GPOINTER_TO_INT(di_num_probes));
} else {
}
ui->comboBoxLA->clear();
- ui->comboBoxLA->addItem(dev->plugin->name); /* TODO: Full name */
+ ui->comboBoxLA->addItem(dev->driver->name); /* TODO: Full name */
s = QString(tr("Channels: %1")).arg(getNumChannels());
ui->labelChannels->setText(s);
- samplerates = (struct sr_samplerates *)dev->plugin->dev_info_get(
- dev->plugin_index, SR_DI_SAMPLERATES);
+ samplerates = (struct sr_samplerates *)dev->driver->dev_info_get(
+ dev->driver_index, SR_DI_SAMPLERATES);
if (!samplerates) {
/* TODO: Error handling. */
}
dev = (struct sr_dev *)g_slist_nth_data(devs, opt_dev);
/* Set the number of samples we want to get from the device. */
- if (dev->plugin->dev_config_set(dev->plugin_index,
+ if (dev->driver->dev_config_set(dev->driver_index,
SR_HWCAP_LIMIT_SAMPLES, &limit_samples) != SR_OK) {
qDebug("Failed to set sample limit.");
sr_session_destroy();
}
/* Set the samplerate. */
- if (dev->plugin->dev_config_set(dev->plugin_index,
+ if (dev->driver->dev_config_set(dev->driver_index,
SR_HWCAP_SAMPLERATE, &samplerate) != SR_OK) {
qDebug("Failed to set samplerate.");
sr_session_destroy();
return;
};
- if (dev->plugin->dev_config_set(dev->plugin_index,
+ if (dev->driver->dev_config_set(dev->driver_index,
SR_HWCAP_PROBECONFIG, (char *)dev->probes) != SR_OK) {
qDebug("Failed to configure probes.");
sr_session_destroy();