#include "logicsignal.hpp"
#include "view.hpp"
-#include <pv/session.hpp>
-#include <pv/devicemanager.hpp>
-#include <pv/devices/device.hpp>
#include <pv/data/logic.hpp>
#include <pv/data/logicsegment.hpp>
#include <pv/data/signalbase.hpp>
-#include <pv/view/view.hpp>
+#include <pv/devicemanager.hpp>
+#include <pv/devices/device.hpp>
#include <pv/globalsettings.hpp>
+#include <pv/session.hpp>
+#include <pv/view/view.hpp>
#include <libsigrokcxx/libsigrokcxx.hpp>
using sigrok::ConfigKey;
using sigrok::Capability;
-using sigrok::Error;
using sigrok::Trigger;
-using sigrok::TriggerStage;
using sigrok::TriggerMatch;
using sigrok::TriggerMatchType;
if (segments.empty())
return;
- const shared_ptr<pv::data::LogicSegment> &segment =
- segments.front();
+ const shared_ptr<pv::data::LogicSegment> &segment = segments.front();
double samplerate = segment->samplerate();
const vector<int32_t> LogicSignal::get_trigger_types() const
{
+ // We may not be associated with a device
+ if (!device_)
+ return vector<int32_t>();
+
const auto sr_dev = device_->device();
if (sr_dev->config_check(ConfigKey::TRIGGER_MATCH, Capability::LIST)) {
const Glib::VariantContainerBase gvar =
action = trigger_change_;
break;
default:
- assert(0);
+ assert(false);
}
}