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

Method getMaximumTicksFromRawData

src/IRReceive.hpp:1936–1951  ·  view source on GitHub ↗

* The optimizing compiler internally generates this function, if getMaximumMarkTicksFromRawData() and getMaximumSpaceTicksFromRawData() is used. */

Source from the content-addressed store, hash-verified

1934 * The optimizing compiler internally generates this function, if getMaximumMarkTicksFromRawData() and getMaximumSpaceTicksFromRawData() is used.
1935 */
1936uint8_t IRrecv::getMaximumTicksFromRawData(bool aSearchSpaceInsteadOfMark) {
1937 uint8_t tMaximumTick = 0;
1938 IRRawlenType i;
1939 if (aSearchSpaceInsteadOfMark) {
1940 i = 4;
1941 } else {
1942 i = 3;
1943 }
1944 for (; i < decodedIRData.rawlen - 2; i += 2) { // Skip leading start and trailing stop bit.
1945 auto tTick = irparams.rawbuf[i];
1946 if (tMaximumTick < tTick) {
1947 tMaximumTick = tTick;
1948 }
1949 }
1950 return tMaximumTick;
1951}
1952
1953uint32_t IRrecv::getTotalDurationOfRawData() {
1954 uint16_t tSumOfDurationTicks = 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected