diff --git a/src/ir_Teknopoint.cpp b/src/ir_Teknopoint.cpp index 239466802..d085e950b 100644 --- a/src/ir_Teknopoint.cpp +++ b/src/ir_Teknopoint.cpp @@ -12,13 +12,13 @@ #include "IRutils.h" // Protocol timings -const uint16_t kTeknopointHdrMark = 3614; -const uint16_t kTeknopointBitMark = 439; -const uint16_t kTeknopointHdrSpace = 1610; -const uint16_t kTeknopointOneSpace = 1238; -const uint16_t kTeknopointZeroSpace = 567; +const uint16_t kTeknopointHdrMark = 3600; +const uint16_t kTeknopointBitMark = 477; +const uint16_t kTeknopointHdrSpace = 1600; +const uint16_t kTeknopointOneSpace = 1200; +const uint16_t kTeknopointZeroSpace = 530; const uint16_t kTeknopointFreq = 38000; // Hz. (Guess Only) -const uint16_t kTeknopointOverhead = 3; +const uint8_t kTeknopointExtraTol = 10; // Extra tolerance percentage. #if SEND_TEKNOPOINT /// Send a Teknopoint formatted message. @@ -65,7 +65,8 @@ bool IRrecv::decodeTeknopoint(decode_results *results, uint16_t offset, kTeknopointHdrMark, kTeknopointHdrSpace, kTeknopointBitMark, kTeknopointOneSpace, kTeknopointBitMark, kTeknopointZeroSpace, - kTeknopointBitMark, kDefaultMessageGap, true)) return false; + kTeknopointBitMark, kDefaultMessageGap, + true, _tolerance + kTeknopointExtraTol)) return false; // Success results->decode_type = decode_type_t::TEKNOPOINT; results->bits = nbits; diff --git a/test/ir_Teknopoint_test.cpp b/test/ir_Teknopoint_test.cpp index 7eeea21e4..cc2bd27b3 100644 --- a/test/ir_Teknopoint_test.cpp +++ b/test/ir_Teknopoint_test.cpp @@ -72,22 +72,22 @@ TEST(TestDecodeTeknopoint, SyntheticExample) { EXPECT_EQ( "f38000d50" - "m3614s1610" - "m439s1238m439s1238m439s567m439s567m439s567m439s1238m439s567m439s567" - "m439s1238m439s1238m439s567m439s1238m439s567m439s567m439s1238m439s1238" - "m439s567m439s1238m439s1238m439s567m439s567m439s1238m439s567m439s567" - "m439s1238m439s567m439s567m439s567m439s567m439s567m439s567m439s567" - "m439s567m439s567m439s567m439s567m439s567m439s567m439s567m439s567" - "m439s567m439s567m439s1238m439s567m439s567m439s1238m439s567m439s567" - "m439s1238m439s1238m439s567m439s567m439s567m439s567m439s567m439s567" - "m439s1238m439s1238m439s1238m439s1238m439s567m439s567m439s567m439s567" - "m439s567m439s567m439s567m439s1238m439s567m439s567m439s567m439s567" - "m439s567m439s567m439s567m439s567m439s567m439s567m439s567m439s567" - "m439s567m439s567m439s567m439s567m439s567m439s567m439s567m439s567" - "m439s567m439s567m439s567m439s567m439s567m439s567m439s567m439s567" - "m439s567m439s567m439s567m439s567m439s567m439s567m439s567m439s567" - "m439s1238m439s1238m439s567m439s567m439s1238m439s567m439s1238m439s567" - "m439s100000", + "m3600s1600" + "m477s1200m477s1200m477s530m477s530m477s530m477s1200m477s530m477s530" + "m477s1200m477s1200m477s530m477s1200m477s530m477s530m477s1200m477s1200" + "m477s530m477s1200m477s1200m477s530m477s530m477s1200m477s530m477s530" + "m477s1200m477s530m477s530m477s530m477s530m477s530m477s530m477s530" + "m477s530m477s530m477s530m477s530m477s530m477s530m477s530m477s530" + "m477s530m477s530m477s1200m477s530m477s530m477s1200m477s530m477s530" + "m477s1200m477s1200m477s530m477s530m477s530m477s530m477s530m477s530" + "m477s1200m477s1200m477s1200m477s1200m477s530m477s530m477s530m477s530" + "m477s530m477s530m477s530m477s1200m477s530m477s530m477s530m477s530" + "m477s530m477s530m477s530m477s530m477s530m477s530m477s530m477s530" + "m477s530m477s530m477s530m477s530m477s530m477s530m477s530m477s530" + "m477s530m477s530m477s530m477s530m477s530m477s530m477s530m477s530" + "m477s530m477s530m477s530m477s530m477s530m477s530m477s530m477s530" + "m477s1200m477s1200m477s530m477s530m477s1200m477s530m477s1200m477s530" + "m477s100000", irsend.outputStr()); }