* @param sCodeWord /^[10FS]*$/ -> see getCodeWord */
| 466 | * @param sCodeWord /^[10FS]*$/ -> see getCodeWord |
| 467 | */ |
| 468 | void RCSwitch::sendTriState(const char* sCodeWord) { |
| 469 | noInterrupts(); |
| 470 | for (int nRepeat=0; nRepeat<nRepeatTransmit; nRepeat++) { |
| 471 | int i = 0; |
| 472 | while (sCodeWord[i] != '\0') { |
| 473 | switch(sCodeWord[i]) { |
| 474 | case '0': |
| 475 | this->sendT0(); |
| 476 | break; |
| 477 | case 'F': |
| 478 | this->sendTF(); |
| 479 | break; |
| 480 | case '1': |
| 481 | this->sendT1(); |
| 482 | break; |
| 483 | } |
| 484 | i++; |
| 485 | } |
| 486 | this->sendSync(); |
| 487 | } |
| 488 | interrupts(); |
| 489 | } |
| 490 | |
| 491 | void RCSwitch::send(unsigned long code, unsigned int length) { |
| 492 | this->send( this->dec2binWcharfill(code, length, '0') ); |
no test coverage detected