Bug #511

qa_ctcss_squelch test is failing

Added by Ben Reynwar over 1 year ago. Updated over 1 year ago.

Status:ClosedStart date:01/31/2013
Priority:HighDue date:
Assignee:Tom Rondeau% Done:

0%

Category:gr-analog
Target version:release-3.6.4
Resolution:fixed

Description

qa_ctcss_squelch test is failing in current master

qa_ctcss_fix.patch Magnifier (881 Bytes) Tom Rondeau, 02/05/2013 10:44 pm

History

#1 Updated by Tom Rondeau over 1 year ago

It appears that different OSes, or more likely compilers, handle floats slightly differently (which we've known). In this case, the tests for whether or not to mute the signal is done by comparing the 'same' number, which in reality turn out to be different in the millionths place (for example, 0.2 < 0.2 = 1 because the first value is actually 0.200001, or something).

The attached patch solves this issue by rounding to 5 decimal places, so we should be good enough for minor differences like we're seeing now. The rounding is done by multiplying by N, taking the floor, and then dividing by N. We could possibly just multiply everything by N, take the floor for the right ones, and compare those to avoid the division.

#2 Updated by Ben Reynwar over 1 year ago

That fixed the bug for me.

#3 Updated by Johnathan Corgan over 1 year ago

  • Status changed from Feedback to Resolved
  • Assignee set to Tom Rondeau
  • Target version set to release-3.6.4
  • Resolution set to fixed

Fixed in 40c9245a

#4 Updated by Ben Reynwar over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF