From d5c4144e2cd5129da947277c24b699066d0bec72 Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Fri, 13 Feb 2015 16:37:24 +0100 Subject: [PATCH] rigol-ds: handle full word trigger slope in config_get(). Some scope can return POSITIVE/NEGATIVE instead of POS/NEG, so accept this as well. This closes bug #558. --- src/hardware/rigol-ds/api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/rigol-ds/api.c b/src/hardware/rigol-ds/api.c index b9b8a7d5..da1d8fb0 100644 --- a/src/hardware/rigol-ds/api.c +++ b/src/hardware/rigol-ds/api.c @@ -557,9 +557,9 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s *data = g_variant_new_string(tmp_str); break; case SR_CONF_TRIGGER_SLOPE: - if (!strcmp(devc->trigger_slope, "POS")) + if (!strncmp(devc->trigger_slope, "POS", 3)) tmp_str = "r"; - else if (!strcmp(devc->trigger_slope, "NEG")) + else if (!strncmp(devc->trigger_slope, "NEG", 3)) tmp_str = "f"; else return SR_ERR_NA;