Last, but not least, here comes the patches for congruity
and concordance to utilize libIRremotes for reading Pronto
codes.
Patches are against congruity8 resp. CVS concordance plus
patch for new IR learning (from previous messages).
Regards, Andreas Schulz
diff -prc congruity8/Changelog congruity8.1/Changelog
*** congruity8/Changelog 2008-06-05 09:00:15.0 +0200
--- congruity8.1/Changelog 2008-06-05 08:58:55.0 +0200
***
*** 1,3
--- 1,7
+ * 2008-06-05 Andreas Schulz [EMAIL PROTECTED] - congruity-8.1
+ - Added support for learning IR codes from Philips Pronto hex codes,
+ using libIRremotes.
+
* 2008-06-05 Andreas Schulz [EMAIL PROTECTED] - congruity-8
- Added retrieval of remote information, shown as tooltip for the
remote image.
diff -prc congruity8/congruity congruity8.1/congruity
*** congruity8/congruity 2008-06-05 23:46:27.0 +0200
--- congruity8.1/congruity 2008-06-05 23:46:27.0 +0200
*** import wx
*** 33,44
import wx.lib.dialogs
import libconcord
! version = 8
# global:
need_deinit = False
#-
# added for development debug output a.schulz:
import pdb # debugger a.schulz
--- 33,51
import wx.lib.dialogs
import libconcord
+ import libIRremotes
! version = 8.1
# global:
need_deinit = False
+ # Times to add a potential Repeat part of a Pronto HEX code
+ # to the transmitted IR pulse stream. Trying:
+ nRepeat = 2
+ # so the Logitech database might recognize the repetition.
+ # might be worth to be changeable by the user at runtime?
+
#-
# added for development debug output a.schulz:
import pdb # debugger a.schulz
*** iwh = (iw, ih)
*** 59,64
--- 66,72
#-- pass verbose flag to imported libraries:
libconcord.set_verbose(verbose)
+ libIRremotes.set_verbose(verbose)
#-- shortcut to produce verbose output:
def vprint(message):
*** class LearnIRPanel_Start(LearnIRPanel):
*** 1160,1166
self.resources.default_action = Learn
else:
disconnect_Harmony()
! self.resources.default_action = Skip
self.parent.ReenableNext()
# ---
--- 1168,1174
self.resources.default_action = Learn
else:
disconnect_Harmony()
! self.resources.default_action = Pronto
self.parent.ReenableNext()
# ---
*** class LearnIRPanel_Key(LearnIRPanel):
*** 1173,1193
self.bmp_code_source_select = wx.StaticBitmap(self, -1,
self.resources.icon_unstarted, None, iwh)
self.text_code_source_select = wx.StaticText(self,
! -1, Select action for this key :)
self.code_source_select = wx.RadioBox( self, -1, ,
wx.DefaultPosition, wx.DefaultSize,
! ['Learn', 'Skip'], 2, wx.RA_SPECIFY_COLS | wx.NO_BORDER)
sizer.Add(self.bmp_code_source_select, (vpos, 0), (1, 1), ALIGN_LC, 5)
sizer.Add(self.text_code_source_select, (vpos, 1), (1, 1), ALIGN_LC, 5)
sizer.Add(self.code_source_select, (vpos, 2), (1, 1), ALIGN_CC, 5)
self.Bind(wx.EVT_RADIOBOX, self.on_ir_radio_box, self.code_source_select)
return vpos + 1
# -- construct panel items, called by __init__
def fill_panel(self, vpos, sizer):
vpos = self.add_keyname_row(vpos, sizer)
vpos = self.add_source_select_row(vpos, sizer)
vpos = self.add_text_action_row(vpos, sizer)
return vpos
# ---
--- 1181,1217
self.bmp_code_source_select = wx.StaticBitmap(self, -1,
self.resources.icon_unstarted, None, iwh)
self.text_code_source_select = wx.StaticText(self,
! -1, IR code source for this key :)
self.code_source_select = wx.RadioBox( self, -1, ,
wx.DefaultPosition, wx.DefaultSize,
! ['Learn', 'Pronto', 'Skip'], 3, wx.RA_SPECIFY_COLS | wx.NO_BORDER)
sizer.Add(self.bmp_code_source_select, (vpos, 0), (1, 1), ALIGN_LC, 5)
sizer.Add(self.text_code_source_select, (vpos, 1), (1, 1), ALIGN_LC, 5)
sizer.Add(self.code_source_select, (vpos, 2), (1, 1), ALIGN_CC, 5)
self.Bind(wx.EVT_RADIOBOX, self.on_ir_radio_box, self.code_source_select)
return vpos + 1
+ def add_pronto_hex_row(self, vpos, sizer):
+ self.bmp_prontohex = wx.StaticBitmap(self, -1,
+ self.resources.icon_unstarted, None, iwh)
+ self.text_prontohex = wx.StaticText(self, -1, Pronto Hex Code:)
+ self.value_prontohex =