X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhantek-dso%2Fapi.c;h=01ef47f8bd5dea781157438ef47d925c6dae864d;hb=db85496ed16eb186a62b16be7d59d61f78e07d81;hp=bc10f39e5e1668ccd76ff37ff8363e199e13cc9f;hpb=3782e57129fa661a773be337c9f548708f593eb0;p=libsigrok.git diff --git a/src/hardware/hantek-dso/api.c b/src/hardware/hantek-dso/api.c index bc10f39e..01ef47f8 100644 --- a/src/hardware/hantek-dso/api.c +++ b/src/hardware/hantek-dso/api.c @@ -486,8 +486,7 @@ static int config_set(uint32_t key, GVariant *data, case SR_CONF_TRIGGER_SLOPE: if ((idx = std_str_idx(data, ARRAY_AND_SIZE(trigger_slopes))) < 0) return SR_ERR_ARG; - devc->triggerslope = (trigger_slopes[idx][0] == 'r') - ? SLOPE_POSITIVE : SLOPE_NEGATIVE; + devc->triggerslope = idx; break; case SR_CONF_HORIZ_TRIGGERPOS: tmp_double = g_variant_get_double(data);