]> vault307.fbx.one Git - micorpython_ir.git/blobdiff - ir_tx/nec.py
ir_rx remove ESP8266 hard IRQ: anticipate PR5962.
[micorpython_ir.git] / ir_tx / nec.py
index 1e02c9f9068acb74b442dfd2f85e2399ce47fac6..da1af24a8ae75a0f32735a04aedf56c7c5e61b4c 100644 (file)
@@ -11,9 +11,10 @@ _TBURST = const(563)
 _T_ONE = const(1687)
 
 class NEC(IR):
 _T_ONE = const(1687)
 
 class NEC(IR):
+    valid = (0xffff, 0xff, 0)  # Max addr, data, toggle
 
     def __init__(self, pin, freq=38000, verbose=False):  # NEC specifies 38KHz
 
     def __init__(self, pin, freq=38000, verbose=False):  # NEC specifies 38KHz
-        super().__init__(pin, freq, 68, 50, verbose)
+        super().__init__(pin, freq, 68, 33, verbose)  # Measured duty ratio 33%
 
     def _bit(self, b):
         self.append(_TBURST, _T_ONE if b else _TBURST)
 
     def _bit(self, b):
         self.append(_TBURST, _T_ONE if b else _TBURST)