X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Flecroy-xstream%2Fprotocol.c;h=ce06c9b4cf7f66ccb78a53bb791935097c6198b8;hp=63459d0b8cb412daf850a7841ba59041c10f04c2;hb=e7d2cd1e0558594f590f1a4d531c87dd4922c6d9;hpb=6158728cdb82ecf5a9783fa94489d51c90875f59 diff --git a/src/hardware/lecroy-xstream/protocol.c b/src/hardware/lecroy-xstream/protocol.c index 63459d0b..ce06c9b4 100644 --- a/src/hardware/lecroy-xstream/protocol.c +++ b/src/hardware/lecroy-xstream/protocol.c @@ -166,7 +166,8 @@ static const char *scope_analog_channel_names[] = { static const struct scope_config scope_models[] = { { - .name = { "WP7000", "WP7100", "WP7200", "WP7300" }, + /* Default config */ + .name = {NULL}, .analog_channels = 4, .analog_names = &scope_analog_channel_names, @@ -455,8 +456,10 @@ SR_PRIV int lecroy_xstream_init_device(struct sr_dev_inst *sdi) } if (model_index == -1) { - sr_dbg("Unsupported LeCroy device."); - return SR_ERR_NA; + sr_dbg("Unknown LeCroy device, using default config."); + 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. */