Your Universal Remote Control Center
RemoteCentral.com
Harmony Remote Controls Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Tough internal state variable question
This thread has 3 replies. Displaying all posts.
Post 1 made on Wednesday January 15, 2003 at 13:20
ZebertT
Long Time Member
Joined:
Posts:
December 2002
31
My amp has a ModeAnalog button which toggles, and Mode button which cycles.

For some Inputs, I need analog, so I would push ModeAnalog.

For other Inputs, I need digital, so I would push the Mode button once to go from Analog to Digital.

If it's already in Digital mode, additional Mode buttons would cycle through other modes which I don't want (and which doesn't include Analog).

An inelegent method would be:
For all Analog Inputs, send ModeAnalog
For all Digital Inputs, send ModeAnalog, then Mode (to switch) back to Digital.

Any better ideas?
Post 2 made on Wednesday January 15, 2003 at 16:36
TVAddict
Long Time Member
Joined:
Posts:
June 2002
91
What you need to do is to create a state variable:



<FEATURE>
<NAME>InternalState</NAME>
<STATEVARIABLE>
<NAME>AnalogMode</NAME>
<VALUE>Analog</VALUE>
<VALUE>Digital</VALUE>
<NEXTVALUE>
<IRPRESSACTION>IRAnalogToggle</IRPRESSACTION>
</NEXTVALUE>
</STATEVARIABLE>
</FEATURE>



And then within the activity you can say:



<SETUPACTIONS>
<SETUP>
<DEVICENAME>xxxxx</DEVICENAME>
<OPERATION>SetAnalogMode Digital</OPERATION>
</SETUP>
</SETUPACTIONS>



or



<SETUPACTIONS>
<SETUP>
<DEVICENAME>xxxxx</DEVICENAME>
<OPERATION>SetAnalogMode Analog</OPERATION>
</SETUP>
</SETUPACTIONS>



where xxxxx is a device id. Harmony will automatically remember the state and only send the command when necessary.
OP | Post 3 made on Wednesday January 15, 2003 at 19:40
ZebertT
Long Time Member
Joined:
Posts:
December 2002
31
I don't think the code:

IRAnalogToggle


will work in my case because two different buttons are needed to move from one mode to the other.

Post 4 made on Thursday January 16, 2003 at 09:15
TVAddict
Long Time Member
Joined:
Posts:
June 2002
91
If you feel like experimenting, try to add another NEXTVALUE section. Not sure if it would work though. Here's a proper way to do it:



<FEATURE>
<NAME>MultiInput State Input</NAME>
<INPUT>Digital</INPUT>
<INPUT>Analog</INPUT>
<SETINPUT>
<INPUT>Digital</INPUT>
<IRPRESSACTION>IRDigital</IRPRESSACTION>
</SETINPUT>
<SETINPUT>
<INPUT>Analog</INPUT>
<IRPRESSACTION>IRAnalog</IRPRESSACTION>
</SETINPUT>
<INPUTDELAY>800</INPUTDELAY>
</FEATURE>



And use it like this:



<SETUP>
<DEVICENAME>xxxxx</DEVICENAME>
<OPERATION>SetInput Digital</OPERATION>
</SETUP>




Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse