diff options
author | lassulus <lassulus@lassul.us> | 2020-10-18 19:25:11 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2020-10-18 19:25:11 +0200 |
commit | 5b29d7a435092aafcea15f588effbb6f45a6a56e (patch) | |
tree | 07340bc138d7bdea55bbb33e50fc2fa1b5387a57 /tv/5pkgs/rpi/433Utils/RPi_utils.codesend.codestring.patch | |
parent | 9626d3cda953929e903b5a06595e98972cb08ffc (diff) | |
parent | b034f63f7a2e4361b32c33c0e1a980eecf1a5aa6 (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'tv/5pkgs/rpi/433Utils/RPi_utils.codesend.codestring.patch')
-rw-r--r-- | tv/5pkgs/rpi/433Utils/RPi_utils.codesend.codestring.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tv/5pkgs/rpi/433Utils/RPi_utils.codesend.codestring.patch b/tv/5pkgs/rpi/433Utils/RPi_utils.codesend.codestring.patch new file mode 100644 index 000000000..447e42f1d --- /dev/null +++ b/tv/5pkgs/rpi/433Utils/RPi_utils.codesend.codestring.patch @@ -0,0 +1,24 @@ +--- a/RPi_utils/codesend.cpp ++++ b/RPi_utils/codesend.cpp +@@ -40,18 +40,18 @@ int main(int argc, char *argv[]) { + } + + // Change protocol and pulse length accroding to parameters +- int code = atoi(argv[1]); ++ const char *code = argv[1]; + if (argc >= 3) protocol = atoi(argv[2]); + if (argc >= 4) pulseLength = atoi(argv[3]); + + if (wiringPiSetup () == -1) return 1; +- printf("sending code[%i]\n", code); ++ printf("sending code[%s]\n", code); + RCSwitch mySwitch = RCSwitch(); + if (protocol != 0) mySwitch.setProtocol(protocol); + if (pulseLength != 0) mySwitch.setPulseLength(pulseLength); + mySwitch.enableTransmit(PIN); + +- mySwitch.send(code, 24); ++ mySwitch.send(code); + + return 0; + |