Commit e7d2cd1e authored by Soeren Apel's avatar Soeren Apel

lecroy-xstream: Use best-effort strategy for unknown models

As there is a huge range of supported LeCroy scopes, naming
the IDN response for every single one of them is going to be
impossible. Hence, it makes more sense to treat all LeCroy
devices as if they were scopes and supported. This approach
lets users try to see how far they get and if they run into
issues, they can then be treated separately - e.g. by creating
a custom device profile.
Unless we do this, the vast majority of LeCroy scopes will
not be recognized by the driver.
parent 6158728c
...@@ -166,7 +166,8 @@ static const char *scope_analog_channel_names[] = { ...@@ -166,7 +166,8 @@ static const char *scope_analog_channel_names[] = {
static const struct scope_config scope_models[] = { static const struct scope_config scope_models[] = {
{ {
.name = { "WP7000", "WP7100", "WP7200", "WP7300" }, /* Default config */
.name = {NULL},
.analog_channels = 4, .analog_channels = 4,
.analog_names = &scope_analog_channel_names, .analog_names = &scope_analog_channel_names,
...@@ -455,8 +456,10 @@ SR_PRIV int lecroy_xstream_init_device(struct sr_dev_inst *sdi) ...@@ -455,8 +456,10 @@ SR_PRIV int lecroy_xstream_init_device(struct sr_dev_inst *sdi)
} }
if (model_index == -1) { if (model_index == -1) {
sr_dbg("Unsupported LeCroy device."); sr_dbg("Unknown LeCroy device, using default config.");
return SR_ERR_NA; for (i = 0; i < ARRAY_SIZE(scope_models); i++)
if (scope_models[i].name[0] == NULL)
model_index = i;
} }
/* Set the desired response and format modes. */ /* Set the desired response and format modes. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment