Document if or why sometimes digits/spec_digits is 0.
This commit is contained in:
parent
a005472fa2
commit
869c837511
|
@ -47,6 +47,7 @@ static void handle_packet(const struct sr_dev_inst *sdi)
|
|||
devc = sdi->priv;
|
||||
dump_packet("received", devc->packet);
|
||||
|
||||
/* Note: digits/spec_digits will be overridden later. */
|
||||
sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
|
||||
|
||||
packet.type = SR_DF_ANALOG;
|
||||
|
|
|
@ -218,6 +218,7 @@ static void brymen_bm86x_handle_packet(const struct sr_dev_inst *sdi,
|
|||
|
||||
devc = sdi->priv;
|
||||
|
||||
/* Note: digits/spec_digits will be overridden later. */
|
||||
sr_analog_init(&analog[0], &encoding[0], &meaning[0], &spec[0], 0);
|
||||
sr_analog_init(&analog[1], &encoding[1], &meaning[1], &spec[1], 0);
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@ static int handle_packet(const uint8_t *buf, struct sr_dev_inst *sdi, int idx)
|
|||
|
||||
devc = sdi->priv;
|
||||
|
||||
/* Note: digits/spec_digits will be overridden later. */
|
||||
sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
|
||||
memset(&info, 0, sizeof(struct center_info));
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ static void handle_packet(const uint8_t *buf, struct sr_dev_inst *sdi,
|
|||
|
||||
devc = sdi->priv;
|
||||
|
||||
/* Note: digits/spec_digits will be overridden later. */
|
||||
sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
|
||||
|
||||
analog.meaning->channels = sdi->channels;
|
||||
|
|
|
@ -348,6 +348,7 @@ SR_PRIV int korad_kaxxxxp_receive_data(int fd, int revents, void *cb_data)
|
|||
/* Get the value. */
|
||||
korad_kaxxxxp_get_reply(serial, devc);
|
||||
|
||||
/* Note: digits/spec_digits will be overridden later. */
|
||||
sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
|
||||
|
||||
/* Send the value forward. */
|
||||
|
|
|
@ -398,6 +398,7 @@ static void lascar_el_usb_dispatch(struct sr_dev_inst *sdi, unsigned char *buf,
|
|||
|
||||
devc = sdi->priv;
|
||||
|
||||
/* Note: digits/spec_digits will be overridden later. */
|
||||
sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
|
||||
|
||||
samples = buflen / devc->sample_size;
|
||||
|
|
|
@ -44,6 +44,7 @@ static void send_data(struct sr_dev_inst *sdi)
|
|||
packet.type = SR_DF_ANALOG;
|
||||
packet.payload = &analog;
|
||||
|
||||
/* Note: digits/spec_digits will be overridden later. */
|
||||
sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
|
||||
|
||||
analog.meaning->channels = sdi->channels;
|
||||
|
|
|
@ -87,6 +87,7 @@ SR_PRIV int scpi_pps_receive_data(int fd, int revents, void *cb_data)
|
|||
ch_spec = &devc->device->channels[pch->hw_output_idx];
|
||||
packet.type = SR_DF_ANALOG;
|
||||
packet.payload = &analog;
|
||||
/* Note: digits/spec_digits will be overridden later. */
|
||||
sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
|
||||
analog.meaning->channels = g_slist_append(NULL, devc->cur_channel);
|
||||
analog.num_samples = 1;
|
||||
|
|
|
@ -55,6 +55,7 @@ static void handle_packet(const uint8_t *buf, struct sr_dev_inst *sdi,
|
|||
log_dmm_packet(buf);
|
||||
devc = sdi->priv;
|
||||
|
||||
/* Note: digits/spec_digits will be overridden by the DMM parsers. */
|
||||
sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
|
||||
|
||||
analog.meaning->channels = sdi->channels;
|
||||
|
|
|
@ -70,6 +70,7 @@ static void teleinfo_send_value(struct sr_dev_inst *sdi, const char *channel_nam
|
|||
if (!ch || !ch->enabled)
|
||||
return;
|
||||
|
||||
/* Note: digits/spec_digits is actually really 0 for this device! */
|
||||
sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
|
||||
analog.meaning->channels = g_slist_append(analog.meaning->channels, ch);
|
||||
analog.num_samples = 1;
|
||||
|
|
|
@ -67,6 +67,7 @@ static void decode_packet(struct sr_dev_inst *sdi, const uint8_t *buf)
|
|||
|
||||
devc = sdi->priv;
|
||||
dmm = (struct dmm_info *)sdi->driver;
|
||||
/* Note: digits/spec_digits will be overridden by the DMM parsers. */
|
||||
sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
|
||||
info = g_malloc(dmm->info_size);
|
||||
|
||||
|
|
|
@ -644,6 +644,7 @@ static void handle_packet(struct sr_dev_inst *sdi, const uint8_t *pkt)
|
|||
|
||||
frame = FALSE;
|
||||
|
||||
/* Note: digits/spec_digits will be overridden later. */
|
||||
sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
|
||||
|
||||
analog.num_samples = 1;
|
||||
|
|
Loading…
Reference in New Issue