]> sigrok.org Git - libsigrok.git/commitdiff
fs9922: Fix beep mode.
authorUwe Hermann <redacted>
Tue, 30 Apr 2013 23:02:46 +0000 (01:02 +0200)
committerUwe Hermann <redacted>
Tue, 30 Apr 2013 23:02:46 +0000 (01:02 +0200)
hardware/common/dmm/fs9922.c

index fced8f593ae59fc3ef798790a99376be395691e7..90cc8b069eef85701337ecc03a54fa49a8716a31 100644 (file)
@@ -279,7 +279,7 @@ static void handle_flags(struct sr_datafeed_analog *analog, float *floatval,
        if (info->is_beep) {
                analog->mq = SR_MQ_CONTINUITY;
                analog->unit = SR_UNIT_BOOLEAN;
-               *floatval = (*floatval < 0.0) ? 0.0 : 1.0;
+               *floatval = (*floatval == INFINITY) ? 0.0 : 1.0;
        }
        if (info->is_percent) {
                analog->mq = SR_MQ_DUTY_CYCLE;