#include <cassert>
-#include <libsigrok/libsigrok.hpp>
+#include <libsigrokcxx/libsigrokcxx.hpp>
#include "connect.hpp"
-#include "pv/devicemanager.hpp"
+#include <pv/devicemanager.hpp>
+#include <pv/devices/hardwaredevice.hpp>
using std::list;
using std::map;
using sigrok::ConfigKey;
using sigrok::Driver;
using sigrok::Error;
-using sigrok::HardwareDevice;
+
+using pv::devices::HardwareDevice;
namespace pv {
namespace dialogs {
*/
bool supported_device = driver->config_check(
ConfigKey::LOGIC_ANALYZER, ConfigKey::DEVICE_OPTIONS) |
- driver->config_check(
+ driver->config_check(
ConfigKey::OSCILLOSCOPE, ConfigKey::DEVICE_OPTIONS);
if (supported_device)
serial.toUtf8().constData());
}
- list< shared_ptr<HardwareDevice> > devices =
+ const list< shared_ptr<HardwareDevice> > devices =
device_manager_.driver_scan(driver, drvopts);
for (shared_ptr<HardwareDevice> device : devices)
assert(device);
QString text = QString::fromStdString(
- device_manager_.get_display_name(device));
- text += QString(" with %1 channels").arg(device->channels().size());
+ device->display_name(device_manager_));
+ text += QString(" with %1 channels").arg(
+ device->device()->channels().size());
QListWidgetItem *const item = new QListWidgetItem(text,
&device_list_);