IR 5.x Feature Request

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

Moderator: Moderators

Mark Pierson
Expert
Posts: 3023
Joined: Sun Aug 03, 2003 12:13 am
Location: Connecticut, USA
Contact:

IR 5.x Feature Request

Post by Mark Pierson »

As a logical next step, how about adding the ability to include a basic description with a device or protocol upgrade that can be used to create notes automatically?

Since the current Device Upgrade and Protocol Code copied from KM/RM each have a header line:
Upgrade Code 0 = 08 00 (Cable/0000)
Upgrade Protocol 0 = 01 40 (S3C8)

what if we append the Upgrade Description to the upgrade header:
Upgrade Code 0 = 08 00 (Cable/0000):My Device Upgrade

and the Protocol Name to the protocol header:
Upgrade Protocol 0 = 01 40 (S3C8):NEC1 Combo

and then have IR parse and use the text after the colon as the note ("My Device Upgrade" and "NEC1 Combo")?

I just tested, and IR will accept this as is, so it won't break anything. It's just a matter of handling the parsing.

Key Moves aren't as easy, but maybe a similar convention can be used? I've got to give it a little more thought so if anyone has any suggestions...
Mark
Nils_Ekberg
Expert
Posts: 1689
Joined: Sat Aug 02, 2003 2:08 pm
Location: Near Albany, NY

Post by Nils_Ekberg »

That's a good thought.

The first thing that comes to mind is that both RM and KM would need to be modified to send the device description and protocol name with the upgrade. As you pointed out, and I confirmed, IR just ignores it now so that change could be made independant of IR. Actually, IR could be done now using the convention that anything after the colon (if it exists) is a note.

The same could be done with extender protocols but would require extender writers to add that to the protocols section of the extender source. This may require an update to the Assembler and ExtInstall.

Same holds true for other tools like the Special Protocols spreadsheet.

Keymoves would take a little more thinking since I can't come up with an easy way for RM/KM to include the notes within the upgrade other than duplicationg the upgrade just for the keymoves and include the note. Could be difficult to parse.

Then, all that is left to do is either replace an existing protocol and device note or append or prepend to it if one already exists.
e34m5
Posts: 675
Joined: Tue Oct 14, 2003 1:04 pm
Location: Atlanta

Post by e34m5 »

As you can tell adding more sections to the file is no brainer. It's one of the main reasons I chose the INI format. It's very simple to read/write from it with out having to use text stream type parsing.

So all I need is for you guys to tell me what to store and how you want IR to display the info.
Paul
Mark Pierson
Expert
Posts: 3023
Joined: Sun Aug 03, 2003 12:13 am
Location: Connecticut, USA
Contact:

Post by Mark Pierson »

Nils_Ekberg wrote:That's a good thought.
I occasionally get those! ;)
The first thing that comes to mind is that both RM and KM would need to be modified to send the device description and protocol name with the upgrade.
It's a really simple change to KM (already included in my working copy ;) ). All we need to do is have Paul parse it out and stick it into the respective Notes field.
Then, all that is left to do is either replace an existing protocol and device note or append or prepend to it if one already exists.
If you're editing an existing device or protocol upgrade, I'd say append the new note to the end of any existing notes. The user can then modify it if need be.
Mark
Nils_Ekberg
Expert
Posts: 1689
Joined: Sat Aug 02, 2003 2:08 pm
Location: Near Albany, NY

Post by Nils_Ekberg »

Just thinking outloud....

Since most upgrades don't require a protocol upgrade should we consider putting the protocol name on the note string with the device upgrade notes also. I know we have the PID but the official name may be handy.
  • Something like:
    Upgrade Code 0 = 08 00 (Cable/0000):My Device Upgrade (Protocol = NEC1 Combo)
And if there is a protocol included then add it there also.
Mark Pierson
Expert
Posts: 3023
Joined: Sun Aug 03, 2003 12:13 am
Location: Connecticut, USA
Contact:

