bvwelch wrote:
So, when, instead, I see many lines, I figured something got "confused".
That sounds like it is caused by the incorrect boundaries added by frequency detection, as I described above. But I can't rule out the possibility that there is also some other flaw in capture/decode.
You mentioned you had the ability (java compiler installed, etc.) to rebuild an edited version of this software. Note line 309 of IRSignal.java is a complicated if statement for detecting a boundary across which the wavelength changes. You may want to edit that to make that if always false (or just remove lines 309 through 323). Until I improve the handling of frequency boundaries, you would be better off not having them at all.
By the way, I can see the need for a sensor such as we are using, to determine the actual carrier frequency, but couldn't we add, in addition, a IR recevier that also does the demodulation (n hardware) for us? Say, to a different parallel port pin?
I'm not sure which problem you want to solve:
1) Our existing hardware/software approach is marginal in whether it can do a decent job of computing the right frequency.
That's no reason to switch to a sensor that hides the frequency from us entirely.
2) Our attempts to determine the right frequency are currently generating problems that are worse than not knowing the frequency would be.
Again, that should be fixed in the software and I will. It doesn't mean switch to hardware that hides the frequency. Meanwhile I told you how to eliminate all (I think) the damage of the attempts to compute frequency while only somewhat reducing the ability to compute frequency.
3) You might be aware that common IR sensors that demodulate internally have a much wider range of acceptable distance than this sensor or other sensors I've seen results from that don't demodulate internally. I don't know how much of that is made possible by the internal demodulation vs. how much derives from other aspects of the intended market of the devices.
Anyway, with this device I get dramatically different results as a function of distance over a practical range of under 1 inch up to 3 feet (beyond which I don't recall getting any results good enough to use). A demodulating sensor may have a practical range out to 20 feet and may give the same results at 2 feet as at 20 feet.
But those sensors having timing rules that are even more restrictive than you would initially guess from their demodulation. They give you better results on protocols that fit their designed timing by killing the ability to capture signals outside that range.
That's a good idea for the sensor in your project, where you will preselect a single input protocol and can select one that's a perfect fit for your sensor. I don't think its a good idea for an IR analysis system for ooking at unknown signals and hoping to do better than a JP1 learning remote at seeing what those signals really are.
However, if you want to wire it up, I'll help you fix the software to be able to use it.
Seems like this would give us the best of both worlds.
I still think I can get best practical frequency detection while still surpressing the consequences. But if I can't, we just need an options dialog in CaptureIr so a no-consequences version of frequency detect is selected by default and an expert can switch to more accurate with more risk of consequences.