]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hameg-hmo/protocol.c
hameg-hmo: Beautify trigger pattern.
[libsigrok.git] / src / hardware / hameg-hmo / protocol.c
index e6e73e4b8c7392bfb8b4fa364311f5d09196ef5d..2806352bf157308818890a2a3fe7cc18e8c0ed1a 100644 (file)
@@ -1129,8 +1129,12 @@ SR_PRIV int hmo_scope_state_get(struct sr_dev_inst *sdi)
 
        if (sr_scpi_get_string(sdi->conn,
                               (*config->scpi_dialect)[SCPI_CMD_GET_TRIGGER_PATTERN],
-                              &state->trigger_pattern) != SR_OK)
+                              &tmp_str) != SR_OK)
                return SR_ERR;
+       strncpy(state->trigger_pattern,
+               sr_scpi_unquote_string(tmp_str),
+               MAX_ANALOG_CHANNEL_COUNT + MAX_DIGITAL_CHANNEL_COUNT);
+       g_free(tmp_str);
 
        if (hmo_update_sample_rate(sdi) != SR_OK)
                return SR_ERR;