Hi Sylvain,

as mentioned on IRC, we'd prefer to adapt the driver to silently
deal with this problem instead of requiring user intervention.

What I mean is that the leading "*IDN " from the response can simply
be removed when it is encountered. Since the COMM_HEADER setting is
set by the driver later anyway, this is the only place where the
state of this setting is unknown.

Also, we don't really want to see debug output when a device is
*not* recognized because usually, all drivers scan all devices.
This would mean that for any device that it doesn't recognize,
lecroy-xstream would say that it doesn't recognize it. I'm sure
you agree that that's not very helpful :)

Can you please rework your patch and submit it again?

Thanks for your work!
 -Soeren


On Thu, 2017-09-28 at 11:06 +0200, Sylvain Pelissier wrote:
> Hello,
> 
> I have added the model names of the Waverunner 620Zi and 625Zi and a
> more verbose message in the case the Manufacturer name is not
> "LECROY", which helps to debug in case the echo of the command is
> still activated. Here is my patch:
> 
> From 36b926c39a8c55e958825d5161a86944d690a1f9 Mon Sep 17 00:00:00
> 2001
> From: Sylvain Pelissier <sylvain.peliss...@gmail.com>
> Date: Thu, 28 Sep 2017 11:01:31 +0200
> Subject: [PATCH] Lecroy model names for Waverunner 620 and 625
> 
> ---
>  src/hardware/lecroy-xstream/api.c      | 6 ++++--
>  src/hardware/lecroy-xstream/protocol.c | 2 +-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/src/hardware/lecroy-xstream/api.c b/src/hardware/lecroy-
> xstream/api.c
> index e20c5ad..b327535 100644
> --- a/src/hardware/lecroy-xstream/api.c
> +++ b/src/hardware/lecroy-xstream/api.c
> @@ -67,8 +67,10 @@ static struct sr_dev_inst *probe_device(struct
> sr_scpi_dev_inst *scpi)
>          goto fail;
>      }
>  
> -    if (std_str_idx_s(hw_info->manufacturer,
> ARRAY_AND_SIZE(manufacturers)) < 0)
> -        goto fail;
> +    if (std_str_idx_s(hw_info->manufacturer,
> ARRAY_AND_SIZE(manufacturers)) < 0){
> +        sr_info("'%s' manufacturer not supported", hw_info-
> >manufacturer);
> +        goto fail;
> +    }
>  
>      sdi = g_malloc0(sizeof(struct sr_dev_inst));
>      sdi->vendor = g_strdup(hw_info->manufacturer);
> diff --git a/src/hardware/lecroy-xstream/protocol.c
> b/src/hardware/lecroy-xstream/protocol.c
> index 95e33ac..38aa5cc 100644
> --- a/src/hardware/lecroy-xstream/protocol.c
> +++ b/src/hardware/lecroy-xstream/protocol.c
> @@ -166,7 +166,7 @@ static const char *scope_analog_channel_names[] =
> {
>  
>  static const struct scope_config scope_models[] = {
>      {
> -        .name = { "WP7000", "WP7100", "WP7200", "WP7300" },
> +        .name = { "WP7000", "WP7100", "WP7200", "WP7300", "WR620ZI",
> "WR625ZI" },
>  
>          .analog_channels = 4,
>          .analog_names = &scope_analog_channel_names,
> -------------------------------------------------------------------
> -----------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> sigrok-devel mailing list
> sigrok-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sigrok-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to