* Sets the protocol to send. */
| 54 | * Sets the protocol to send. |
| 55 | */ |
| 56 | void 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. |
no test coverage detected