fs9922: Fix beep mode.

This commit is contained in:
Uwe Hermann 2013-05-01 01:02:46 +02:00
parent 649a4cd672
commit ad00a54da6
1 changed files with 1 additions and 1 deletions

View 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;