Please don't take any of my comments as complaints. I appreciate the fact that you made this available now rather than waiting until you had time to polish it.mtakahar wrote:I'll add some notes on these points by the time of official release.
"enough" is a strange concept in this context. There should be some maximum, but reaching that maximum shouldn't be common.mtakahar wrote:In this model, the capturing part has to wait until it sees many enough sample (raw on/off cycles)
I plan to review DecodeIr.dll to make sure it doesn't place any relevent limit on maximum number of bursts. I'd prefer it to be ABLE to handle monster raw captures of macros, rather than force the low level to slice.
I think you mean total rather than gap. I don't think any total for duration is reasonable. It's both way too long and way to short. If you need an end of capture point, it should be a maximum gap. Probably 0.25 seconds is the right maximum gap to declare an absolute boundary in the capture.mtakahar wrote:or timeout occurs (I set it to 3 sec for now).
I hope you mean what I tried to say just above.mtakahar wrote:It's probablly better setting the timeout for off time that is long enough to catch button release but not too long.
I didn't realize it was threaded. When I thought about building something like this myself I hoped to be able to use threading to get instant results, but I wasn't sure I could.mtakahar wrote:Another thing is the way I'm setting the thread priorities. I gave 7 (on the scale of 1 - 10 with the default 5) to the capturing thread and 3 to the thread that monitors the capturing thread.
If appropriate I'll build another entry point to DecodeIr.dll to make it more friendly to a threaded design.
Optimally decode attempts should begin within a tenth of a second of the start of signal. I was worried that might not be practical (might not be possible to get decent time slicing from Windows to give the capture side low enough latency to continue capturing while giving the decode side some time). But if the time slicing works the rest isn't too hard. You could kludge with what's already in the context array. But it would be better to add something more focused on threading to the dll interface.
Assuming decoding can start without wrecking the ongoing capture, my idea is to have the top level logic grap an incomplete capture and display all the decodes from that, then look at what the capture side has added in the meantime. Assuming it is enough, it would once again display all decodes, but limited to those that extend into the new part of the capture.
If it can all run continuously, you also would want a maximum for the raw source of a decode and a maximum gap. Either of those allow you to throw away the (already decoded) beginning of the raw data buffer.
Right. I half realized you weren't doing that but failed to appreciate all the consequences.mtakahar wrote: I haven't looked into DecodeIR much enough to understand what the "context" array is exactly for, but my guess is that I can call it repeatedly with the same contents of the array and it'll decode each detected subsequence continuously?
When you have a new set of raw data you must clear the context array. Then you call DecodeIr multiple times. Before each such call you must reset the output fields to their no-decode values (-1 numeric, null first char of string), but you don't reclear context. You pass each such call the context left by the previous. The loop ends when there is no decode.
I lept to a stupid conclusion based on misunderstanding part of the behavior.mtakahar wrote: No, it doesn't detect repeating patterns, at least yet. Perhaps it makes sense to have a checkbox for specifying whether you want to keep the duplicates or not.
Please don't add any pre-decode reduction.
Post decode reduction would help a lot: Once there is either the multiple calls described above OR the sliding window threading described above, many signals would show up 10 times per second. It would help a lot to compare each decode against the previous and increase a "frame count" column when they match rather than add a new output row.
I've had nothing but trouble in all my previous attempts to use anything from Mingw.mtakahar wrote: - GNU Make. There are various kinds of ports that work on the
Windows platforms. Perhaps most of them work just fine.
I used the standalone Mingw version (as opposed to cygwin mingw.)
I've got Cygwin on this computer and a very old install of DJGPP on another. Both have the GNU make and compiler etc. But both have their own view (different from each other and from Mingw) of how to pretend that Windows specific system services fit a GNU pretense of portability.
So I either have to try to kludge code written for Mingw to work in one of the others, or try to sort out the environment variable mess of having both installed at once. I'm sure either task is easy for someone who knows their way around GNU. But I've done almost everything in Visual Studio.
At first glance it looks like you included something in your dll to interface between Java code and DecodeIr.dllmtakahar wrote: - GNU C compiler (gcc) if you want to rebuild the JNI (Java Native
Interface) program files written in C. You can download this from
the Mingw site mentioned above. Cygwin version may work, but not
tested. It should not be hard to make it work with MSVC, however,
again, it is untested and you may need to make some minor changes.
If that's correct AND the same could have been done in msvc AND the Java code could talk to two dlls (one for capture, one for decode), I think it would make more sense for me to add a Java callable entry point directly inside DecodeIr.dll (other people want that for other similar projects).
I'll try to figure out how from looking at your code, but any hints or URLs of tutorials or other help would be appreciated.
My previous attempts to work with those failed in compiler errors. The include files that came with my seriously obsolete msvc simply don't provide the definitions for symbols assumed by the source code in PortTalk.mtakahar wrote: - The following source files are included in porttalk22.zip
mentioned earlier in this document:
PortTalk_IOCTL.h
pt_ioctl.c