Post by Mark Pierson »

I can't think of a reason to have the name if you're using a built-in protocol. I don't think the typical JP1 user is going to need to know that level of detail.

I guess it's the same as if they were using a built-in setup code/protocol... there's no need (or way) to note anything (unless Notes are added to the Device Buttons grid on the General tab).
Mark
Mark Pierson
Expert
Posts: 3023
Joined: Sun Aug 03, 2003 12:13 am
Location: Connecticut, USA
Contact:

Post by Mark Pierson »

I've come up with a way to embed Notes for key moves copied from KM/RM. The format is:

AA BB CC DD EE{This is the Note} AA BB CC DD EE{This is another Note}...

Immediately following the key move hex string is the Note text enclosed in curly braces (I'm open to suggestions for a better character if this isn't acceptable). If there's no Note associated with the assigned function, there's nothing following the hex string.

A sample Device Upgrade Code block from KM looks like:

Upgrade Code 0 = 25 C4 (VCR/1476) GI Cable 0476
C4 08 72 FE 7C 61 B0 70 F0 D0 30 50 C8 98 0C 2C
AC 6C EC 88 CC 1C 9C 5C DC 48 A8
KeyMoves
25 F3 25 C4 44 26 F3 25 C4 C4 2A F3 25 C4 1C{Da
y UP} 2B F3 25 C4 9C{Day DOWN} 2C F3 25 C4 5C{Pa
ge UP} 2D F3 25 C4 DC{Page DOWN}
End

The individual key moves are:
25 F3 25 C4 44
26 F3 25 C4 C4
2A F3 25 C4 1C{Day UP}
2B F3 25 C4 9C{Day DOWN}
2C F3 25 C4 5C{Page UP}
2D F3 25 C4 DC{Page DOWN}

KM's Key Moves code block (pasted into IR's Key Moves tab using the [Import] button) uses the same format:

Upgrade KeyMoves 0 = 25 C4 (VCR/1476)
31 23 25 C4 2C{Arrow UP} 32 23 25 C4 AC{Arrow D
OWN} 33 23 25 C4 6C{Arrow LEFT} 34 23 25 C4 EC{A
rrow RIGHT}
End

31 23 25 C4 2C{Arrow UP}
32 23 25 C4 AC{Arrow DOWN}
33 23 25 C4 6C{Arrow LEFT}
34 23 25 C4 EC{Arrow RIGHT}

RM should have no trouble creating this format, and I've already prototyped it in KM, so if it's a go, we just need to get IR modified, and sync the release of the updated KM and RM.

To simplify the embedded upgrade and protocol Notes, perhaps we can just use everything after the closing paren as the note text, i.e.:

Upgrade Code 0 = 08 00 (Cable/0000) Device Upgrade

Upgrade Protocol 0 = 01 40 (S3C8) NEC1 Combo

There's no extra character involved, and either the note is there, or it isn't.

Comments?
Mark
e34m5
Posts: 675
Joined: Tue Oct 14, 2003 1:04 pm
Location: Atlanta

Post by e34m5 »

I like the latter version. It would be easy to search for the closing paren.

So long as we make that standard and there are no other closing perens we should be golden.
Paul
Mark Pierson
Expert
Posts: 3023
Joined: Sun Aug 03, 2003 12:13 am
Location: Connecticut, USA
Contact:

Post by Mark Pierson »

e34m5 wrote:It would be easy to search for the closing paren.
If you have to do a search, I guess it doesn't matter what character delimits the start of the note string, correct?
So long as... there are no other closing perens
Actually, I think Mark Pauker explained to me that everything after the 2 hex bytes was ignored by IR. Can you check the code and confirm that?

What about the proposed Key Move format... is that something you can work with? I have noticed that IR seems to convert all pasted code to uppercase, and that might be a problem with notes. I'm guessing that there's a parsing routine somewhere between the actual paste and the UI display. If so, I suspect it would be easy to do any further parsing required to extract the notes first before converting the remaining text (hex bytes) to uppercase.

