]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/fluke-dmm/api.c
output/csv: use intermediate time_t var, silence compiler warning
[libsigrok.git] / src / hardware / fluke-dmm / api.c
index 50add95d7be20778f0a736a85de8c53b51234910..b28e9be4ca8e4d4c81826fda93604e4d4dbdc9d5 100644 (file)
@@ -45,7 +45,7 @@ static const uint32_t devopts[] = {
 static const char *scan_conn[] = {
        /* 287/289 */
        "115200/8n1",
-       /* 187/189 */
+       /* 87/89/187/189 */
        "9600/8n1",
        /* Scopemeter 190 series */
        "1200/8n1",
@@ -53,10 +53,12 @@ static const char *scan_conn[] = {
 };
 
 static const struct flukedmm_profile supported_flukedmm[] = {
+       { FLUKE_87, "87", 100, 1000 },
+       { FLUKE_89, "89", 100, 1000 },
        { FLUKE_187, "187", 100, 1000 },
        { FLUKE_189, "189", 100, 1000 },
-       { FLUKE_287, "287", 100, 1000 },
        { FLUKE_190, "199B", 1000, 3500 },
+       { FLUKE_287, "287", 100, 1000 },
        { FLUKE_289, "289", 100, 1000 },
 };
 
@@ -90,7 +92,7 @@ static GSList *fluke_scan(struct sr_dev_driver *di, const char *conn,
 
                /* Response is first a CMD_ACK byte (ASCII '0' for OK,
                 * or '1' to signify an error. */
-               len = 128;
+               len = sizeof(buf);
                serial_readline(serial, &b, &len, 150);
                if (len != 1)
                        continue;
@@ -98,7 +100,7 @@ static GSList *fluke_scan(struct sr_dev_driver *di, const char *conn,
                        continue;
 
                /* If CMD_ACK was OK, ID string follows. */
-               len = 128;
+               len = sizeof(buf);
                serial_readline(serial, &b, &len, 850);
                if (len < 10)
                        continue;
@@ -182,8 +184,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        return devices;
 }
 
-static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_channel_group *cg)
+static int config_set(uint32_t key, GVariant *data,
+       const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
 
@@ -194,8 +196,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
        return sr_sw_limits_config_set(&devc->limits, key, data);
 }
 
-static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_channel_group *cg)
+static int config_list(uint32_t key, GVariant **data,
+       const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
 }
@@ -210,7 +212,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        sr_sw_limits_acquisition_start(&devc->limits);
        std_session_send_df_header(sdi);
 
-       /* Poll every 100ms, or whenever some data comes in. */
        serial = sdi->conn;
        serial_source_add(sdi->session, serial, G_IO_IN, 50,
                        fluke_receive_data, (void *)sdi);
@@ -227,7 +228,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
 
 static struct sr_dev_driver flukedmm_driver_info = {
        .name = "fluke-dmm",
-       .longname = "Fluke 18x/28x series DMMs",
+       .longname = "Fluke 8x/18x/28x series DMMs",
        .api_version = 1,
        .init = std_init,
        .cleanup = std_cleanup,