Commit 040475c6 authored by DreamSourceLab's avatar DreamSourceLab

fix resume issue @ oscilloscope auto(roll) mode

parent 0d581e10
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -77,9 +77,6 @@ static const char *probe_names[] = {
NULL,
};
static uint16_t test_sample_value;
static uint16_t test_init = 1;
static const uint64_t samplerates[] = {
SR_KHZ(10),
SR_KHZ(20),
......@@ -1529,8 +1526,6 @@ static int dev_acquisition_start(struct sr_dev_inst *sdi, void *cb_data)
int ret;
struct ctl_wr_cmd wr_cmd;
test_init = 1;
if (sdi->status != SR_ST_ACTIVE)
return SR_ERR_DEV_CLOSED;
......@@ -1546,7 +1541,6 @@ static int dev_acquisition_start(struct sr_dev_inst *sdi, void *cb_data)
devc->num_transfers = 0;
devc->submitted_transfers = 0;
devc->actual_samples = devc->limit_samples;
test_sample_value = 0;
devc->abort = FALSE;
devc->mstatus_valid = FALSE;
devc->overflow = FALSE;
......@@ -1641,8 +1635,13 @@ static int dev_acquisition_stop(const struct sr_dev_inst *sdi, void *cb_data)
static int dev_status_get(const struct sr_dev_inst *sdi, struct sr_status *status, int begin, int end)
{
int ret = dsl_dev_status_get(sdi, status, begin, end);
return ret;
struct DSL_context *devc = sdi->priv;
if (devc->instant || devc->status == DSL_DATA) {
int ret = dsl_dev_status_get(sdi, status, begin, end);
return ret;
} else {
return FALSE;
}
}
SR_PRIV struct sr_dev_driver DSCope_driver_info = {
......
......@@ -31,6 +31,7 @@ extern struct ds_trigger *trigger;
static const unsigned int single_buffer_time = 20;
static const unsigned int total_buffer_time = 100;
static const unsigned int instant_buffer_size = 1024 * 1024;
static uint16_t test_init = 1;
SR_PRIV int dsl_en_ch_num(const struct sr_dev_inst *sdi)
{
......@@ -1417,6 +1418,7 @@ SR_PRIV int dsl_start_transfers(const struct sr_dev_inst *sdi)
devc = sdi->priv;
usb = sdi->conn;
test_init = 1;
if (devc->instant)
dso_buffer_size = instant_buffer_size * g_slist_length(sdi->channels);
......
......@@ -169,9 +169,6 @@ static const char *probe_names[] = {
NULL,
};
static uint16_t test_sample_value;
static uint16_t test_init = 1;
static const uint64_t samplerates[] = {
SR_KHZ(10),
SR_KHZ(20),
......@@ -1403,8 +1400,6 @@ static int dev_acquisition_start(struct sr_dev_inst *sdi, void *cb_data)
int ret;
struct ctl_wr_cmd wr_cmd;
test_init = 1;
if (sdi->status != SR_ST_ACTIVE)
return SR_ERR_DEV_CLOSED;
......@@ -1422,7 +1417,6 @@ static int dev_acquisition_start(struct sr_dev_inst *sdi, void *cb_data)
devc->submitted_transfers = 0;
devc->actual_samples = devc->limit_samples;
devc->actual_bytes = devc->actual_samples / DSLOGIC_ATOMIC_SAMPLES * dsl_en_ch_num(sdi) * DSLOGIC_ATOMIC_SIZE;
test_sample_value = 0;
devc->abort = FALSE;
devc->mstatus_valid = FALSE;
devc->overflow = FALSE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment