Skip to content

Commit

Permalink
Change the bit sequencing.
Browse files Browse the repository at this point in the history
It seems the we need to swap the timing value for `0b11` with the one for `0b10`.

Fingers crossed this will give us sane numerically increasing temperature values.

For #1810
  • Loading branch information
crankyoldgit committed Jun 4, 2022
1 parent b346622 commit cafcc45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/ir_Tcl.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019, 2021 David Conran
// Copyright 2019, 2021, 2022 David Conran

/// @file
/// @brief Support for TCL protocols.
Expand All @@ -24,8 +24,8 @@ const uint32_t kTcl96AcGap = kDefaultMessageGap; // Just a guess.
const uint8_t kTcl96AcSpaceCount = 4;
const uint16_t kTcl96AcBitSpaces[kTcl96AcSpaceCount] = {360, // 0b00
838, // 0b01
1444, // 0b10
2182}; // 0b11
2182, // 0b10
1444}; // 0b11

using irutils::addBoolToString;
using irutils::addFanToString;
Expand Down
6 changes: 3 additions & 3 deletions test/ir_Tcl_test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 David Conran
// Copyright 2019-2022 David Conran

#include "ir_Tcl.h"
#include "IRac.h"
Expand Down Expand Up @@ -736,7 +736,7 @@ TEST(TestDecodeTcl96Ac, DecodeRealExample) {
634}; // UNKNOWN AE10E0CB

const uint8_t expectedState[kTcl96AcStateLength] = {
0xE7, 0x32, 0x00, 0x10, 0xC5, 0x0D, 0x72, 0x24, 0x00, 0x04, 0x00, 0x5F};
0xB6, 0x23, 0x00, 0x10, 0x85, 0x09, 0x63, 0x34, 0x00, 0x04, 0x00, 0x5A};

irsend.sendRaw(rawData, 99, 38000);
irsend.makeDecodeResult();
Expand All @@ -758,7 +758,7 @@ TEST(TestDecodeTcl96Ac, SyntheticExample) {
irsend.reset();

const uint8_t expectedState[kTcl96AcStateLength] = {
0xE7, 0x32, 0x00, 0x10, 0xC5, 0x0D, 0x72, 0x24, 0x00, 0x04, 0x00, 0x5F};
0xB6, 0x23, 0x00, 0x10, 0x85, 0x09, 0x63, 0x34, 0x00, 0x04, 0x00, 0x5A};

irsend.sendTcl96Ac(expectedState);
irsend.makeDecodeResult();
Expand Down

0 comments on commit cafcc45

Please sign in to comment.