mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-13 13:32:53 +08:00
fix sample depth issue for single capture @ osc mode
This commit is contained in:
parent
c180b108de
commit
7fdb2d487e
@ -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,7 +350,10 @@ bool DsoSignal::update_capture()
|
||||
qDebug() << "ERROR: config_get SR_CONF_MAX_DSO_SAMPLERATE failed.";
|
||||
return false;
|
||||
}
|
||||
gvar = _dev_inst->get_config(NULL, NULL, SR_CONF_MAX_DSO_SAMPLELIMITS);
|
||||
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);
|
||||
g_variant_unref(gvar);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user