Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pv/binding/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Device::Device(shared_ptr<sigrok::Configurable> 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;
Expand Down Expand Up @@ -115,6 +115,7 @@ Device::Device(shared_ptr<sigrok::Configurable> 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;

Expand Down
4 changes: 4 additions & 0 deletions pv/popups/channels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ void Channels::set_all_channels(bool set)
}

updating_channels_ = false;
config_changed();
}

void Channels::enable_channels_conditionally(
Expand All @@ -200,6 +201,7 @@ void Channels::enable_channels_conditionally(
}

updating_channels_ = false;
config_changed();
}

void Channels::disable_channels_conditionally(
Expand All @@ -219,6 +221,7 @@ void Channels::disable_channels_conditionally(
}

updating_channels_ = false;
config_changed();
}

void Channels::populate_group(shared_ptr<ChannelGroup> group,
Expand Down Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions pv/popups/channels.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions pv/toolbars/mainbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -811,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)
Expand Down