src/ir_Pronto.hpp
void IRsend::sendPronto(const char *str, uint_fast8_t aNumberOfRepeats) {
    size_t len = strlen(str) / (digitsInProntoNumber + 1) + 1;
    uint16_t data[len];
    const char *p = str;
    char *endptr[1];
    for (unsigned int i = 0; i < len; i++) {
        long x = strtol(p, endptr, 16);
        if (x == 0 && i >= numbersInPreamble) {
            // Alignment error?, bail immediately (often right result).
            len = i;
            break;
        }
        data[i] = static_cast<uint16_t>(x); // If input is conforming, there can be no overflow!
        p = *endptr;
    }
    sendPronto(data, len, aNumberOfRepeats);
}
/**
 * Parse the string given as Pronto Hex, and send it a number of times given
 * as the second argument. Thereby the division of the Pronto Hex into
 * an intro-sequence and a repeat sequence is taken into account:
 * First the intro sequence is sent, then the repeat sequence is sent times-1 times.
 * However, if the intro sequence is empty, the repeat sequence is sent times times.
 * <a href="http://www.harctoolbox.org/Glossary.html#ProntoSemantics">Reference</a>.
 *
 * Note: Using this function is very wasteful for the memory consumption on
 * a small board.
 * Normally it is a much better idea to use a tool like e.g. IrScrutinizer
 * to transform Pronto type signals offline
 * to a more memory efficient format.
 *
 * @param str C type string (null terminated) containing a Pronto Hex representation.
 * @param aNumberOfRepeats Number of times to send the signal.
 */
Parse the string given as Pronto Hex, and send it a number of times given
as the second argument. Thereby the division of the Pronto Hex into
an intro-sequence and a repeat sequence is taken into account:
First the intro sequence is sent, then the repeat sequence is sent times-1 times.
However, if the intro sequence is empty, the repeat sequence is sent times times.
Reference.

Using this function is very wasteful for the memory consumption on
a small board.
Normally it is a much better idea to use a tool like e.g. IrScrutinizer
to transform Pronto type signals offline
to a more memory efficient format.

@param str C type string (null terminated) containing a Pronto Hex representation.
@param aNumberOfRepeats Number of times to send the signal.
Parse the string given as Pronto Hex and send it a number of times given as the second argument . Thereby the division of the Pronto Hex into an intro - sequence and a repeat sequence is taken into account : First the intro sequence is sent then the repeat sequence is sent times - 1 times . However if the intro sequence is empty the repeat sequence is sent times times . Reference . Using this function is very wasteful for the memory consumption on a small board . Normally it is a much better idea to use a tool like e . g . IrScrutinizer to transform Pronto type signals offline to a more memory efficient format . @param str C type string ( null terminated ) containing a Pronto Hex representation . @param aNumberOfRepeats Number of times to send the signal .
void IRsend::sendPronto(const char *str, uint_fast8_t aNumberOfRepeats) {
    size_t len = strlen(str) / (digitsInProntoNumber + 1) + 1;
    uint16_t data[len];
    const char *p = str;
    char *endptr[1];
    for (unsigned int i = 0; i < len; i++) {
        long x = strtol(p, endptr, 16);
        if (x == 0 && i >= numbersInPreamble) {
            len = i;
            break;
        }
        data[i] = static_cast<uint16_t>(x); 
        p = *endptr;
    }
    sendPronto(data, len, aNumberOfRepeats);
}
void IRsend :: sendPronto ( const char * str , uint_fast8_t aNumberOfRepeats ) { size_t len = strlen ( str ) / ( digitsInProntoNumber + 1 ) + 1 ; uint16_t data [ len ] ; const char * p = str ; char * endptr [ 1 ] ; for ( unsigned int i = 0 ; i < len ; i ++ ) { long x = strtol ( p , endptr , 16 ) ; if ( x == 0 && i >= numbersInPreamble ) { len = i ; break ; } data [ i ] = static_cast < uint16_t > ( x ) ; p = * endptr ; } sendPronto ( data , len , aNumberOfRepeats ) ; }
Parse the string given as Pronto Hex, and send it a number of times given
 as the second argument.
Parse the string given as Pronto Hex and send it a number of times given as the second argument .
// Alignment error?, bail immediately (often right result). // If input is conforming, there can be no overflow!