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

DecodeIR 2.43

 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Software
View previous topic :: View next topic  
Author Message
3FG
Expert


Joined: 19 May 2009
Posts: 3365

                    
PostPosted: Fri Aug 12, 2011 2:29 am    Post subject: DecodeIR 2.43 Reply with quote

[Note from Rob]
This thread split off from here:
http://www.hifi-remote.com/forums/viewtopic.php?p=98087#98087

Graham and Greg,
Here is version 2.43 of DecodeIR.dll, with a corresponding edition of protocols.ini and DecodeIR.html.

Perhaps I'll have time to augment protocols.ini with a couple more executors (e.g. NEC f16), before RMIR 2.02 is ready to go.

Note that protocols.ini makes use of a new class--NibbleSumChk.

I hope this can be complied under Linux and MacOS. Once that is done, we can make a general release. I also need to update the ChangeLog.


Last edited by 3FG on Tue Aug 16, 2011 1:49 am; edited 1 time in total
Back to top
View user's profile Send private message
3FG
Expert


Joined: 19 May 2009
Posts: 3365

                    
PostPosted: Sat Aug 13, 2011 11:24 pm    Post subject: Reply with quote

I've slightly updated DecodeIR 2.43 to change the output for the 4th byte in NEC-f16 to decimal rather than hexadecimal. DecodeIR.html has additional comments about F12, and protocols.ini includes NEC1-f16 Official and 3Fixed as well as an explicit entry for Barco (pid 002A).
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Sun Aug 14, 2011 4:07 am    Post subject: Reply with quote

DecodeIR.cpp and DecodeIr.h are identical, forgot to update?

Quote:
to change the output for the 4th byte in NEC-f16 to decimal rather than hexadecimal.....

I am parsing the output of DecodeIR, so I would be very thankful if you can make this change (replacing all hexadecimal outputs by decimal) completely. There are at least 13 "%02X" in the (take1-) code.

I would also be happy if you can move the (non-inlined, exported) function msb to the cpp-File. Normal programming practice (expressed in a number of programming guidelines) states that you declare, not define, funcitons in header files. By defining an (exported) function in a header file, every source file that includes it will have its own copy of that function, making the linker step out.

Accoring to a comment
Code:
int msb(int val, int bits=8)    // GD 2009 Moved here from DecodeIR.cpp
{

it was moved there by Graham, so his opinion is hereby solicited.

Greetings,

Bengt
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Sun Aug 14, 2011 4:34 am    Post subject: Reply with quote

[Possibly a moderator should take out the decodeir-discussion to another thread?]

The two versions of "Amino" decodes to the same name "Amino"; I would suggest using two different names, e.g. Amino and Amino-56.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
3FG
Expert


Joined: 19 May 2009
Posts: 3365

                    
PostPosted: Sun Aug 14, 2011 11:08 am    Post subject: Reply with quote

Barf,
I changed to "Amino" to "Amino-36" and "Amino-56".
"Zaptor" to "Zaptor-36" and "Zaptor-56".

We need to think about the consequences of changing the pMisc fields.
Back to top
View user's profile Send private message
mathdon
Expert


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

                    
PostPosted: Sun Aug 14, 2011 12:53 pm    Post subject: Reply with quote

Barf wrote:
According to a comment

Code:
int msb(int val, int bits=8)    // GD 2009 Moved here from DecodeIR.cpp
{

it was moved there by Graham, so his opinion is hereby solicited.

I can't remember the reason, but I suspect I was having a compilation problem that this move seemed to resolve. Contrary to what you might think, I'm not a C++ expert and I'm happy to defer to those that are. I have no vested interest in DecodeIR, I only took it on because John Fine no longer had time to work on it, and I'm happy that Dave has now taken it over - at least, I hope he has Very Happy .
_________________
Graham
Back to top
View user's profile Send private message
3FG
Expert


Joined: 19 May 2009
Posts: 3365

                    
PostPosted: Tue Aug 16, 2011 12:45 am    Post subject: Reply with quote

I'm sure no C++ expert either!
Anyway, after some fiddling, it did compile with the function msb back in DecodeIR.cpp-- and it seems to work.

Barf,
I've thought about the hexadecimal versus decimal issue, and I think it is handled appropriately now. I think in every instance, "%02X" is used for decodes of protocols that we know very little about or for which the (human) user will benefit from having the information displayed in hexadecimal format.

For example, XMP is very difficult for most remotes to learn, and DecodeIR does a remarkable job of fixing up poor learns. But it isn't always successful. Patterns in the data are generally much easier to see if it is in hex. Or take NEC-f16. The Apple IR protocol decoded as NEC1-f16 before I added a specific test for it. Without a hexadecimal presentation , it is quite difficult to notice that a bit in the third byte is not actually part of a function number but is instead a parity bit. That sort of information is quite valuable while we become acquainted with a new protocol.

The design of DecodeIR is based on a device:subdevice and OBC nomenclature. That may have seemed adequate at one time, but now a fair amount of information is passed as pMisc. This data can be toggle related or additional OBCs or comments about starting or final frames, etc. I don't think it is practical to expect to deal with pMisc via parsing.

Updated file with msb moved to DecodeIR.cpp, and an improved description of F12 in DecodeIR.html and protocols.ini.
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Tue Aug 16, 2011 12:25 pm    Post subject: Reply with quote

3FG wrote:

Anyway, after some fiddling, it did compile with the function msb back in DecodeIR.cpp-- and it seems to work.


Thanx!! Now I do not need
Code:
#define msb kdlkfldkfkfdlf
(before including DecodeIr.h) any longer. Very Happy

It certainly is ok to use hexadecimal number for debugging and research, however I have a problem with ambiguity: mixing foo=10 and bar=10, with one "10" meaning ten and the other sixteen is not nice... Possibly it would be possible to prepend a prefix, like "0x" to the hex numbers, "0x%02X" in the language of printf?

BTW, I have successfully parsed out a lot of interesting information from Misc.

A final note: would it be possible to change "Pair ID" to something not containing a space?

But I do not want to insist, it was just a suggestion for improvement of a great product. I know how to, e.g. catch a NumberFormatException. Wink

Thanx for the great work! Cool
Back to top
View user's profile Send private message Send e-mail Visit poster's website
3FG
Expert


Joined: 19 May 2009
Posts: 3365

                    
PostPosted: Tue Aug 16, 2011 11:51 pm    Post subject: Reply with quote

I changed from Pair ID to PairID.
I think changing to 0xABCD or ABCDh (shorter) makes sense. But... I'm afraid to try. Hex is used in a number of protocol names, and it's very tricky to change those, because DecodeIR can accept sequential calls to the DLL, and take various actions based on, in part, the protocol name.

There are 5 protocols for which hex notation is used in pMisc-- Async, Q1, PCTV, XX, and a version of XMP not yet seen in real life. I don't have a good way to exercise and test the potential changes.

The fact is I'm not proficient in C++, nor do I understand the program flow in DecodeIR. So of course I'm reluctant to "fix" stuff that is already working.
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Wed Aug 17, 2011 11:04 am    Post subject: Reply with quote

Quote:
I changed from Pair ID to PairID.

Very Happy Very Happy

Quote:
The fact is I'm not proficient in C++, nor do I understand the program flow in DecodeIR. So of course I'm reluctant to "fix" stuff that is already working.

Fair enough. Thanx for the support anyway.

Quote:
I don't have a good way to exercise and test the potential changes.

My crystal ball whispers that this may change in the near future... Wink
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 - Software 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
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control