fx2lafw: Convert to SR_DF_ANALOG.

This commit is contained in:
Uwe Hermann 2016-05-28 17:41:35 +02:00
parent a8372c3ed9
commit a6ad49b39f
1 changed files with 12 additions and 9 deletions

View File

@ -390,6 +390,10 @@ SR_PRIV void mso_send_data_proc(struct sr_dev_inst *sdi,
{ {
size_t i; size_t i;
struct dev_context *devc; struct dev_context *devc;
struct sr_datafeed_analog analog;
struct sr_analog_encoding encoding;
struct sr_analog_meaning meaning;
struct sr_analog_spec spec;
(void)sample_width; (void)sample_width;
@ -417,17 +421,16 @@ SR_PRIV void mso_send_data_proc(struct sr_dev_inst *sdi,
sr_session_send(sdi, &logic_packet); sr_session_send(sdi, &logic_packet);
const struct sr_datafeed_analog_old analog = { sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
.channels = devc->enabled_analog_channels, analog.meaning->channels = devc->enabled_analog_channels;
.num_samples = length, analog.meaning->mq = SR_MQ_VOLTAGE;
.mq = SR_MQ_VOLTAGE, analog.meaning->unit = SR_UNIT_VOLT;
.unit = SR_UNIT_VOLT, analog.meaning->mqflags = 0 /* SR_MQFLAG_DC */;
.mqflags = 0 /*SR_MQFLAG_DC*/, analog.num_samples = length;
.data = devc->analog_buffer analog.data = devc->analog_buffer;
};
const struct sr_datafeed_packet analog_packet = { const struct sr_datafeed_packet analog_packet = {
.type = SR_DF_ANALOG_OLD, .type = SR_DF_ANALOG,
.payload = &analog .payload = &analog
}; };