* @param sCodeWord /^[10FS]*$/ -> see getCodeWord */
| 428 | * @param sCodeWord /^[10FS]*$/ -> see getCodeWord |
| 429 | */ |
| 430 | void RCSwitch::sendTriState(char* sCodeWord) { |
| 431 | for (int nRepeat=0; nRepeat<nRepeatTransmit; nRepeat++) { |
| 432 | int i = 0; |
| 433 | while (sCodeWord[i] != '\0') { |
| 434 | switch(sCodeWord[i]) { |
| 435 | case '0': |
| 436 | this->sendT0(); |
| 437 | break; |
| 438 | case 'F': |
| 439 | this->sendTF(); |
| 440 | break; |
| 441 | case '1': |
| 442 | this->sendT1(); |
| 443 | break; |
| 444 | } |
| 445 | i++; |
| 446 | } |
| 447 | this->sendSync(); |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | void RCSwitch::send(unsigned long Code, unsigned int length) { |
| 452 | this->send( this->dec2binWzerofill(Code, length) ); |