this, SLOT(on_samples_cleared()));
disconnect(data.get(), SIGNAL(samples_added(QObject*, uint64_t, uint64_t)),
this, SLOT(on_samples_added(QObject*, uint64_t, uint64_t)));
this, SLOT(on_samples_cleared()));
disconnect(data.get(), SIGNAL(samples_added(QObject*, uint64_t, uint64_t)),
this, SLOT(on_samples_added(QObject*, uint64_t, uint64_t)));
+
+ if (channel_type_ == AnalogChannel) {
+ shared_ptr<Analog> analog = analog_data();
+ assert(analog);
+
+ disconnect(analog.get(), SIGNAL(min_max_changed(float, float)),
+ this, SLOT(on_min_max_changed(float, float)));
+ }
this, SLOT(on_samples_cleared()));
connect(data.get(), SIGNAL(samples_added(QObject*, uint64_t, uint64_t)),
this, SLOT(on_samples_added(QObject*, uint64_t, uint64_t)));
this, SLOT(on_samples_cleared()));
connect(data.get(), SIGNAL(samples_added(QObject*, uint64_t, uint64_t)),
this, SLOT(on_samples_added(QObject*, uint64_t, uint64_t)));
+
+ if (channel_type_ == AnalogChannel) {
+ shared_ptr<Analog> analog = analog_data();
+ assert(analog);
+
+ connect(analog.get(), SIGNAL(min_max_changed(float, float)),
+ this, SLOT(on_min_max_changed(float, float)));
+ }
+void SignalBase::on_min_max_changed(float min, float max)
+{
+ (void)min;
+ (void)max;
+
+ // Restart conversion if one is enabled and uses an automatic threshold
+ if ((conversion_type_ != NoConversion) &&
+ (get_current_conversion_preset() == 0))
+ start_conversion();
+}
+