X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fvictor-dmm%2Fprotocol.c;h=18b0cd1f73ecb33087b5701ce1febef9678c91d2;hb=0f8bee7162f41095ca1975fec9a87975ce5a554a;hp=c25ac52c464a13c998ae51c406c61fd9328da75c;hpb=695dc859c15ba4190f5c1aa2e1a6e2dc6a6e5845;p=libsigrok.git diff --git a/src/hardware/victor-dmm/protocol.c b/src/hardware/victor-dmm/protocol.c index c25ac52c..18b0cd1f 100644 --- a/src/hardware/victor-dmm/protocol.c +++ b/src/hardware/victor-dmm/protocol.c @@ -264,18 +264,18 @@ static void decode_buf(struct sr_dev_inst *sdi, unsigned char *data) packet.payload = &analog; sr_session_send(sdi, &packet); - devc->num_samples++; + sr_sw_limits_update_samples_read(&devc->limits, 1); } SR_PRIV int victor_dmm_receive_data(struct sr_dev_inst *sdi, unsigned char *buf) { + static const unsigned char obfuscation[DMM_DATA_SIZE] = "jodenxunickxia"; + static const unsigned char shuffle[DMM_DATA_SIZE] = { + 6, 13, 5, 11, 2, 7, 9, 8, 3, 10, 12, 0, 4, 1 + }; GString *dbg; int i; unsigned char data[DMM_DATA_SIZE]; - unsigned char obfuscation[DMM_DATA_SIZE] = "jodenxunickxia"; - unsigned char shuffle[DMM_DATA_SIZE] = { - 6, 13, 5, 11, 2, 7, 9, 8, 3, 10, 12, 0, 4, 1 - }; for (i = 0; i < DMM_DATA_SIZE && buf[i] == 0; i++); if (i == DMM_DATA_SIZE) {