Andreas Schulz wrote: > (see also message: > [patch 0/2] Change of libconcord API for IR codes learning - Build 20080628)
I have tested this patch a little bit, just for a few key captures, using my Harmony 880 and a Samsung HDTV remote (NECx2 protocol apparently), and it seems to work for me. I have a few questions about the code etc. though: 1) How was MAX_IR_SIGNAL_LENGTH chosen? Do we have any information on whether this correlates well with the official Logitech software? Should the length not be hard-coded, but dynamically allocated based on the amount of received data before timeout? We'd need to implement a total-recording-timeout rather than (or in addition to) time-since-last-data-seen timeout if we do this. 2) If I hold down the key on the original remote forever, CRemote::LearnIR loops forever, since it never sees "t_off>=500000". Since ir_signal_length is limited, perhaps the loop should break out if the ir_signal array is completely full? 3) Are we supposed to detect/remove/mark/... repeats in the recorded data. Or, does the Harmony website do this when it receives the encoded capture? 4) Can this function have progress callback added; either: % of number of ir_samples array filled (if fixed size) or % of maximum recording time passed (if we limit recording time rather than data size) Thanks! > > Note on concordance UI: > ======================= > To make use of the changed IR learning API of libconcord, after this patch > concordance will: > - show the number of keys to be learned > - prompt for the next key to learn, asking for user response whether to: > - - navigate through the list of key names (Next/Previous), > - - Learn an IR code for this key or > - - Quit > - after an IR code has been received, display an ASCII-rendering of the > received code. Even though not very accurate, it could give some indication > whether something might have gone wrong > - prompt the user after learning whether the received code shall be > - - Uploaded (posted) to Logitech, > - - Discarded, proceeding with the next key or > - - Learned again. > > Patch installation: > =================== > This patch should be applied to concordance CVS release 0.20. It reqiures > libconcord built and installed with the pervious patch [patch 1/2] applied. > > Apply patch via: > cd <wherever>/concordance > patch -p1 < concordance-IRLearn-20080628.patch > > Detailed comments on changes: > ============================= > > Index: concordance/concordance.1 > =================================================================== > +Learn IR from other remotes. Use <filename>. Supports also files with > multiple key names, i.e. when you checked multiple commands on the Logitech > website. For each command, you have the choice to skip to the next or > previous command or to learn the IR code from the original remote. > >> added remark about changed IR learning > > Index: concordance.c > =================================================================== > +#define strdup _strdup > >> fixed VC++ warning > > +void _dump_new_code(uint32_t carrier_clock, uint32_t *ir_signal, > + uint32_t ir_signal_length, struct options_t *options) > >> 'plot' received IR code as ASCII-art to identify bad IR signals > > +int _learn_ir_commands(uint8_t *data, uint32_t size, struct options_t > *options) > >> adapt to changed libconcord API; added code to navigate through list >> with multiple keys to be learned and to accept/reject learned IR signal. >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> concordance-devel mailing list >> concordance-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/concordance-devel ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel