X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Funi-t-ut32x%2Fprotocol.c;h=863f9fa82aab7bae3a7e370d1c94eb5aee27d6f0;hb=85b69c2b64fc3f0b0478063a983c1920bf0e30a7;hp=52c628922bf5b063642bb607931d36ed015d4d34;hpb=6c60facc190a03c50aa66d4b1d17c825fec5d20e;p=libsigrok.git diff --git a/hardware/uni-t-ut32x/protocol.c b/hardware/uni-t-ut32x/protocol.c index 52c62892..863f9fa8 100644 --- a/hardware/uni-t-ut32x/protocol.c +++ b/hardware/uni-t-ut32x/protocol.c @@ -82,7 +82,7 @@ static void process_packet(struct sr_dev_inst *sdi) is_valid = TRUE; if (devc->packet[1] == 0x3b && devc->packet[2] == 0x3b && devc->packet[3] == 0x3b && devc->packet[4] == 0x3b) - /* No measurement: missing probe, empty storage location, ... */ + /* No measurement: missing channel, empty storage location, ... */ is_valid = FALSE; temp = parse_temperature(devc->packet + 1); @@ -109,21 +109,21 @@ static void process_packet(struct sr_dev_inst *sdi) } switch (devc->packet[13] - 0x30) { case 0: - /* Probe T1. */ - analog.probes = g_slist_append(NULL, g_slist_nth_data(sdi->probes, 0)); + /* Channel T1. */ + analog.channels = g_slist_append(NULL, g_slist_nth_data(sdi->channels, 0)); break; case 1: - /* Probe T2. */ - analog.probes = g_slist_append(NULL, g_slist_nth_data(sdi->probes, 1)); + /* Channel T2. */ + analog.channels = g_slist_append(NULL, g_slist_nth_data(sdi->channels, 1)); break; case 2: case 3: - /* Probe T1-T2. */ - analog.probes = g_slist_append(NULL, g_slist_nth_data(sdi->probes, 2)); + /* Channel T1-T2. */ + analog.channels = g_slist_append(NULL, g_slist_nth_data(sdi->channels, 2)); analog.mqflags |= SR_MQFLAG_RELATIVE; break; default: - sr_err("Unknown probe 0x%.2x.", devc->packet[13]); + sr_err("Unknown channel 0x%.2x.", devc->packet[13]); is_valid = FALSE; } if (is_valid) { @@ -132,7 +132,7 @@ static void process_packet(struct sr_dev_inst *sdi) packet.type = SR_DF_ANALOG; packet.payload = &analog; sr_session_send(devc->cb_data, &packet); - g_slist_free(analog.probes); + g_slist_free(analog.channels); } } @@ -203,6 +203,7 @@ SR_PRIV int uni_t_ut32x_handle_events(int fd, int revents, void *cb_data) (void)fd; (void)revents; + drvc = di->priv; if (!(sdi = cb_data))