X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Flecroy-xstream%2Fprotocol.c;h=ec7e958c932c871e79fbff32d03747cf0da41fdb;hb=b0e1a1ecc4be698fb2cd48179ee48cf41e8f7f52;hp=066bed2f04593d9d60b328d54fa8fbb90a0a8b08;hpb=6d13a46ce0a1483fffb342239ca1b10fa354fca2;p=libsigrok.git diff --git a/src/hardware/lecroy-xstream/protocol.c b/src/hardware/lecroy-xstream/protocol.c index 066bed2f..ec7e958c 100644 --- a/src/hardware/lecroy-xstream/protocol.c +++ b/src/hardware/lecroy-xstream/protocol.c @@ -74,23 +74,6 @@ struct lecroy_wavedesc { }; } __attribute__((packed)); -static const uint32_t 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_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, -}; - -static const uint32_t 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, -}; - static const char *coupling_options[] = { "A1M", // AC with 1 MOhm termination "D50", // DC with 50 Ohm termination @@ -200,12 +183,6 @@ static const struct scope_config scope_models[] = { .analog_channels = 4, .analog_names = &scope_analog_channel_names, - .devopts = &devopts, - .num_devopts = ARRAY_SIZE(devopts), - - .analog_devopts = &analog_devopts, - .num_analog_devopts = ARRAY_SIZE(analog_devopts), - .coupling_options = &coupling_options, .trigger_sources = &trigger_sources, .trigger_slopes = &scope_trigger_slopes, @@ -236,8 +213,8 @@ static void scope_state_dump(const struct scope_config *config, tmp, state->analog_channels[i].vertical_offset); } - tmp = sr_period_string(((float)config->timebases[state->timebase].q) / - ((float)config->timebases[state->timebase].p)); + tmp = sr_period_string(config->timebases[state->timebase].p, + config->timebases[state->timebase].q); sr_info("Current timebase: %s", tmp); g_free(tmp);