X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=hardware%2Fhameg-hmo%2Fprotocol.c;h=ff9cf29ff2b84407499f21f8f52df2df890b5aa5;hb=9d156555a557aa079056d42fbc9ddd12338e842e;hp=2188b40cb7250a557db463fe12b3e7f8b2b8809b;hpb=14a2f74d9a5d696baab59cda426604f1750d17ba;p=libsigrok.git diff --git a/hardware/hameg-hmo/protocol.c b/hardware/hameg-hmo/protocol.c index 2188b40c..ff9cf29f 100644 --- a/hardware/hameg-hmo/protocol.c +++ b/hardware/hameg-hmo/protocol.c @@ -53,6 +53,7 @@ static const int32_t hmo_hwcaps[] = { SR_CONF_TRIGGER_SLOPE, SR_CONF_HORIZ_TRIGGERPOS, SR_CONF_SAMPLERATE, + SR_CONF_LIMIT_FRAMES, }; static const int32_t hmo_analog_caps[] = { @@ -452,11 +453,11 @@ SR_PRIV int hmo_update_sample_rate(const struct sr_dev_inst *sdi) /* No channel is active, ask the instrument for the sample rate * in single shot mode */ if (!channel_found) { - g_snprintf(tmp_str, sizeof(tmp_str), - (*config->scpi_dialect)[SCPI_CMD_GET_SAMPLE_RATE]); - - if (sr_scpi_get_float(sdi->conn, tmp_str, &tmp_float) != SR_OK) + if (sr_scpi_get_float(sdi->conn, + (*config->scpi_dialect)[SCPI_CMD_GET_SAMPLE_RATE], + &tmp_float) != SR_OK) return SR_ERR; + state->sample_rate = tmp_float; } else { if (sr_scpi_get_int(sdi->conn, tmp_str, &tmp) != SR_OK)