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

Fix compilation issue when using old 8266 Arduino Frameworks. #1640

Merged
merged 1 commit into from
Oct 16, 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
5 changes: 4 additions & 1 deletion src/IRutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ String uint64ToString(uint64_t input, uint8_t base) {
/// @returns A String representation of the integer.
String int64ToString(int64_t input, uint8_t base) {
if (input < 0) {
return kDashStr + uint64ToString(-input, base);
// Using String(kDashStr) to keep compatible with old arduino
// frameworks. Not needed with 3.0.2.
///> @see https://github.com/crankyoldgit/IRremoteESP8266/issues/1639#issuecomment-944906016
return String(kDashStr) + uint64ToString(-input, base);
}
return uint64ToString(input, base);
}
Expand Down
6 changes: 5 additions & 1 deletion src/ir_Coolix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,11 @@ String IRCoolixAC::toString(void) const {
result += addBoolToString(getZoneFollow(), kZoneFollowStr);
result += addLabeledString(
(getSensorTemp() == kCoolixSensorTempIgnoreCode)
? kOffStr : uint64ToString(getSensorTemp()) + 'C', kSensorTempStr);
// Encasing with String(blah) to keep compatible with old arduino
// frameworks. Not needed with 3.0.2.
///> @see https://github.com/crankyoldgit/IRremoteESP8266/issues/1639#issuecomment-944906016
? kOffStr : String(uint64ToString(getSensorTemp()) + 'C'),
kSensorTempStr);
return result;
}

Expand Down