Skip to content

Commit 7fdb2d4

Browse files
fix sample depth issue for single capture @ osc mode
1 parent c180b10 commit 7fdb2d4

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

DSView/pv/view/dsosignal.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ void DsoSignal::set_enable(bool enable)
211211
g_variant_new_boolean(enable));
212212

213213
if (running) {
214-
update_capture();
214+
update_capture(_view->session().get_instant());
215215
_view->session().repeat_resume();
216216
}
217217

@@ -333,7 +333,7 @@ bool DsoSignal::go_hDialPre(bool setted)
333333
}
334334
}
335335

336-
bool DsoSignal::update_capture()
336+
bool DsoSignal::update_capture(bool instant)
337337
{
338338
int ch_num = _view->session().get_ch_num(SR_CHANNEL_DSO);
339339
if (ch_num == 0)
@@ -350,7 +350,10 @@ bool DsoSignal::update_capture()
350350
qDebug() << "ERROR: config_get SR_CONF_MAX_DSO_SAMPLERATE failed.";
351351
return false;
352352
}
353-
gvar = _dev_inst->get_config(NULL, NULL, SR_CONF_MAX_DSO_SAMPLELIMITS);
353+
if (instant)
354+
gvar = _dev_inst->get_config(NULL, NULL, SR_CONF_HW_DEPTH);
355+
else
356+
gvar = _dev_inst->get_config(NULL, NULL, SR_CONF_MAX_DSO_SAMPLELIMITS);
354357
if (gvar != NULL) {
355358
max_sample_limit = g_variant_get_uint64(gvar);
356359
g_variant_unref(gvar);

DSView/pv/view/dsosignal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class DsoSignal : public Signal
115115
bool go_vDialNext();
116116
bool go_hDialPre(bool setted);
117117
bool go_hDialNext(bool setted);
118-
bool update_capture();
118+
bool update_capture(bool instant);
119119
uint64_t get_vDialValue() const;
120120
uint64_t get_hDialValue() const;
121121
uint16_t get_vDialSel() const;

DSView/pv/view/view.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ void View::update_sample(bool instant)
253253
BOOST_FOREACH(const boost::shared_ptr<pv::view::Signal> s, _session.get_signals()) {
254254
boost::shared_ptr<pv::view::DsoSignal> dsoSig;
255255
if (dsoSig = dynamic_pointer_cast<pv::view::DsoSignal>(s)) {
256-
dsoSig->update_capture();
256+
dsoSig->update_capture(instant);
257257
break;
258258
}
259259
}

0 commit comments

Comments
 (0)