Tasmota/lib/IRremoteESP8266-2.2.1.02/src/ir_Sherwood.cpp
arendst 299bed1c05 v5.9.1f - Update libraries and a fix
5.9.1f
 * Upgrade library ArduinoJson to 5.11.2
 * Upgrade library
IRRemoteEsp8266 to 2.2.1 + 2 commits but tweaked some protocols to keep
code usage small
 * Upgrade library NeoPixelBus to 2.2.9
 * Upgrade
library OneWire to 2.3.3 + 6 commits
 * Formalize library PubSubClient
to 2.6 + 9 commits and additional delay
 * Add optional ADS1115 driver
as alternative for unsupported I2Cdevlib in esp8266-core 2.4.0-rc2
 *
Fix wrong response name for command HlwISet (#1214)
2017-11-19 18:02:03 +01:00

30 lines
1.1 KiB
C++

// Copyright 2017 David Conran
#include <algorithm>
#include "IRsend.h"
// SSSSS HH HH EEEEEEE RRRRRR WW WW OOOOO OOOOO DDDDD
// SS HH HH EE RR RR WW WW OO OO OO OO DD DD
// SSSSS HHHHHHH EEEEE RRRRRR WW W WW OO OO OO OO DD DD
// SS HH HH EE RR RR WW WWW WW OO OO OO OO DD DD
// SSSSS HH HH EEEEEEE RR RR WW WW OOOO0 OOOO0 DDDDDD
#if SEND_SHERWOOD
// Send an IR command to a Sherwood device.
//
// Args:
// data: The contents of the command you want to send.
// nbits: The bit size of the command being sent. (SHERWOOD_BITS)
// repeat: The nr. of times you want the command to be repeated. (Default: 1)
//
// Status: STABLE / Known working.
//
// Note:
// Sherwood remote codes appear to be NEC codes with a manditory repeat code.
// i.e. repeat should be >= SHERWOOD_MIN_REPEAT (1).
void IRsend::sendSherwood(uint64_t data, uint16_t nbits,
uint16_t repeat) {
sendNEC(data, nbits, std::max((uint16_t) SHERWOOD_MIN_REPEAT, repeat));
}
#endif