USB-UIRT Forum Forum Index USB-UIRT Forum
Plug-n-Play IR Solution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Repeating commands like Girder does?

 
Post new topic   Reply to topic    USB-UIRT Forum Forum Index -> Developers
View previous topic :: View next topic  
Author Message
roschler



Joined: 19 Nov 2004
Posts: 21

PostPosted: Sat Nov 19, 2005 2:26 pm    Post subject: Repeating commands like Girder does? Reply with quote

In Girder, when you open the USB-UIRT plugin dialog box by clicking the on "Settings" button from the "Plugins" tab, you see a field titled "Repeat". I assume this means how many times the IR command is sent to the USB UIRT, correct?

If this is true, how do I emulate the same behavior from my application? Which of the following approaches will repeat the command 4 times like Girder does?:

1) Making 4 separate transmit commands to the USB UIRT DLL. If this is the correct approach, should I add a "sleep" command before each repetitive call and if so, how many milliseconds?

2) Concatenate the IR codes string in the field labeled "Code 1". If this is the correct approach, then how do I do the concatenation? For example, if the IR code string is "R00008080", would I send the USB UIRT:

- "R00008080R00008080R00008080R00008080"

or

- "R00008080000080800000808000008080", only using the "R" prefix the first time and repeating only the numeric digits after that?

3) Another approach?

I ask this because I have noticed that for one particular command, Girder always gets the device to respond to the command, but when I send it from my app I sometimes have to repeat the command once or twice to get the device to respond (depending on the device's orientation to the USB UIRT).

If you have any additional timing tips on sending the command using repeats I'd appreciate it. My secondary worry is that if I do it wrong, I'll end up having the device interpret the repeated command as multiple commands instead of as a single command repeated multiple times. Since the command is a "toggle" command, if the device interprets the repeated commands as two separate commands instead of just one, they will "cancel out" and the device will do nothing. Note, when Girder sends the command with the Repeat field set to 4, the device successfully interprets it as a single command and quite reliably.

The device in this case is a Robopet.

Thanks.
_________________
Robert
RobotsRule Discussion Forum
http://www.robotsrule.com/phpBB2/
Back to top
View user's profile Send private message
jrhees
Site Admin


Joined: 28 Jan 2003
Posts: 1652

PostPosted: Mon Nov 21, 2005 4:47 pm    Post subject: Reply with quote

You're thinking too hard! :)

Just adjust the 'repeatCount' parameter in the TransmitIR() call.

-Jon
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    USB-UIRT Forum Forum Index -> Developers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group