mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-23 13:42:55 +08:00
Fix measure display issue when start with waiting trigger status @ dso mode
This commit is contained in:
parent
683b93fda3
commit
b3bd01747b
@ -419,6 +419,14 @@ void SigSession::start_capture(bool instant,
|
||||
|
||||
// stop previous capture
|
||||
stop_capture();
|
||||
// reset measure of dso signal
|
||||
BOOST_FOREACH(const boost::shared_ptr<view::Signal> s, _signals)
|
||||
{
|
||||
assert(s);
|
||||
boost::shared_ptr<view::DsoSignal> dsoSig;
|
||||
if ((dsoSig = dynamic_pointer_cast<view::DsoSignal>(s)))
|
||||
dsoSig->set_mValid(false);
|
||||
}
|
||||
|
||||
// update setting
|
||||
if (_dev_inst->name() != "virtual-session")
|
||||
@ -1010,7 +1018,14 @@ void SigSession::feed_in_dso(const sr_datafeed_dso &dso)
|
||||
if (dso.num_samples != 0) {
|
||||
if (_dso_data)
|
||||
_dso_data->set_samplerate(_dev_inst->get_sample_rate());
|
||||
set_dso_feed(true);
|
||||
// reset measure of dso signal
|
||||
BOOST_FOREACH(const boost::shared_ptr<view::Signal> s, _signals)
|
||||
{
|
||||
assert(s);
|
||||
boost::shared_ptr<view::DsoSignal> dsoSig;
|
||||
if ((dsoSig = dynamic_pointer_cast<view::DsoSignal>(s)))
|
||||
dsoSig->set_mValid(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (_cur_dso_snapshot->memory_failed()) {
|
||||
@ -1708,14 +1723,4 @@ uint64_t SigSession::get_save_end() const
|
||||
return _save_end;
|
||||
}
|
||||
|
||||
bool SigSession::dso_feed() const
|
||||
{
|
||||
return _dso_feed;
|
||||
}
|
||||
|
||||
void SigSession::set_dso_feed(bool feed)
|
||||
{
|
||||
_dso_feed = feed;
|
||||
}
|
||||
|
||||
} // namespace pv
|
||||
|
@ -250,9 +250,6 @@ public:
|
||||
uint64_t get_save_start() const;
|
||||
uint64_t get_save_end() const;
|
||||
|
||||
bool dso_feed() const;
|
||||
void set_dso_feed(bool feed);
|
||||
|
||||
private:
|
||||
void set_capture_state(capture_state state);
|
||||
|
||||
|
@ -565,6 +565,11 @@ bool DsoSignal::show() const
|
||||
return _show;
|
||||
}
|
||||
|
||||
void DsoSignal::set_mValid(bool valid)
|
||||
{
|
||||
_mValid = valid;
|
||||
}
|
||||
|
||||
QString DsoSignal::get_measure(enum DSO_MEASURE_TYPE type)
|
||||
{
|
||||
const QString mNone = "--";
|
||||
@ -777,12 +782,6 @@ void DsoSignal::paint_mid(QPainter &p, int left, int right, QColor fore, QColor
|
||||
assert(_view);
|
||||
assert(right >= left);
|
||||
|
||||
{
|
||||
if (_view->session().dso_feed()) {
|
||||
_mValid = false;
|
||||
_view->session().set_dso_feed(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (enabled()) {
|
||||
const int index = get_index();
|
||||
|
@ -123,6 +123,7 @@ public:
|
||||
uint64_t get_factor();
|
||||
void set_show(bool show);
|
||||
bool show() const;
|
||||
void set_mValid(bool valid);
|
||||
|
||||
bool load_settings();
|
||||
int commit_settings();
|
||||
@ -224,6 +225,7 @@ private:
|
||||
private:
|
||||
boost::shared_ptr<pv::data::Dso> _data;
|
||||
float _scale;
|
||||
float _stop_scale;
|
||||
bool _en_lock;
|
||||
bool _show;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user