]> sigrok.org Git - libsigrok.git/commitdiff
serial-dmm: bm86x: increase packet request frequency
authorGerhard Sittig <redacted>
Sun, 9 Jun 2019 15:03:31 +0000 (17:03 +0200)
committerGerhard Sittig <redacted>
Thu, 13 Jun 2019 17:31:31 +0000 (19:31 +0200)
Request packets from the Brymen BM86x meter much faster. The previous
implementation in the separate driver used to immediately send another
request when a measurement arrived, with a 10ms granularity in the poll
routine, and a 500ms timeout between requests.

Considering the meter's update rate, stick with the 500ms timeout, but
increase the maximum request rate to 10 per second, with a minimum of 2
per second. This receives measurement data at the meter's capability
(compare DC and AC modes, seems to automatically adjust to the internal
operation, and match the display update rate).

src/hardware/serial-dmm/api.c

index f0418175c97c520fc88401f4f50975827124d997..4de00e1c173d8481947abedd74cd8b0b4548c058 100644 (file)
@@ -259,7 +259,7 @@ SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers,
        /* bm86x based meters {{{ */
        DMM_CONN(
                "brymen-bm86x", brymen_bm86x, "Brymen", "BM86x",
-               "hid/bu86x", NULL, BRYMEN_BM86X_PACKET_SIZE, 1500, 500,
+               "hid/bu86x", NULL, BRYMEN_BM86X_PACKET_SIZE, 500, 100,
                sr_brymen_bm86x_packet_request,
                sr_brymen_bm86x_packet_valid, sr_brymen_bm86x_parse,
                NULL