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.
This commit is contained in:
Aurelien Jacobs 2015-02-13 16:37:24 +01:00
parent b0c9d1d1c2
commit d5c4144e2c
1 changed files with 2 additions and 2 deletions

View File

@ -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;