X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Ftondaj-sl-814%2Fprotocol.c;h=13f043056255b7d42fcbae3f1370e2486a615dd9;hb=b28e391a755e28568b6e0a8161d55d87e0c5f3cc;hp=4daf5af5abdd4ca3056ae478f6214c53f6a47a14;hpb=c68ade3cc721e0d5c5f24c96a4c461c776328037;p=libsigrok.git diff --git a/src/hardware/tondaj-sl-814/protocol.c b/src/hardware/tondaj-sl-814/protocol.c index 4daf5af5..13f04305 100644 --- a/src/hardware/tondaj-sl-814/protocol.c +++ b/src/hardware/tondaj-sl-814/protocol.c @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ #include @@ -98,7 +97,7 @@ static void decode_packet(struct sr_dev_inst *sdi) devc = sdi->priv; - sr_analog_init(&analog, &encoding, &meaning, &spec, 0); + sr_analog_init(&analog, &encoding, &meaning, &spec, 1); parse_packet(devc->buf, &floatval, &analog); @@ -175,7 +174,7 @@ SR_PRIV int tondaj_sl_814_receive_data(int fd, int revents, void *cb_data) } else if (devc->state == GET_PACKET) { /* Read a packet from the device. */ ret = serial_read_nonblocking(serial, devc->buf + devc->buflen, - 4 - devc->buflen); + 4 - devc->buflen); if (ret < 0) { sr_err("Error reading packet: %d.", ret); return TRUE; @@ -206,7 +205,7 @@ SR_PRIV int tondaj_sl_814_receive_data(int fd, int revents, void *cb_data) } if (sr_sw_limits_check(&devc->limits)) - sdi->driver->dev_acquisition_stop(sdi); + sr_dev_acquisition_stop(sdi); return TRUE; }