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

Method compensateAndStorePronto

src/ir_Pronto.hpp:325–337  ·  view source on GitHub ↗

* Writes Pronto HEX to a String object. * Returns the amount of characters added to the string.(360 characters for a NEC code!) */

Source from the content-addressed store, hash-verified

323 * Returns the amount of characters added to the string.(360 characters for a NEC code!)
324 */
325size_t IRrecv::compensateAndStorePronto(String *aString, uint16_t frequency) {
326
327 size_t size = 0;
328 uint16_t timebase = toTimebase(frequency);
329
330 size += dumpNumberHex(aString, frequency > 0 ? learnedToken : learnedNonModulatedToken);
331 size += dumpNumberHex(aString, toFrequencyCode(frequency));
332 size += dumpNumberHex(aString, (decodedIRData.rawlen + 1) / 2);
333 size += dumpNumberHex(aString, 0);
334 size += compensateAndDumpSequence(aString, &irparams.rawbuf[1], decodedIRData.rawlen - 1, timebase); // skip leading space
335
336 return size;
337}
338
339/** @}*/
340#include "LocalDebugLevelEnd.h"

Callers

nothing calls this directly

Calls 4

toTimebaseFunction · 0.85
dumpNumberHexFunction · 0.85
toFrequencyCodeFunction · 0.85

Tested by

no test coverage detected