X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhameg-hmo%2Fprotocol.c;h=26dac0cb037f34de3a8e370bc2d74a99285a799d;hb=22fdb67fa0714c11cc0a58ee1423f55d18a4f080;hp=5986949bc4fcbab62205bca46e9f53a1d281f8ce;hpb=8c381a353c0ca87694c0f70557941c13929e314d;p=libsigrok.git diff --git a/src/hardware/hameg-hmo/protocol.c b/src/hardware/hameg-hmo/protocol.c index 5986949b..26dac0cb 100644 --- a/src/hardware/hameg-hmo/protocol.c +++ b/src/hardware/hameg-hmo/protocol.c @@ -117,7 +117,7 @@ static const char *rohde_schwarz_log_not_pod_scpi_dialect[] = { static const uint32_t devopts[] = { SR_CONF_OSCILLOSCOPE, SR_CONF_LIMIT_SAMPLES | SR_CONF_SET, - SR_CONF_LIMIT_FRAMES | SR_CONF_SET, + SR_CONF_LIMIT_FRAMES | SR_CONF_GET | SR_CONF_SET, SR_CONF_SAMPLERATE | SR_CONF_GET, SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, SR_CONF_NUM_HDIV | SR_CONF_GET, @@ -1380,8 +1380,6 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data) (void)fd; (void)revents; - data = NULL; - if (!(sdi = cb_data)) return TRUE; @@ -1410,6 +1408,7 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data) */ switch (ch->type) { case SR_CHANNEL_ANALOG: + data = NULL; if (sr_scpi_get_block(sdi->conn, NULL, &data) != SR_OK) { if (data) g_byte_array_free(data, TRUE); @@ -1442,6 +1441,7 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data) data = NULL; break; case SR_CHANNEL_LOGIC: + data = NULL; if (sr_scpi_get_block(sdi->conn, NULL, &data) != SR_OK) { if (data) g_byte_array_free(data, TRUE);