Skip to content

Commit 325db5f

Browse files
committed
switch setPulseLength and setProtocol
1 parent 31c0ea4 commit 325db5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RPi_utils/codesend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ int main(int argc, char *argv[]) {
4747
if (wiringPiSetup () == -1) return 1;
4848
printf("sending code[%i]\n", code);
4949
RCSwitch mySwitch = RCSwitch();
50-
if (protocol != 0) mySwitch.setProtocol(protocol);
5150
if (pulseLength != 0) mySwitch.setPulseLength(pulseLength);
51+
if (protocol != 0) mySwitch.setProtocol(protocol);
5252
mySwitch.enableTransmit(PIN);
5353

5454
mySwitch.send(code, 24);

0 commit comments

Comments
 (0)