]> sigrok.org Git - libsigrok.git/blobdiff - hardware/openbench-logic-sniffer/protocol.c
ols: fixed parallel stage triggers
[libsigrok.git] / hardware / openbench-logic-sniffer / protocol.c
index 43f9f45cdb89a03920519822dc27ffcf67233601..c8b416857e73aae52b57309bd496cc9ec3112184 100644 (file)
@@ -99,7 +99,7 @@ SR_PRIV int ols_configure_probes(const struct sr_dev_inst *sdi)
                                return SR_ERR;
                }
                if (stage > devc->num_stages)
-                       devc->num_stages = stage;
+                       devc->num_stages = stage - 1;
        }
 
        return SR_OK;
@@ -383,7 +383,7 @@ SR_PRIV int ols_receive_data(int fd, int revents, void *cb_data)
                        num_channels++;
        }
 
-       if (revents == G_IO_IN) {
+       if (revents == G_IO_IN && devc->num_samples < devc->limit_samples) {
                if (serial_read(serial, &byte, 1) != 1)
                        return FALSE;