session_(session),
srd_session_(nullptr),
logic_mux_data_invalid_(false),
+ stack_config_changed_(true),
current_segment_id_(0)
{
connect(&session_, SIGNAL(capture_state_changed(int)),
// Include the newly created decode channels in the channel lists
update_channel_list();
+ stack_config_changed_ = true;
auto_assign_signals(dec);
commit_decoder_channels();
begin_decode();
stack_.erase(iter);
// Update channels and decoded data
+ stack_config_changed_ = true;
update_channel_list();
begin_decode();
}
void DecodeSignal::reset_decode()
{
- terminate_srd_session();
+ if (stack_config_changed_)
+ stop_srd_session();
+ else
+ terminate_srd_session();
if (decode_thread_.joinable()) {
decode_interrupt_ = true;
logic_mux_thread_.join();
}
- stop_srd_session();
-
class_rows_.clear();
current_segment_id_ = 0;
segments_.clear();
void DecodeSignal::begin_decode()
{
- terminate_srd_session();
-
if (decode_thread_.joinable()) {
decode_interrupt_ = true;
decode_input_cond_.notify_one();
if (new_assignment) {
logic_mux_data_invalid_ = true;
+ stack_config_changed_ = true;
commit_decoder_channels();
channels_updated();
}
logic_mux_data_invalid_ = true;
}
+ stack_config_changed_ = true;
commit_decoder_channels();
channels_updated();
begin_decode();
if (ch.id == channel_id)
ch.initial_pin_state = init_state;
+ stack_config_changed_ = true;
channels_updated();
-
begin_decode();
}
}
// Update the internal structures
+ stack_config_changed_ = true;
update_channel_list();
commit_decoder_channels();
DecodeSignal::annotation_callback, this);
srd_session_start(srd_session_);
+
+ // We just recreated the srd session, so all stack changes are applied now
+ stack_config_changed_ = false;
}
void DecodeSignal::terminate_srd_session()