Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GREE] Update inter-message gap timing #1509

Merged
merged 1 commit into from
Jun 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/ir_Gree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/// @file
/// @brief Support for Gree A/C protocols.
/// @see https://github.com/ToniA/arduino-heatpumpir/blob/master/GreeHeatpumpIR.h
/// @see https://github.com/crankyoldgit/IRremoteESP8266/issues/1508

#include "ir_Gree.h"
#include <algorithm>
Expand All @@ -24,7 +25,7 @@ const uint16_t kGreeHdrSpace = 4500; ///< See #684 & real example in unit tests
const uint16_t kGreeBitMark = 620;
const uint16_t kGreeOneSpace = 1600;
const uint16_t kGreeZeroSpace = 540;
const uint16_t kGreeMsgSpace = 19000;
const uint16_t kGreeMsgSpace = 19980; ///< See #1508, #386, & Kelvinator
const uint8_t kGreeBlockFooter = 0b010;
const uint8_t kGreeBlockFooterBits = 3;

Expand Down
3 changes: 3 additions & 0 deletions src/ir_Gree.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/// @file
/// @brief Support for Gree A/C protocols.
/// @see https://github.com/ToniA/arduino-heatpumpir/blob/master/GreeHeatpumpIR.h
/// @see https://github.com/crankyoldgit/IRremoteESP8266/issues/1508

// Supports:
// Brand: Ultimate, Model: Heat Pump
Expand All @@ -15,6 +16,8 @@
// Brand: Gree, Model: YB1F2F remote
// Brand: Amana, Model: PBC093G00CC A/C
// Brand: Amana, Model: YX1FF remote
// Brand: Cooper & Hunter, Model: YB1F2 remote
// Brand: Cooper & Hunter, Model: CH-S09FTXG A/C

#ifndef IR_GREE_H_
#define IR_GREE_H_
Expand Down
28 changes: 14 additions & 14 deletions test/ir_Gree_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ TEST(TestSendGreeChars, SendData) {
"m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540"
"m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540"
"m620s540m620s1600m620s540"
"m620s19000"
"m620s19980"
"m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600"
"m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600"
"m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600"
"m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600"
"m620s19000",
"m620s19980",
irsend.outputStr());
}

Expand All @@ -51,12 +51,12 @@ TEST(TestSendGreeUint64, SendData) {
"m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540"
"m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540"
"m620s540m620s1600m620s540"
"m620s19000"
"m620s19980"
"m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600"
"m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600"
"m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600"
"m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600"
"m620s19000",
"m620s19980",
irsend.outputStr());
}

Expand All @@ -79,24 +79,24 @@ TEST(TestSendGreeChars, SendWithRepeats) {
"m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540"
"m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540"
"m620s540m620s1600m620s540"
"m620s19000"
"m620s19980"
"m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600"
"m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600"
"m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600"
"m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600"
"m620s19000"
"m620s19980"
"m9000s4500"
"m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540"
"m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540"
"m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540"
"m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540"
"m620s540m620s1600m620s540"
"m620s19000"
"m620s19980"
"m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600"
"m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600"
"m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600"
"m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600"
"m620s19000",
"m620s19980",
irsend.outputStr());
}

Expand All @@ -114,24 +114,24 @@ TEST(TestSendGreeUint64, SendWithRepeats) {
"m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540"
"m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540"
"m620s540m620s1600m620s540"
"m620s19000"
"m620s19980"
"m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600"
"m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600"
"m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600"
"m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600"
"m620s19000"
"m620s19980"
"m9000s4500"
"m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540"
"m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540"
"m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540"
"m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540"
"m620s540m620s1600m620s540"
"m620s19000"
"m620s19980"
"m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600"
"m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600"
"m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600"
"m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600"
"m620s19000",
"m620s19980",
irsend.outputStr());
}

Expand All @@ -158,13 +158,13 @@ TEST(TestSendGreeChars, SendUnexpectedSizes) {
"m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540"
"m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540"
"m620s540m620s1600m620s540"
"m620s19000"
"m620s19980"
"m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600"
"m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600"
"m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600"
"m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600"
"m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540"
"m620s19000",
"m620s19980",
irsend.outputStr());
}

Expand Down