X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Ffluke-dmm%2Ffluke.c;h=7a1fbf92022b0111115581eb5cc3a2f8f999e966;hb=e3abd15d08bcd97b9e94e5775fb35d44a1d43397;hp=7604afa9a473a41d01497385a2bbb8340ec19f8f;hpb=c1aae90038456a61d0f9313d34e6107c3440d3e7;p=libsigrok.git
diff --git a/src/hardware/fluke-dmm/fluke.c b/src/hardware/fluke-dmm/fluke.c
index 7604afa9..7a1fbf92 100644
--- a/src/hardware/fluke-dmm/fluke.c
+++ b/src/hardware/fluke-dmm/fluke.c
@@ -17,6 +17,7 @@
* along with this program. If not, see .
*/
+#include
#include
#include
#include
@@ -25,10 +26,10 @@
#include "libsigrok-internal.h"
#include "fluke-dmm.h"
-static struct sr_datafeed_analog *handle_qm_18x(const struct sr_dev_inst *sdi,
+static struct sr_datafeed_analog_old *handle_qm_18x(const struct sr_dev_inst *sdi,
char **tokens)
{
- struct sr_datafeed_analog *analog;
+ struct sr_datafeed_analog_old *analog;
float fvalue;
char *e, *u;
gboolean is_oor;
@@ -58,7 +59,7 @@ static struct sr_datafeed_analog *handle_qm_18x(const struct sr_dev_inst *sdi,
while (*e && *e == ' ')
e++;
- analog = g_malloc0(sizeof(struct sr_datafeed_analog));
+ analog = g_malloc0(sizeof(struct sr_datafeed_analog_old));
analog->data = g_malloc(sizeof(float));
analog->channels = sdi->channels;
analog->num_samples = 1;
@@ -153,10 +154,10 @@ static struct sr_datafeed_analog *handle_qm_18x(const struct sr_dev_inst *sdi,
return analog;
}
-static struct sr_datafeed_analog *handle_qm_28x(const struct sr_dev_inst *sdi,
+static struct sr_datafeed_analog_old *handle_qm_28x(const struct sr_dev_inst *sdi,
char **tokens)
{
- struct sr_datafeed_analog *analog;
+ struct sr_datafeed_analog_old *analog;
float fvalue;
if (!tokens[1])
@@ -167,7 +168,7 @@ static struct sr_datafeed_analog *handle_qm_28x(const struct sr_dev_inst *sdi,
return NULL;
}
- analog = g_malloc0(sizeof(struct sr_datafeed_analog));
+ analog = g_malloc0(sizeof(struct sr_datafeed_analog_old));
analog->data = g_malloc(sizeof(float));
analog->channels = sdi->channels;
analog->num_samples = 1;
@@ -361,7 +362,7 @@ static void handle_qm_19x_data(const struct sr_dev_inst *sdi, char **tokens)
{
struct dev_context *devc;
struct sr_datafeed_packet packet;
- struct sr_datafeed_analog analog;
+ struct sr_datafeed_analog_old analog;
float fvalue;
if (!strcmp(tokens[0], "9.9E+37")) {
@@ -396,7 +397,7 @@ static void handle_qm_19x_data(const struct sr_dev_inst *sdi, char **tokens)
analog.mq = devc->mq;
analog.unit = devc->unit;
analog.mqflags = 0;
- packet.type = SR_DF_ANALOG;
+ packet.type = SR_DF_ANALOG_OLD;
packet.payload = &analog;
sr_session_send(devc->cb_data, &packet);
devc->num_samples++;
@@ -408,7 +409,7 @@ static void handle_line(const struct sr_dev_inst *sdi)
struct dev_context *devc;
struct sr_serial_dev_inst *serial;
struct sr_datafeed_packet packet;
- struct sr_datafeed_analog *analog;
+ struct sr_datafeed_analog_old *analog;
int num_tokens, n, i;
char cmd[16], **tokens;
@@ -432,7 +433,7 @@ static void handle_line(const struct sr_dev_inst *sdi)
if (devc->profile->model == FLUKE_187 || devc->profile->model == FLUKE_189) {
devc->expect_response = FALSE;
analog = handle_qm_18x(sdi, tokens);
- } else if (devc->profile->model == FLUKE_287) {
+ } else if (devc->profile->model == FLUKE_287 || devc->profile->model == FLUKE_289) {
devc->expect_response = FALSE;
analog = handle_qm_28x(sdi, tokens);
} else if (devc->profile->model == FLUKE_190) {
@@ -464,7 +465,7 @@ static void handle_line(const struct sr_dev_inst *sdi)
if (analog) {
/* Got a measurement. */
- packet.type = SR_DF_ANALOG;
+ packet.type = SR_DF_ANALOG_OLD;
packet.payload = analog;
sr_session_send(devc->cb_data, &packet);
devc->num_samples++;