Is there a way to use the RDF to build a pick list?

Discussion forum for JP1 software tools currently in use, or being developed, such as IR, KM, RemoteMaster, and other misc apps/tools.

Moderator: Moderators

Post Reply
unclemiltie
Expert
Posts: 1819
Joined: Wed Jan 21, 2004 12:50 pm
Location: Pittsburgh, PA

Is there a way to use the RDF to build a pick list?

Post by unclemiltie »

On the new JP1.3 extender I'd like to have the user have the ability to pick how they'd like the LED to behave on the Shift and Xshift button. The three options would be:

Turn LED on and wait for next key to turn it off
Flash LED
do nothing

The way that I'd like to do this is to change the address for a CALL to the LED routine in the extender to the various routines. They are all within a few bytes of each other so I really only have to change the lower 8 bits of the 16-bit address. [Edit: wouldn't you know it, one remote crosses a page boundary so the list now needs to be 16 bits]


So what I'd like to do is have an option in IR/RMIR that has a list of {LED On, LED Blink, Nothing} and that corresponds to inserting one of three 8-bit hex values at a specified address.

For example, on the V3.00 extender beta that I posted the other day the corresponding values are:

LED On: $AF
LED Blink: $6C
Nothing: $79

These woulid all be inserted into address $0696 in the extender.

Is this possible? I can see how to change bits to on/off state and select things that are on the list of devicebuttons

Is this possible? It'd be a great way to implement this with no code in the extender.
(actually it would be even better if I could pick from a list of 16-bit values since there is always a chance that those routines would cross a 256 byte boundary and the single byte patch would't work.
Last edited by unclemiltie on Fri Oct 25, 2013 8:40 pm, edited 1 time in total.
this JP1 stuff is a sickness!
gfb107
Expert
Posts: 3411
Joined: Sun Aug 03, 2003 7:18 pm
Location: Cary, NC
Contact:

Post by gfb107 »

The RDF spec provides 2 ways to define a pick list for a Settings:
  1. An option list, where the value of each option is implied by the position in the list (starting at 0).
  2. A section name, where the names of the options and their values are specified in another section of the RDF.
I think IR allows sections with arbitrary names, so it might work in IR as is, but you would have to try it out. Unfortunately RM/RM-IR does not support arbitrary sections name, and only accepts DeviceTypes and DeviceButtons as section names for a setting.

Enhancing RM/RM-IR to support arbitrary sections for this purpose would be fairly easy to do, it's just a matter of finding someone with the time and skill to do it.

Another option is to enhance the RDF syntax to allow explicit value assignment for each name in the option list, but that would probably make the RDF incompatible with IR.
unclemiltie
Expert
Posts: 1819
Joined: Wed Jan 21, 2004 12:50 pm
Location: Pittsburgh, PA

Post by unclemiltie »

An arbitrary section would work for me

How do I request the feature? Is there a database on sourceforge?
this JP1 stuff is a sickness!
unclemiltie
Expert
Posts: 1819
Joined: Wed Jan 21, 2004 12:50 pm
Location: Pittsburgh, PA

Post by unclemiltie »

unclemiltie wrote:An arbitrary section would work for me

How do I request the feature? Is there a database on sourceforge?
bump…. who keeps the list of feature requests?
this JP1 stuff is a sickness!
Post Reply