@@ -105,6 +105,7 @@ struct PulseDistanceWidthProtocolConstants NECProtocolConstants = { NEC, NEC_KHZ
105105NEC_ONE_SPACE, NEC_BIT_MARK, NEC_ZERO_SPACE, PROTOCOL_IS_LSB_FIRST, SEND_STOP_BIT, (NEC_REPEAT_PERIOD / MICROS_IN_ONE_MILLI),
106106 &sendNECSpecialRepeat };
107107
108+ // Like NEC but repeat are full frames instead of special NEC repeats
108109struct PulseDistanceWidthProtocolConstants NEC2ProtocolConstants = { NEC2, NEC_KHZ, NEC_HEADER_MARK, NEC_HEADER_SPACE, NEC_BIT_MARK,
109110NEC_ONE_SPACE, NEC_BIT_MARK, NEC_ZERO_SPACE, PROTOCOL_IS_LSB_FIRST, SEND_STOP_BIT, (NEC_REPEAT_PERIOD / MICROS_IN_ONE_MILLI), NULL };
110111
@@ -159,6 +160,8 @@ uint32_t IRsend::computeNECRawDataAndChecksum(uint16_t aAddress, uint16_t aComma
159160}
160161
161162/* *
163+ * NEC Send frame and special repeats
164+ * There is NO delay after the last sent repeat!
162165 * @param aNumberOfRepeats If < 0 then only a special repeat frame without leading and trailing space
163166 * will be sent by calling NECProtocolConstants.SpecialSendRepeatFunction().
164167 */
@@ -167,10 +170,9 @@ void IRsend::sendNEC(uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfR
167170}
168171
169172/*
170- * Repeat commands should be sent in a 110 ms raster.
173+ * NEC2 Send frame and repeat the frame for each requested repeat
171174 * There is NO delay after the last sent repeat!
172- * @param aNumberOfRepeats If < 0 then only a special repeat frame without leading and trailing space
173- * will be sent by calling NECProtocolConstants.SpecialSendRepeatFunction().
175+ * @param aNumberOfRepeats If < 0 then nothing is sent.
174176 */
175177void IRsend::sendNEC2 (uint16_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats) {
176178 sendPulseDistanceWidth (&NEC2ProtocolConstants, computeNECRawDataAndChecksum (aAddress, aCommand), NEC_BITS, aNumberOfRepeats);
0 commit comments