Learn Modes

Interested in integrating USB-UIRT support into an application? Look here!

Moderator: jrhees

Learn Modes

Postby Iguanaman » Thu Mar 31, 2005 12:15 am

First I want to thank Jon and the other people on this forum for helping me figure out the IR codes for my Robosapien program.

My new question regards learning modes. When I run one of the program examples and use learn mode, the program seems to be expecting a long transmission time. When I point my Robosapien remote at the USB-UIRT device it seems to get about 12% complete and thats it. I think the remote only sends a short burst and it doesn't matter if I hold the button down or not. Is there anyway to learn the signal when it is short like that?
Iguanaman
 

Postby jrhees » Thu Mar 31, 2005 6:21 am

Iguanaman,

Some remotes send out single 'bursts' on some or all of their buttons. Because the USB-UIRT learn algorithm wants to see a steady stream so as to analyze the code and create the best capture possible, you have to take a 'detour' when learning burst codes.

Many apps that offser USB-UIRT support (including the Girder plugin) offer an 'Accept Burst' button. You can click this button in these cases to force the learn algorithm to complete the learn process with the single burst.

What program are you using to learn codes?

-Jon
jrhees
Site Admin
 
Posts: 1652
Joined: Tue Jan 28, 2003 11:49 pm

Program

Postby Iguanaman » Thu Mar 31, 2005 2:58 pm

I've been using the TryDrv examples. I've tried both the "C" and VB" versions
Iguanaman
 

Postby Dann » Wed Apr 27, 2005 12:56 am

jrhees wrote:Iguanaman,
Many apps that offser USB-UIRT support (including the Girder plugin) offer an 'Accept Burst' button.<snip>
-Jon


Hmm. I didn't see any options in the docs to turn 'Accept Bursts' on in the API. How would I go about setting that in my app?

Thanks,
Dann
Dann
 
Posts: 6
Joined: Thu Apr 14, 2005 9:25 pm
Location: Camarillo, CA

Postby jrhees » Wed Apr 27, 2005 3:23 am

The 'Accept Burst' feature requires some work on the part of the application. To implement 'Accept Burst':

Adding an Accept As Burst feature requires a modification to the way the pAbort boolean is handled during Learn. Since pAbort (declared as a pointer to a boolean) is really a pointer to an integer, setting pAbort to -1 (instead of 1/TRUE, which aborts the learn process) during the learn process will abort the learn, yet the learn will fill the IRCode buffer as if the learn completed normally.

Some tips:

1: Only enable your 'Accept Burst' button in your GUI during learn *after* some learn progress has been achieved: i.e., in your LearnCallback:

if ((progress > 1) && (carrierFreq != 0))
// enable Accept Burst button

Also, do not use this option if you are not either performing a RAW learn or a Pronto learn.

-Jon
jrhees
Site Admin
 
Posts: 1652
Joined: Tue Jan 28, 2003 11:49 pm

Postby Dann » Fri Apr 29, 2005 3:01 pm

jrhees wrote:The 'Accept Burst' feature requires
<snip>
1: Only enable your 'Accept Burst' button in your GUI during learn *after* some learn progress has been achieved: i.e., in your LearnCallback:
<snip>


I'm confused. I interpret your instructions to mean that one would have to already be in learn mode, and is pressing the button on the teaching xmitter, before accept burst could be enabled? It seems to me that by the time I did that the learn sequence would be nearly over anyway.

I would have thought accept burst would have to be turned on before the first xmit, and would automatically stop at the end of the first xmit, or at least at the beginning of the 2nd repeated xmit typically caused by holding down the xmitter's button.

Or, is it that you need to get things started in the method you explained, and then somehow it stays in that mode for other buttons to be xmitted/learned soon after?

Thank you,
Dann
Dann
 
Posts: 6
Joined: Thu Apr 14, 2005 9:25 pm
Location: Camarillo, CA

Postby jrhees » Fri Apr 29, 2005 4:23 pm

Dann,

The Accept Burst feature handles cases when the remote only sends out a single IR 'burst', so the cases where the user needs to use this feature will cause learning to begin (the Learn algorithm will see the first burst) but halt with the 'Accept Burst' button enabled.

-Jon
jrhees
Site Admin
 
Posts: 1652
Joined: Tue Jan 28, 2003 11:49 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 36 guests

cron