From 325db5fcd21563828d3592c0e600666b8b127094 Mon Sep 17 00:00:00 2001 From: Griffsano <18743559+Griffsano@users.noreply.github.com> Date: Tue, 14 Dec 2021 00:20:05 +0100 Subject: [PATCH] switch setPulseLength and setProtocol --- RPi_utils/codesend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPi_utils/codesend.cpp b/RPi_utils/codesend.cpp index afed6fc..e538b8f 100644 --- a/RPi_utils/codesend.cpp +++ b/RPi_utils/codesend.cpp @@ -47,8 +47,8 @@ int main(int argc, char *argv[]) { if (wiringPiSetup () == -1) return 1; printf("sending code[%i]\n", code); RCSwitch mySwitch = RCSwitch(); - if (protocol != 0) mySwitch.setProtocol(protocol); if (pulseLength != 0) mySwitch.setPulseLength(pulseLength); + if (protocol != 0) mySwitch.setProtocol(protocol); mySwitch.enableTransmit(PIN); mySwitch.send(code, 24);