JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

"Toggles" with more than two values?

 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - General Forum
View previous topic :: View next topic  
Author Message
Barf
Expert


Joined: 24 Oct 2008
Posts: 786

PostPosted: Tue Feb 23, 2016 11:14 am    Post subject: "Toggles" with more than two values? Reply with quote

Has anyone seen or heard about protocols using "toggles" with more than two values?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18131
Location: Chicago, IL

PostPosted: Tue Feb 23, 2016 11:53 am    Post subject: Reply with quote

What do you mean by a toggle? Do you mean a bit in a signal (which obviously can only be 0 and 1) or do you mean a toggle button (like POWER)? If it's the latter, an INPUT button has more than one value. Or do you mean you have a signal where there are 2 or more bits that increment with each button press?
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
Barf
Expert


Joined: 24 Oct 2008
Posts: 786

PostPosted: Tue Feb 23, 2016 12:01 pm    Post subject: Reply with quote

The last one. By definition a toggle takes two values, therefore I wrote "toggle".

IRP e.g. <...>(... T:2 ,T=(T+1)%4)[T@:0..3=0]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18131
Location: Chicago, IL

PostPosted: Tue Feb 23, 2016 12:03 pm    Post subject: Reply with quote

Yeah, I don't think I've heard of one of those before, but I take it that you just found one?
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
Barf
Expert


Joined: 24 Oct 2008
Posts: 786

PostPosted: Tue Feb 23, 2016 12:12 pm    Post subject: Reply with quote

No, for this ticket I am considering if it is safe to assume that there can only be two. It would simplify implementation quite a bit.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
3FG
Expert


Joined: 19 May 2009
Posts: 3224

PostPosted: Tue Feb 23, 2016 5:31 pm    Post subject: Reply with quote

Not at all sure I understand the question, but consider OrtekMCE:
Code:

{38.6k,480}<1,-1|-1,1>([P=0][P=1][P=2],4,-1,D:5,P:2,F:6,C:4,-48m)+{C=3+#D+#P+#F}
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 786

PostPosted: Wed Feb 24, 2016 3:23 am    Post subject: Reply with quote

No, you misunderstood. In OrtecMCE, P changes between intro, repeat, and ending, not between invocations. A toggle, or "toggle", maintains its value between invocations, "persistance", in my extension of the IRP-notation indicated by a trailing @. Thanx anyhow!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mathdon
Expert


Joined: 22 Jul 2008
Posts: 2871
Location: Cambridge, UK

PostPosted: Wed Feb 24, 2016 8:33 am    Post subject: Reply with quote

Barf wrote:
No, for this ticket I am considering if it is safe to assume that there can only be two. It would simplify implementation quite a bit.

I can't point you to a protocol that uses more than one bit, but the MAXQ protocol structure certainly has explicit provision for this possibility. Two or more consecutive bits can be specified, with those bits being modified on successive keypresses in one of three ways: (a) all selected bits toggled (inverted), (b) those bits being replaced by an integer value that is incremented on successive keypresses, or (c) those bits being replaced by an integer value that is decremented on successive keypresses.

As far as I am aware, the protocol engine for other processors also includes an n-bit counter, where n>1, that is incremented on successive keypresses, which may be used to cause the same behaviour as this for the MAXQ processors.
_________________
Graham
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18131
Location: Chicago, IL

PostPosted: Wed Feb 24, 2016 5:40 pm    Post subject: Reply with quote

I don't think he's asking whether we could program it into an executor, where obviously we could, I think he's asking if anyone has seen an actual IR signal which has a toggle that is greater than 1 bit. (Of course, purely from an English language point of view, I would challenge that such a field should be called a "toggle").
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
mathdon
Expert


Joined: 22 Jul 2008
Posts: 2871
Location: Cambridge, UK

PostPosted: Wed Feb 24, 2016 6:44 pm    Post subject: Reply with quote

The Robman wrote:
I don't think he's asking whether we could program it into an executor

And that isn't what I was answering, either. The point about MAXQ protocols is that there is an explicit provision for such "multi-bit toggles" without any need for program code. It is part of the data structure that precedes any actual code. The implication, to me at any rate, is that UEI envisages a need for this facility.

Edit: I have done some checking and found several examples that use this facility. Here is the IRP from PID 004A as one example:

{33.5k,479}<1,-17|1,-11>(T=T+1,(~T:-2,A:3:2,X:6,1,^136m)+).

Others are PIDs 002C, 00D1, 00E5 and 00F4.
_________________
Graham
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 786

PostPosted: Thu Feb 25, 2016 3:29 pm    Post subject: Reply with quote

Thanx for the answers, in particular -- of course -- to Graham for the definitive answer.

In case it interests someone: It turned out that it was not that hard to implement the general case.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - General Forum All times are GMT - 5 Hours
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
Get Smart! the band's official homepage Rockabilly Central