As I said, I've already got the embedded notes working in KM. As it stands right now, there's only a key move note if the assigned function has one entered on the Functions sheet. Do you think that's sufficient, or should the actual function name be used if there's no note? That would force a note for every keymove included as part of an upgrade.
Mark
e34m5
Posts: 675
Joined: Tue Oct 14, 2003 1:04 pm
Location: Atlanta

Post by e34m5 »

Sorry I guess I didn't answer the whole post. Both ideas are fine as far as I can tell.

I'll need to check in the code, but this should not be an issue (I hope). Sometimes the code in IR is a bit convoluted. :)
Paul
Nils_Ekberg
Expert
Posts: 1689
Joined: Sat Aug 02, 2003 2:08 pm
Location: Near Albany, NY

Post by Nils_Ekberg »

I think you guys won me over on both formats...

The key is can Paul get it to work and that we don't have to manually convert the old V5 file to the new V5 file
e34m5
Posts: 675
Joined: Tue Oct 14, 2003 1:04 pm
Location: Atlanta

Post by e34m5 »

BTW...I'd like to revert back to the original way for the KM and Macro notes keys.

Is that OK with you guys....
Paul
Nils_Ekberg
Expert
Posts: 1689
Joined: Sat Aug 02, 2003 2:08 pm
Location: Near Albany, NY

Post by Nils_Ekberg »

Meaning this format. Actually I am fine either way as long as the info is there..

CBL:0392:Power:1106=Short = local Power, long = Power all devices
e34m5
Posts: 675
Joined: Tue Oct 14, 2003 1:04 pm
Location: Atlanta

Post by e34m5 »

Nils_Ekberg wrote:Meaning this format. Actually I am fine either way as long as the info is there..

CBL:0392:Power:1106=Short = local Power, long = Power all devices
This...CBL:Power = Short = local Power, long = Power all devices
Paul
Mark Pierson
Expert
Posts: 3023
Joined: Sun Aug 03, 2003 12:13 am
Location: Connecticut, USA
Contact:

Post by Mark Pierson »

Since I haven't looked at the IR source code since 2.x (and I don't know Delphi to begin with), I have no idea how IR parses the pasted-in code.

In thinking it over, I'm wondering if my notes format as described above is going to be difficult to do. I have another alternative that might be easier to implement in IR.

Instead of embedding the notes in the key move code like this:

Upgrade Code 0 = 25 C4 (VCR/1476) GI Cable 0476
C4 08 72 FE 7C 61 B0 70 F0 D0 30 50 C8 98 0C 2C
AC 6C EC 88 CC 1C 9C 5C DC 48 A8
KeyMoves
2A F3 25 C4 1C{Day UP} 2B F3 25 C4 9C{Day DOWN}
2C F3 25 C4 5C{Page UP} 2D F3 25 C4 DC{Page DOWN
}
End

what if there were a seperate Notes section like this?:

Upgrade Code 0 = 25 C4 (VCR/1476) GI Cable 0476
C4 08 72 FE 7C 61 B0 70 F0 D0 30 50 C8 98 0C 2C
AC 6C EC 88 CC 1C 9C 5C DC 48 A8
KeyMoves
2A F3 25 C4 1C 2B F3 25 C4 9C 2C F3 25 C4 5C 2D
F3 25 C4 DC
Notes
2A{Day UP} 2B{Day DOWN} 2C{Page UP} 2D{Page DOWN}

End

I think this might be easier to parse since you probably don't have to touch the current code that's parsing the key moves themselves. Just look for the Notes header, and call a notes parsing routine if it's found.

The format of the Notes section would be the hex key code followed by the note text enclosed in curly braces:

<key code>{note}

Do you have any opinion one way or the other?
Mark
Post Reply