]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hameg-hmo/protocol.c
hameg-hmo: Remove invalid HMO2522, add missing HMO3522.
[libsigrok.git] / src / hardware / hameg-hmo / protocol.c
index 059ae4399cc612f241b6b5d0dff7e3e1f9ec6994..ae7cd4591c7dfe8693b642e9d309d6ec9f51e133 100644 (file)
@@ -177,9 +177,9 @@ static const char *scope_digital_channel_names[] = {
 
 static const struct scope_config scope_models[] = {
        {
-               /* HMO2522/3032/3042/3052 support 16 digital channels but they're not supported yet. */
-               .name = {"HMO1002", "HMO722", "HMO1022", "HMO1522", "HMO2022", "HMO2522",
-                               "HMO3032", "HMO3042", "HMO3052", NULL},
+               /* HMO3032/3042/3052/3522 support 16 digital channels but they're not supported yet. */
+               .name = {"HMO1002", "HMO722", "HMO1022", "HMO1522", "HMO2022", "HMO3032",
+                               "HMO3042", "HMO3052", "HMO3522", NULL},
                .analog_channels = 2,
                .digital_channels = 8,
                .digital_pods = 1,
@@ -881,7 +881,6 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data)
                if (sr_scpi_get_block(sdi->conn, NULL, &data) != SR_OK) {
                        if (data)
                                g_byte_array_free(data, TRUE);
-
                        return TRUE;
                }
 
@@ -927,7 +926,8 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data)
                break;
        case SR_CHANNEL_LOGIC:
                if (sr_scpi_get_block(sdi->conn, NULL, &data) != SR_OK) {
-                       g_free(data);
+                       if (data)
+                               g_byte_array_free(data, TRUE);
                        return TRUE;
                }