From: Soeren Apel Date: Fri, 9 Jun 2017 22:57:48 +0000 (+0200) Subject: DeviceManager: Don't perform scans with DMM drivers X-Git-Tag: pulseview-0.4.0~12 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=4c7a19d3d7049bcc9fb3185ce2bc91333a7ca9e1;hp=b760e6e0527fd96608aeeff345b3a7c9cead9511 DeviceManager: Don't perform scans with DMM drivers --- diff --git a/pv/devicemanager.cpp b/pv/devicemanager.cpp index 58f507c9..540f8815 100644 --- a/pv/devicemanager.cpp +++ b/pv/devicemanager.cpp @@ -68,7 +68,20 @@ DeviceManager::DeviceManager(shared_ptr context) : progress->setLabelText(QObject::tr("Scanning for %1...") .arg(QString::fromStdString(entry.first))); - driver_scan(entry.second, map()); + /** + * We currently only support devices that can deliver + * samples at a fixed samplerate i.e. oscilloscopes and + * logic analysers. + * @todo Add support for non-monotonic devices i.e. DMMs + * and sensors. + */ + const auto keys = (entry.second)->config_keys(); + + bool supported_device = keys.count(ConfigKey::LOGIC_ANALYZER) | + keys.count(ConfigKey::OSCILLOSCOPE); + + if (supported_device) + driver_scan(entry.second, map()); progress->setValue(entry_num++); QApplication::processEvents();