MCPcopy Create free account
hub / github.com/DanielOgorchock/ST_Anything / setProtocol

Method setProtocol

Arduino/libraries/RCSwitch/RCSwitch.cpp:56–67  ·  view source on GitHub ↗

* Sets the protocol to send. */

Source from the content-addressed store, hash-verified

54 * Sets the protocol to send.
55 */
56void RCSwitch::setProtocol(int nProtocol) {
57 this->nProtocol = nProtocol;
58 if (nProtocol == 1){
59 this->setPulseLength(350);
60 }
61 else if (nProtocol == 2) {
62 this->setPulseLength(650);
63 }
64 else if (nProtocol == 3) {
65 this->setPulseLength(100);
66 }
67}
68
69/**
70 * Sets the protocol to send with pulse length in microseconds.

Callers 2

RCSwitchMethod · 0.95
EX_RCSwitchMethod · 0.80

Calls 1

setPulseLengthMethod · 0.95

Tested by

no test coverage detected