fix sample depth issue for single capture @ osc mode

This commit is contained in:
DreamSourceLab 2017-07-29 17:16:55 +08:00
parent c180b108de
commit 7fdb2d487e
3 changed files with 8 additions and 5 deletions

View File

@ -211,7 +211,7 @@ void DsoSignal::set_enable(bool enable)
g_variant_new_boolean(enable));
if (running) {
update_capture();
update_capture(_view->session().get_instant());
_view->session().repeat_resume();
}
@ -333,7 +333,7 @@ bool DsoSignal::go_hDialPre(bool setted)
}
}
bool DsoSignal::update_capture()
bool DsoSignal::update_capture(bool instant)
{
int ch_num = _view->session().get_ch_num(SR_CHANNEL_DSO);
if (ch_num == 0)
@ -350,6 +350,9 @@ bool DsoSignal::update_capture()
qDebug() << "ERROR: config_get SR_CONF_MAX_DSO_SAMPLERATE failed.";
return false;
}
if (instant)
gvar = _dev_inst->get_config(NULL, NULL, SR_CONF_HW_DEPTH);
else
gvar = _dev_inst->get_config(NULL, NULL, SR_CONF_MAX_DSO_SAMPLELIMITS);
if (gvar != NULL) {
max_sample_limit = g_variant_get_uint64(gvar);

View File

@ -115,7 +115,7 @@ public:
bool go_vDialNext();
bool go_hDialPre(bool setted);
bool go_hDialNext(bool setted);
bool update_capture();
bool update_capture(bool instant);
uint64_t get_vDialValue() const;
uint64_t get_hDialValue() const;
uint16_t get_vDialSel() const;

View File

@ -253,7 +253,7 @@ void View::update_sample(bool instant)
BOOST_FOREACH(const boost::shared_ptr<pv::view::Signal> s, _session.get_signals()) {
boost::shared_ptr<pv::view::DsoSignal> dsoSig;
if (dsoSig = dynamic_pointer_cast<pv::view::DsoSignal>(s)) {
dsoSig->update_capture();
dsoSig->update_capture(instant);
break;
}
}