From: Uwe Hermann Date: Fri, 27 Dec 2019 19:59:04 +0000 (+0100) Subject: agilent-dmm: U127x: Fix mode switch event handling. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e47e23355fdafb85f67399288fc48bcabf2b5608;p=libsigrok.git agilent-dmm: U127x: Fix mode switch event handling. The DMMs report as an event to which mode the user switched (by turning the rotary switch): "*0", "*1", etc. Most other DMMs have few modes, but the U127x DMMs have up to 11 different modes (i.e., "*10" is a valid event). --- diff --git a/src/hardware/agilent-dmm/protocol.c b/src/hardware/agilent-dmm/protocol.c index 624ff597..82ef93cb 100644 --- a/src/hardware/agilent-dmm/protocol.c +++ b/src/hardware/agilent-dmm/protocol.c @@ -1051,7 +1051,7 @@ SR_PRIV const struct agdmm_recv agdmm_recvs_u125x[] = { SR_PRIV const struct agdmm_recv agdmm_recvs_u127x[] = { { "^\"(\\d\\d.{18}\\d)\"$", recv_stat_u123x }, - { "^\\*([0-9])$", recv_switch }, + { "^\\*([0-9]+)$", recv_switch }, { "^([-+][0-9]\\.[0-9]{8}E[-+][0-9]{2})$", recv_fetc }, { "^\"(V|MV|A|MA|UA|FREQ),(\\d),(AC|DC|ACDC)\"$", recv_conf_u123x }, { "^\"(RES|CAP),(\\d)\"$", recv_conf_u123x},