qa_ctcss_squelch test is failing
|Assignee:||Tom Rondeau||% Done:||
qa_ctcss_squelch test is failing in current master
Updated by Tom Rondeau 4 months ago
- File qa_ctcss_fix.patch added
- Status changed from New to Feedback
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.
Updated by Johnathan Corgan 4 months 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