From: Gerhard Sittig Date: Sun, 9 Jun 2019 15:03:31 +0000 (+0200) Subject: serial-dmm: bm86x: increase packet request frequency X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=b800667dafa66767fea9e32d0955f18ff5dc0cdb;p=libsigrok.git serial-dmm: bm86x: increase packet request frequency 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). --- diff --git a/src/hardware/serial-dmm/api.c b/src/hardware/serial-dmm/api.c index f0418175..4de00e1c 100644 --- a/src/hardware/serial-dmm/api.c +++ b/src/hardware/serial-dmm/api.c @@ -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