* The JVC protocol repeats by skipping the header mark and space -> this leads to a poor repeat detection for JVC protocol. */
| 86 | * The JVC protocol repeats by skipping the header mark and space -> this leads to a poor repeat detection for JVC protocol. |
| 87 | */ |
| 88 | void IRsend::sendJVC(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats) { |
| 89 | // Set IR carrier frequency |
| 90 | enableIROut (JVC_KHZ); // 38 kHz |
| 91 | |
| 92 | if (aNumberOfRepeats < 0) { |
| 93 | // The JVC protocol repeats by skipping the header. |
| 94 | aNumberOfRepeats = 0; |
| 95 | } else { |
| 96 | mark(JVC_HEADER_MARK); |
| 97 | space(JVC_HEADER_SPACE); |
| 98 | } |
| 99 | |
| 100 | uint_fast8_t tNumberOfCommands = aNumberOfRepeats + 1; |
| 101 | while (tNumberOfCommands > 0) { |
| 102 | |
| 103 | // Address + command |
| 104 | sendPulseDistanceWidthData_P(&JVCProtocolConstants, aAddress | (aCommand << JVC_ADDRESS_BITS), JVC_BITS); |
| 105 | |
| 106 | tNumberOfCommands--; |
| 107 | // skip last delay! |
| 108 | if (tNumberOfCommands > 0) { |
| 109 | // send repeated command in a fixed raster |
| 110 | delay(JVC_REPEAT_DISTANCE / MICROS_IN_ONE_MILLI); |
| 111 | } |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | bool IRrecv::decodeJVC() { |
| 116 |
nothing calls this directly
no outgoing calls
no test coverage detected