};
struct pressure {
+ unsigned int flag; /* XXX Maybe this means arrhythmia? */
unsigned int systolic;
unsigned int diastolic;
unsigned int pulses;
pulse_pressure = p->systolic - p->diastolic;
printf("%u;", pulse_pressure);
+ if (p->flag)
+ printf("x");
+
+#if 0
+ /* The original software does not seem to be doing that */
if (p->pulses > 100)
printf("tachycardia");
else if (p->pulses < 60)
printf("bradycardia");
+#endif
printf("\n");
}
i += 10;
ret = sscanf((char *)(buffer + i),
- "%04u%03u%03u",
+ "%1u%03u%03u%03u",
+ &p.flag,
&p.systolic,
&p.diastolic,
&p.pulses);
- if (ret != 3)
+ if (ret != 4)
return -EINVAL;
/* pressure data is 10 bytes */
}
libusb_set_configuration(dev, 1);
- libusb_claim_interface(dev, 1);
libusb_detach_kernel_driver(dev, 1);
+ libusb_claim_interface(dev, 1);
ret = visomat_get_datetime(dev);
if (ret < 0)