]> sigrok.org Git - libsigrok.git/commitdiff
agilent-dmm: U127x: Fix mode switch event handling.
authorUwe Hermann <redacted>
Fri, 27 Dec 2019 19:59:04 +0000 (20:59 +0100)
committerUwe Hermann <redacted>
Fri, 27 Dec 2019 19:59:04 +0000 (20:59 +0100)
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).

src/hardware/agilent-dmm/protocol.c

index 624ff597a76aad5c1293a99d0d19858c642bc073..82ef93cb6253e498b5b7f9b95187b56c64cecf2a 100644 (file)
@@ -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},