* Is internally called by decode before calling decoders. * Must be used to setup data, if you call decoders manually. */
| 503 | * Must be used to setup data, if you call decoders manually. |
| 504 | */ |
| 505 | void IRrecv::initDecodedIRData() { |
| 506 | |
| 507 | if (irparams.OverflowFlag) { |
| 508 | decodedIRData.flags = IRDATA_FLAGS_WAS_OVERFLOW; |
| 509 | |
| 510 | DEBUG_PRINT(F("Overflow happened, try to increase the \"RAW_BUFFER_LENGTH\" value of ")); |
| 511 | DEBUG_PRINT(RAW_BUFFER_LENGTH); |
| 512 | DEBUG_PRINTLN(F(" with #define RAW_BUFFER_LENGTH=<biggerValue>")); |
| 513 | |
| 514 | } else { |
| 515 | decodedIRData.flags = IRDATA_FLAGS_EMPTY; |
| 516 | // save last protocol, command and address for repeat handling (where they are compared or copied back :-)) |
| 517 | lastDecodedProtocol = decodedIRData.protocol; // repeat patterns can be equal between protocols (e.g. NEC, Samsung and LG), so we must keep the original one |
| 518 | lastDecodedCommand = decodedIRData.command; |
| 519 | lastDecodedAddress = decodedIRData.address; |
| 520 | |
| 521 | } |
| 522 | decodedIRData.protocol = UNKNOWN; |
| 523 | decodedIRData.command = 0; |
| 524 | decodedIRData.address = 0; |
| 525 | decodedIRData.decodedRawData = 0; |
| 526 | decodedIRData.numberOfBits = 0; |
| 527 | } |
| 528 | |
| 529 | /** |
| 530 | * @return true if available() is true or IR receiver has not received a mark/signal since last resume(). |
nothing calls this directly
no outgoing calls
no test coverage detected