mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-13 13:32:53 +08:00
Add warning message when buffer full @ LA RLE mode
This commit is contained in:
parent
d0dcc01318
commit
63772095b3
@ -486,6 +486,25 @@ void MainWindow::capture_state_changed(int state)
|
|||||||
_sampling_bar->enable_toggle(state != SigSession::Running);
|
_sampling_bar->enable_toggle(state != SigSession::Running);
|
||||||
_trig_bar->enable_toggle(state != SigSession::Running);
|
_trig_bar->enable_toggle(state != SigSession::Running);
|
||||||
_measure_dock->widget()->setEnabled(state != SigSession::Running);
|
_measure_dock->widget()->setEnabled(state != SigSession::Running);
|
||||||
|
if (_session.get_device()->dev_inst()->mode == LOGIC &&
|
||||||
|
state == SigSession::Stopped) {
|
||||||
|
GVariant *gvar = _session.get_device()->get_config(NULL, NULL, SR_CONF_RLE);
|
||||||
|
if (gvar != NULL) {
|
||||||
|
bool rle = g_variant_get_boolean(gvar);
|
||||||
|
g_variant_unref(gvar);
|
||||||
|
if (rle) {
|
||||||
|
gvar = _session.get_device()->get_config(NULL, NULL, SR_CONF_ACTUAL_SAMPLES);
|
||||||
|
if (gvar != NULL) {
|
||||||
|
uint64_t actual_samples = g_variant_get_uint64(gvar);
|
||||||
|
g_variant_unref(gvar);
|
||||||
|
if (actual_samples != _session.get_device()->get_sample_limit()) {
|
||||||
|
show_session_error(tr("RLE Mode Warning"),
|
||||||
|
tr("Hardware buffer is full!\nActually received samples is less than setted sample depth!"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#ifdef TEST_MODE
|
#ifdef TEST_MODE
|
||||||
if (state == SigSession::Stopped) {
|
if (state == SigSession::Stopped) {
|
||||||
test_timer.start(100);
|
test_timer.start(100);
|
||||||
|
@ -1196,6 +1196,12 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
|
|||||||
devc = sdi->priv;
|
devc = sdi->priv;
|
||||||
*data = g_variant_new_uint64(devc->limit_samples);
|
*data = g_variant_new_uint64(devc->limit_samples);
|
||||||
break;
|
break;
|
||||||
|
case SR_CONF_ACTUAL_SAMPLES:
|
||||||
|
if (!sdi)
|
||||||
|
return SR_ERR;
|
||||||
|
devc = sdi->priv;
|
||||||
|
*data = g_variant_new_uint64(devc->actual_samples);
|
||||||
|
break;
|
||||||
case SR_CONF_SAMPLERATE:
|
case SR_CONF_SAMPLERATE:
|
||||||
if (!sdi)
|
if (!sdi)
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
@ -2530,6 +2536,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
|
|||||||
devc->status = DSL_INIT;
|
devc->status = DSL_INIT;
|
||||||
devc->num_transfers = 0;
|
devc->num_transfers = 0;
|
||||||
devc->submitted_transfers = 0;
|
devc->submitted_transfers = 0;
|
||||||
|
devc->actual_samples = devc->limit_samples;
|
||||||
|
|
||||||
/* Configures devc->trigger_* and devc->sample_wide */
|
/* Configures devc->trigger_* and devc->sample_wide */
|
||||||
if (configure_probes(sdi) != SR_OK) {
|
if (configure_probes(sdi) != SR_OK) {
|
||||||
|
@ -59,6 +59,8 @@ static struct sr_config_info sr_config_info_data[] = {
|
|||||||
"Sample rate", "Sample rate", NULL},
|
"Sample rate", "Sample rate", NULL},
|
||||||
{SR_CONF_LIMIT_SAMPLES, SR_T_UINT64, "samplecount",
|
{SR_CONF_LIMIT_SAMPLES, SR_T_UINT64, "samplecount",
|
||||||
"Sample count", "Sample count", NULL},
|
"Sample count", "Sample count", NULL},
|
||||||
|
{SR_CONF_ACTUAL_SAMPLES, SR_T_UINT64, "samplecount",
|
||||||
|
"Sample count", "Sample count", NULL},
|
||||||
{SR_CONF_CLOCK_TYPE, SR_T_BOOL, "clocktype",
|
{SR_CONF_CLOCK_TYPE, SR_T_BOOL, "clocktype",
|
||||||
"Using External Clock", "Using External Clock", NULL},
|
"Using External Clock", "Using External Clock", NULL},
|
||||||
{SR_CONF_CLOCK_EDGE, SR_T_BOOL, "clockedge",
|
{SR_CONF_CLOCK_EDGE, SR_T_BOOL, "clockedge",
|
||||||
|
@ -856,6 +856,11 @@ enum {
|
|||||||
*/
|
*/
|
||||||
SR_CONF_LIMIT_SAMPLES,
|
SR_CONF_LIMIT_SAMPLES,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The actual sample count received
|
||||||
|
*/
|
||||||
|
SR_CONF_ACTUAL_SAMPLES,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The device supports setting a frame limit (how many
|
* The device supports setting a frame limit (how many
|
||||||
* frames should be acquired).
|
* frames should be acquired).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user