X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhameg-hmo%2Fprotocol.c;h=f44db1a272bb4eb31e73c7802ecd246891419a06;hb=547c4cdc60ad5c463e37c57d82dd33111061ac86;hp=b0cdfe778573449bf7b71fbb1c1ebfaca6be4951;hpb=d8b65ef66112f2c5dccdbe668b05e6856c00ac3d;p=libsigrok.git diff --git a/src/hardware/hameg-hmo/protocol.c b/src/hardware/hameg-hmo/protocol.c index b0cdfe77..f44db1a2 100644 --- a/src/hardware/hameg-hmo/protocol.c +++ b/src/hardware/hameg-hmo/protocol.c @@ -60,18 +60,18 @@ static const char *hameg_scpi_dialect[] = { static const uint32_t hmo_devopts[] = { SR_CONF_OSCILLOSCOPE, SR_CONF_LIMIT_FRAMES | SR_CONF_GET | SR_CONF_SET, - SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, + 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, - SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_GET | SR_CONF_SET, - SR_CONF_SAMPLERATE | SR_CONF_GET, + SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, + SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, }; static const uint32_t hmo_analog_devopts[] = { SR_CONF_NUM_VDIV | SR_CONF_GET, - SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, + SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, }; static const char *hmo_coupling_options[] = { @@ -308,7 +308,7 @@ static const struct scope_config scope_models[] = { .scpi_dialect = &hameg_scpi_dialect, }, { - .name = {"HMO2524", "HMO3034", "HMO3044", "HMO3054", NULL}, + .name = {"HMO2524", "HMO3034", "HMO3044", "HMO3054", "HMO3524", NULL}, .analog_channels = 4, .digital_channels = 16, .digital_pods = 2, @@ -364,9 +364,8 @@ static void scope_state_dump(const struct scope_config *config, state->digital_pods[i] ? "On" : "Off"); } - /* FIXME: this is wrong for TB > 1 second */ - tmp = sr_period_string((*config->timebases)[state->timebase][1] / - (*config->timebases)[state->timebase][0]); + tmp = sr_period_string((*config->timebases)[state->timebase][0], + (*config->timebases)[state->timebase][1]); sr_info("Current timebase: %s", tmp); g_free(tmp);