MCPcopy Create free account
hub / github.com/Arduino-IRremote/Arduino-IRremote / checkForRepeatSpaceTicksAndSetFlag

Method checkForRepeatSpaceTicksAndSetFlag

src/IRReceive.hpp:1251–1260  ·  view source on GitHub ↗

* Does not check for same address and command, because it is almost not possible to press 2 different buttons on the remote within around 100 ms. * And if really required, it can be enabled here, or done manually in user program. * And we have still no RC6 toggle bit check for detecting a second press on the same button. */

Source from the content-addressed store, hash-verified

1249 * And we have still no RC6 toggle bit check for detecting a second press on the same button.
1250 */
1251void IRrecv::checkForRepeatSpaceTicksAndSetFlag(uint16_t aMaximumRepeatSpaceTicks) {
1252 if (decodedIRData.initialGapTicks < aMaximumRepeatSpaceTicks
1253#if defined(ENABLE_COMPLETE_REPEAT_CHECK)
1254// Check also for same command and address values to detect a repeat. Not sensible for standard protocols, because it is almost not possible to press 2 different buttons on the remote within around 100 ms
1255 && decodedIRData.address == lastDecodedAddress && decodedIRData.command == lastDecodedCommand /* requires around 44 bytes program space */
1256#endif
1257 ) {
1258 decodedIRData.flags |= IRDATA_FLAGS_IS_REPEAT;
1259 }
1260}
1261
1262/**
1263 * Match function WITHOUT compensating for marks exceeded or spaces shortened by demodulator hardware

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected