scpi-pps: Properly clean up acquisition session.
This commit is contained in:
parent
60475cd788
commit
bf48ccebee
|
@ -188,7 +188,7 @@ static int dev_close(struct sr_dev_inst *sdi)
|
||||||
|
|
||||||
static int cleanup(void)
|
static int cleanup(void)
|
||||||
{
|
{
|
||||||
return SR_OK;
|
return std_dev_clear(di, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
|
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
|
||||||
|
@ -510,6 +510,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
|
||||||
|
|
||||||
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
|
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
|
||||||
{
|
{
|
||||||
|
struct sr_datafeed_packet packet;
|
||||||
struct sr_scpi_dev_inst *scpi;
|
struct sr_scpi_dev_inst *scpi;
|
||||||
float f;
|
float f;
|
||||||
|
|
||||||
|
@ -528,6 +529,9 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
|
||||||
sr_scpi_get_float(scpi, NULL, &f);
|
sr_scpi_get_float(scpi, NULL, &f);
|
||||||
sr_scpi_source_remove(sdi->session, scpi);
|
sr_scpi_source_remove(sdi->session, scpi);
|
||||||
|
|
||||||
|
packet.type = SR_DF_END;
|
||||||
|
sr_session_send(sdi, &packet);
|
||||||
|
|
||||||
return SR_OK;
|
return SR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue