| 373 | } |
| 374 | |
| 375 | void sendRC5Command(String address, String command, bool hideDefaultUI) { |
| 376 | IRsend irsend(bruceConfigPins.irTx, true); // Set the GPIO to be used to sending the message. |
| 377 | irsend.begin(); |
| 378 | if (!hideDefaultUI) { displayTextLine("Sending.."); } |
| 379 | uint8_t addressValue = strtoul(address.substring(0, 2).c_str(), nullptr, 16); |
| 380 | uint8_t commandValue = strtoul(command.substring(0, 2).c_str(), nullptr, 16); |
| 381 | uint16_t data = irsend.encodeRC5(addressValue, commandValue); |
| 382 | irsend.sendRC5(data, 13); |
| 383 | |
| 384 | if (bruceConfigPins.irTxRepeats > 0) { |
| 385 | for (uint8_t i = 1; i <= bruceConfigPins.irTxRepeats; i++) { irsend.sendRC5(data, 13); } |
| 386 | } |
| 387 | Serial.println( |
| 388 | "Sent RC5 Command" + (bruceConfigPins.irTxRepeats > 0 |
| 389 | ? " (1 initial + " + String(bruceConfigPins.irTxRepeats) + " repeats)" |
| 390 | : "") |
| 391 | ); |
| 392 | digitalWrite(bruceConfigPins.irTx, LED_OFF); |
| 393 | } |
| 394 | |
| 395 | void sendRC6Command(String address, String command, bool hideDefaultUI) { |
| 396 | IRsend irsend(bruceConfigPins.irTx, true); // Set the GPIO to be used to sending the message. |
no test coverage detected