MCPcopy Create free account
hub / github.com/SmingHub/Sming / sendTriState

Method sendTriState

Sming/Libraries/RCSwitch/RCSwitch.cpp:468–489  ·  view source on GitHub ↗

* @param sCodeWord /^[10FS]*$/ -> see getCodeWord */

Source from the content-addressed store, hash-verified

466 * @param sCodeWord /^[10FS]*$/ -> see getCodeWord
467 */
468void 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
491void RCSwitch::send(unsigned long code, unsigned int length) {
492 this->send( this->dec2binWcharfill(code, length, '0') );

Callers 2

switchOnMethod · 0.95
switchOffMethod · 0.95

Calls 6

sendT0Method · 0.95
sendTFMethod · 0.95
sendT1Method · 0.95
sendSyncMethod · 0.95
noInterruptsFunction · 0.50
interruptsFunction · 0.50

Tested by

no test coverage detected