From bdb6bd8c2ed2c98f76eb48af97cd23aa70691d53 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 14 Dec 2025 23:18:19 +0300 Subject: [PATCH 1/3] binding: enable SR_CONF_NUM_LOGIC_CHANNELS --- pv/binding/device.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pv/binding/device.cpp b/pv/binding/device.cpp index 855052cd..efe9f805 100644 --- a/pv/binding/device.cpp +++ b/pv/binding/device.cpp @@ -74,7 +74,7 @@ Device::Device(shared_ptr configurable) : // Ignore common read-only keys if ((key->id() == SR_CONF_CONTINUOUS) || (key->id() == SR_CONF_TRIGGER_MATCH) || - (key->id() == SR_CONF_CONN) || (key->id() == SR_CONF_SERIALCOMM) || (key->id() == SR_CONF_NUM_LOGIC_CHANNELS) || + (key->id() == SR_CONF_CONN) || (key->id() == SR_CONF_SERIALCOMM) || (key->id() == SR_CONF_NUM_ANALOG_CHANNELS) || (key->id() == SR_CONF_SESSIONFILE) || (key->id() == SR_CONF_CAPTUREFILE) || (key->id() == SR_CONF_CAPTURE_UNITSIZE)) continue; @@ -115,6 +115,7 @@ Device::Device(shared_ptr configurable) : case SR_CONF_CLOCK_EDGE: case SR_CONF_DATA_SOURCE: case SR_CONF_EXTERNAL_CLOCK_SOURCE: + case SR_CONF_NUM_LOGIC_CHANNELS: bind_enum(descr, "", key, capabilities, get, set); break; From 09cc8c4ceceb92fe5aa8568b3429f8fcd568847a Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 14 Dec 2025 23:19:20 +0300 Subject: [PATCH 2/3] popups: update comboboxes on channel selection needed for devices which have different set of samplerates depending of enabled channels --- pv/popups/channels.cpp | 4 ++++ pv/popups/channels.hpp | 3 +++ pv/toolbars/mainbar.cpp | 1 + 3 files changed, 8 insertions(+) diff --git a/pv/popups/channels.cpp b/pv/popups/channels.cpp index ce2e8e98..5ee769c0 100644 --- a/pv/popups/channels.cpp +++ b/pv/popups/channels.cpp @@ -181,6 +181,7 @@ void Channels::set_all_channels(bool set) } updating_channels_ = false; + config_changed(); } void Channels::enable_channels_conditionally( @@ -200,6 +201,7 @@ void Channels::enable_channels_conditionally( } updating_channels_ = false; + config_changed(); } void Channels::disable_channels_conditionally( @@ -219,6 +221,7 @@ void Channels::disable_channels_conditionally( } updating_channels_ = false; + config_changed(); } void Channels::populate_group(shared_ptr group, @@ -380,6 +383,7 @@ void Channels::on_channel_checked(QWidget *widget) assert(s); s->set_enabled(check_box->isChecked()); + config_changed(); } void Channels::enable_all_channels() diff --git a/pv/popups/channels.hpp b/pv/popups/channels.hpp index 66d284b0..1280677d 100644 --- a/pv/popups/channels.hpp +++ b/pv/popups/channels.hpp @@ -81,6 +81,9 @@ class Channels : public pv::widgets::Popup void showEvent(QShowEvent *event); +Q_SIGNALS: + void config_changed(); + private Q_SLOTS: #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) void on_channel_checked(QObject *widget); diff --git a/pv/toolbars/mainbar.cpp b/pv/toolbars/mainbar.cpp index cd46c063..57307173 100644 --- a/pv/toolbars/mainbar.cpp +++ b/pv/toolbars/mainbar.cpp @@ -552,6 +552,7 @@ void MainBar::update_device_config_widgets() // Update the channels popup Channels *const channels = new Channels(session_, this); channels_button_.set_popup(channels); + QObject::connect(channels, &Channels::config_changed, this, &MainBar::on_config_changed); // Update supported options. sample_count_supported_ = false; From 4d03f8a182d9188366ccb4e64894dbb5b82e1f0d Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 14 Dec 2025 23:20:12 +0300 Subject: [PATCH 3/3] toolbars: update traces on device configuration changes fixes interface lags on SR_CONF_NUM_LOGIC_CHANNELS change --- pv/toolbars/mainbar.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pv/toolbars/mainbar.cpp b/pv/toolbars/mainbar.cpp index 57307173..9611ba8a 100644 --- a/pv/toolbars/mainbar.cpp +++ b/pv/toolbars/mainbar.cpp @@ -812,6 +812,9 @@ void MainBar::on_config_changed() commit_sample_count(); commit_sample_rate(); + for (auto& signal: session_.signalbases()) { + signal->enabled_changed(signal->enabled()); + } } void MainBar::on_actionNewView_triggered(QAction* action)