summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/rpi/433Utils/RPi_utils.codesend.codestring.patch
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-10-23 21:02:02 +0200
committermakefu <github@syntax-fehler.de>2020-10-23 21:02:02 +0200
commite8b6cc0587929a7ebd0d00f83d298640b20b055f (patch)
treee0f813b8264119a84d6b8c32fa68041c8541ab59 /tv/5pkgs/rpi/433Utils/RPi_utils.codesend.codestring.patch
parentfd41a76d4cab2765f9ef95ce5322b7bffe52b8a7 (diff)
parent242530680d5dcb37a5a023d0b8f6155ab441cead (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'tv/5pkgs/rpi/433Utils/RPi_utils.codesend.codestring.patch')
-rw-r--r--tv/5pkgs/rpi/433Utils/RPi_utils.codesend.codestring.patch24
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 00000000..447e42f1
--- /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;
+